Skip to content

CoreMedia macOS xcode27.0 rc

Alex Soto edited this page Sep 9, 2026 · 1 revision

#CoreMedia.framework

diff -ruN /Applications/Xcode_27.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMGenlockClock.h /Applications/Xcode_27.0.0-rc.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMGenlockClock.h
--- /Applications/Xcode_27.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMGenlockClock.h	1969-12-31 19:00:00
+++ /Applications/Xcode_27.0.0-rc.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMGenlockClock.h	2026-08-08 19:22:49
@@ -0,0 +1,65 @@
+/*
+	File:  CMGenlockClock.h
+ 
+	Framework:  CoreMedia
+ 
+	Copyright 2026 Apple Inc. All rights reserved.
+ 
+*/
+
+#ifndef __CMGENLOCKCLOCK__
+#define __CMGENLOCKCLOCK__
+
+#include <CoreMedia/CMBase.h>
+#include <CoreMedia/CMSync.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    
+#pragma pack(push)
+#pragma pack()
+
+#if COREMEDIA_SUPPORTS_GENLOCK_CLOCK
+/// Returns a clock whose time is based on genlock when the system is synchronized to an external genlock signal, and on host time otherwise.
+///
+/// When the system is not synchronized to an external genlock signal, the returned clock will provide a time based on the host time clock.
+/// When the system is synchronized to an external genlock signal, the returned clock will provide a time based on the genlock signal.
+/// Use `CMIsAnyDisplaySynchronizedToLockedGenlockSignal` to determine whether the system is currently synchronized to an external genlock signal.
+/// The caller is responsible for releasing the returned clock when it is no longer needed.
+/// While the clock object persists, system energy use may be elevated (to monitor the genlock signal).
+/// When a genlock clock is already in use, further calls to this function may return the same clock object.
+CM_EXPORT CM_NULLABLE CM_RETURNS_RETAINED CMClockRef
+CMClockCreateGenlockClock(void) CM_REFINED_FOR_SWIFT
+	API_AVAILABLE(macos(27.0), macCatalyst(27.0)) API_UNAVAILABLE(ios, tvos, watchos, visionos);
+
+/// Queries whether any display is synchronized to a locked external genlock signal.
+CM_EXPORT Boolean
+CMIsAnyDisplaySynchronizedToLockedGenlockSignal(void) CM_REFINED_FOR_SWIFT
+	API_AVAILABLE(macos(27.0), macCatalyst(27.0)) API_UNAVAILABLE(ios, tvos, watchos, visionos);
+
+CM_ASSUME_NONNULL_BEGIN
+
+/// Posted when the display mode changes from genlock to non-genlock or vice versa.
+///
+/// Observe this notification using `CMNotificationCenterAddListener` on the
+/// default local `CMNotificationCenter`.
+/// The notification payload dictionary contains a `CFBoolean` value for the key
+/// `kCMGenlockClockNotificationPayload_AnyDisplayIsSynchronizedToLockedGenlockSignal`.
+CM_EXPORT const CFStringRef kCMGenlockClockNotification_DisplayGenlockModeChanged
+	API_AVAILABLE(macos(27.0), macCatalyst(27.0)) API_UNAVAILABLE(ios, tvos, watchos, visionos);
+
+CM_EXPORT const CFStringRef kCMGenlockClockNotificationPayload_AnyDisplayIsSynchronizedToLockedGenlockSignal
+	API_AVAILABLE(macos(27.0), macCatalyst(27.0)) API_UNAVAILABLE(ios, tvos, watchos, visionos);
+
+CM_ASSUME_NONNULL_END
+
+#endif // COREMEDIA_SUPPORTS_GENLOCK_CLOCK
+
+#pragma pack(pop)
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __CMGENLOCKCLOCK__
diff -ruN /Applications/Xcode_27.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMSync.h /Applications/Xcode_27.0.0-rc.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMSync.h
--- /Applications/Xcode_27.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMSync.h	2026-08-08 20:22:42
+++ /Applications/Xcode_27.0.0-rc.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CMSync.h	2026-08-08 17:38:22
@@ -15,6 +15,15 @@
 #include <dispatch/dispatch.h>
 
 
+#ifndef COREMEDIA_SUPPORTS_GENLOCK_CLOCK
+#if TARGET_OS_MACCATALYST
+	#define COREMEDIA_SUPPORTS_GENLOCK_CLOCK (__IPHONE_OS_VERSION_MIN_REQUIRED >= 270000)
+#elif TARGET_OS_OSX
+	#define COREMEDIA_SUPPORTS_GENLOCK_CLOCK (__MAC_OS_X_VERSION_MIN_REQUIRED >= 270000)
+#else
+	#define COREMEDIA_SUPPORTS_GENLOCK_CLOCK 0
+#endif
+#endif // not defined COREMEDIA_SUPPORTS_GENLOCK_CLOCK
 
 #ifdef __cplusplus
 extern "C" {
@@ -87,6 +96,14 @@
 	kCMClockError_UnsupportedOperation		= -12756,
 } API_AVAILABLE(macos(10.8), ios(6.0), tvos(9.0), watchos(6.0), visionos(1.0));
 
+#if COREMEDIA_USE_DERIVED_ENUMS_FOR_CONSTANTS
+enum : OSStatus
+#else
+enum
+#endif
+{
+	kCMClockError_PreferredStartTimeNotAvailable	= -12758,
+} API_AVAILABLE(macos(27.0), macCatalyst(27.0), ios(27.0), tvos(27.0), watchos(27.0), visionos(27.0));
 
 // CMTimebase error codes
 #if COREMEDIA_USE_DERIVED_ENUMS_FOR_CONSTANTS
@@ -191,6 +208,32 @@
 		CMClockRef CM_NONNULL otherClock )
 			API_AVAILABLE(macos(10.8), ios(6.0), tvos(9.0), watchos(6.0), visionos(1.0));
 
+/// Indicates whether a clock implements the `CMClockGetPreferredStartTimePattern` function.
+CM_EXPORT Boolean
+CMClockImplementsGetPreferredStartTimePattern(
+		CMClockRef CM_NONNULL clock ) CM_REFINED_FOR_SWIFT
+	API_AVAILABLE(macos(27.0), macCatalyst(27.0), ios(27.0), tvos(27.0), watchos(27.0), visionos(27.0));
+
+/// Retrieves a description of the pattern of preferred start times, such as for synchronization with an external genlock signal.
+///
+/// When the system is disciplined to a sync signal, this function returns a
+/// matched time pair in the near future and the delta between successive times.
+/// - Parameters:
+///   - outClockStartTime: Points to a CMTime to receive the clock time of the next preferred start time pair.
+///   - outHostClockStartTime: Points to a CMTime to receive the host clock time of the next preferred start time pair.
+///   - outDeltaBetweenPreferredStartTimes: Points to a CMTime to receive the delta between successive preferred start times.
+///     Integer multiples of this delta may be added to the clock start time and
+///     host clock start time to calculate near future preferred start times.
+/// - Returns: `noErr` on success, `kCMClockError_UnsupportedOperation` if the clock does not
+///   support this function, or `kCMClockError_PreferredStartTimeNotAvailable` if the system is
+///   not disciplined to a present signal.
+CM_EXPORT OSStatus
+CMClockGetPreferredStartTimePattern(
+		CMClockRef CM_NONNULL clock,
+		CMTime * CM_NULLABLE outClockStartTime,
+		CMTime * CM_NULLABLE outHostClockStartTime,
+		CMTime * CM_NULLABLE outDeltaBetweenPreferredStartTimes ) CM_REFINED_FOR_SWIFT
+	API_AVAILABLE(macos(27.0), macCatalyst(27.0), ios(27.0), tvos(27.0), watchos(27.0), visionos(27.0));
 
 /*!
 	@function	CMClockInvalidate
diff -ruN /Applications/Xcode_27.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h /Applications/Xcode_27.0.0-rc.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h
--- /Applications/Xcode_27.0.0-beta6.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h	2026-08-10 04:01:47
+++ /Applications/Xcode_27.0.0-rc.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreMedia.framework/Headers/CoreMedia.h	2026-08-08 19:22:48
@@ -28,5 +28,6 @@
 #include <CoreMedia/CMMetadata.h>
 #if ! TARGET_OS_WINDOWS
 #include <CoreMedia/CMAudioClock.h>
+#include <CoreMedia/CMGenlockClock.h>
 #endif
 #include <CoreMedia/CMAudioDeviceClock.h>

Clone this wiki locally