Skip to content

CoreVideo macOS xcode16.0 b1

Rolf Bjarne Kvinge edited this page Jul 2, 2024 · 2 revisions

#CoreVideo.framework

Rolf

diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVBuffer.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVBuffer.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVBuffer.h	2024-04-13 14:56:42
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVBuffer.h	2024-05-30 04:46:49
@@ -100,7 +100,7 @@
     @discussion You can attach any CF object to a CVBuffer object to store additional information. CVBufferGetAttachment retrieves an attachement identified by a key.
     @param      buffer  Target CVBuffer object.
     @param      key	Key in form of a CFString identifying the desired attachment.
-    @param      attachmentMode.  Returns the mode of the attachment, if desired.  May be NULL.
+    @param      attachmentMode  Returns the mode of the attachment, if desired.  May be NULL.
     @result     If found the attachment object
 */
 CV_EXPORT CFTypeRef CV_NULLABLE CVBufferGetAttachment( CVBufferRef CV_NONNULL buffer, CFStringRef CV_NONNULL key, CVAttachmentMode * CV_NULLABLE attachmentMode )  API_DEPRECATED_WITH_REPLACEMENT("CVBufferCopyAttachment", macos(10.4, 12.0), ios(4.0,15.0), tvos(9.0, 15.0), watchos(4.0, 8.0));
@@ -165,7 +165,7 @@
     @discussion You can attach any CF object to a CVBuffer object to store additional information. CVBufferCopyAttachment retrieves a retained attachment identified by a key.
     @param      buffer  Target CVBuffer object.
     @param      key    Key in form of a CFString identifying the desired attachment.
-    @param      attachmentMode.  Returns the mode of the attachment, if desired.  May be NULL.
+    @param      attachmentMode  Returns the mode of the attachment, if desired.  May be NULL.
     @result     If found the attachment object, return the value; otherwize, return NULL.
 */
 CV_EXPORT CFTypeRef CV_NULLABLE CF_RETURNS_RETAINED CVBufferCopyAttachment( CVBufferRef CV_NONNULL buffer, CFStringRef CV_NONNULL key, CVAttachmentMode * CV_NULLABLE attachmentMode ) API_AVAILABLE(macos(12.0), ios(15.0), tvos(15.0), watchos(8.0));
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h	2024-04-13 20:58:53
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVDisplayLink.h	2024-05-30 02:55:29
@@ -48,45 +48,47 @@
 		CVOptionFlags * CV_NONNULL flagsOut ) CV_SWIFT_SENDABLE;
 #endif // __BLOCKS__
 
-CV_EXPORT CFTypeID CVDisplayLinkGetTypeID(void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+API_DEPRECATED_BEGIN("use NSView.displayLink(target:selector:), NSWindow.displayLink(target:selector:), or NSScreen.displayLink(target:selector:) ", macos(10.4, 15.0))
 
+CV_EXPORT CFTypeID CVDisplayLinkGetTypeID(void);
+
 /*!
     @function   CVDisplayLinkCreateWithCGDisplays
     @abstract   General call to create a CVDisplayLink
     @discussion Use this call to create a CVDisplayLink for a set of displays indentified by the CGDirectDisplayIDs.
     @param      displayArray array of CGDirectDisplayIDs
     @param      count   number of displays in the displayArray
-    @param      displayLisk The new display link will be returned here
+    @param      displayLinkOut The new display link will be returned here
     @result	returns kCVReturnSuccess on success.
 */
 CV_EXPORT CVReturn CVDisplayLinkCreateWithCGDisplays(
     CGDirectDisplayID * CV_NONNULL displayArray,
     CFIndex count,
-    CV_RETURNS_RETAINED_PARAMETER CVDisplayLinkRef CV_NULLABLE * CV_NONNULL displayLinkOut ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+    CV_RETURNS_RETAINED_PARAMETER CVDisplayLinkRef CV_NULLABLE * CV_NONNULL displayLinkOut );
 
 /*!
     @function   CVDisplayLinkCreateWithOpenGLDisplayMask
     @abstract   Convenience call to create a CVDisplayLink from an OpenGL display mask.
     @discussion Use this call to create a CVDisplayLink for a CGOpenGLDisplayMask.
     @param      mask CGOpenGLDisplayMask describing the display
-    @param      displayLisk The new display link will be returned here
+    @param      displayLinkOut The new display link will be returned here
     @result	returns kCVReturnSuccess on success.
 */
 CV_EXPORT CVReturn CVDisplayLinkCreateWithOpenGLDisplayMask(
     CGOpenGLDisplayMask mask,
-    CV_RETURNS_RETAINED_PARAMETER CVDisplayLinkRef CV_NULLABLE * CV_NONNULL displayLinkOut ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+    CV_RETURNS_RETAINED_PARAMETER CVDisplayLinkRef CV_NULLABLE * CV_NONNULL displayLinkOut );
 
 /*!
     @function   CVDisplayLinkCreateWithCGDisplay
     @abstract   Convenience call to create a CVDisplayLink for a single CGDirectDisplay.
     @discussion Use this call to create a CVDisplayLink for a single CGDirectDisplay.
     @param      displayID CGDirectDisplayID of the target display
-    @param      displayLisk The new display link will be returned here
+    @param      displayLinkOut The new display link will be returned here
     @result	returns kCVReturnSuccess on success.
 */
 CV_EXPORT CVReturn CVDisplayLinkCreateWithCGDisplay(
     CGDirectDisplayID displayID,
-    CV_RETURNS_RETAINED_PARAMETER CVDisplayLinkRef CV_NULLABLE * CV_NONNULL displayLinkOut ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+    CV_RETURNS_RETAINED_PARAMETER CVDisplayLinkRef CV_NULLABLE * CV_NONNULL displayLinkOut );
 
 /*!
     @function   CVDisplayLinkCreateWithActiveCGDisplays
@@ -95,7 +97,7 @@
     @result     kCVReturnSuccess if the device was created, or failure
 */
 CV_EXPORT CVReturn CVDisplayLinkCreateWithActiveCGDisplays(
-    CV_RETURNS_RETAINED_PARAMETER CVDisplayLinkRef CV_NULLABLE * CV_NONNULL displayLinkOut ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+    CV_RETURNS_RETAINED_PARAMETER CVDisplayLinkRef CV_NULLABLE * CV_NONNULL displayLinkOut );
 
 /*!
     @function   CVDisplayLinkSetCurrentCGDisplay
@@ -106,7 +108,7 @@
     @param      displayID target CGDirectDisplayID
     @result     CVReturn. kCVReturnSuccess if successfull.
 */
-CV_EXPORT CVReturn CVDisplayLinkSetCurrentCGDisplay( CVDisplayLinkRef CV_NONNULL displayLink, CGDirectDisplayID displayID ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVReturn CVDisplayLinkSetCurrentCGDisplay( CVDisplayLinkRef CV_NONNULL displayLink, CGDirectDisplayID displayID );
 
 /*!
     @function   CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext
@@ -119,7 +121,7 @@
 CV_EXPORT CVReturn CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(
 																  CVDisplayLinkRef CV_NONNULL displayLink,
 																  CGLContextObj CV_NONNULL cglContext,
-																  CGLPixelFormatObj CV_NONNULL cglPixelFormat) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+																  CGLPixelFormatObj CV_NONNULL cglPixelFormat);
 /*!
     @function   CVDisplayLinkGetCurrentCGDisplay
     @abstract   Gets the current display of a DisplayLink
@@ -127,7 +129,7 @@
     @param      displayLink target CVDisplayLinkRef
     @result     CGDirectDisplayID
 */
-CV_EXPORT CGDirectDisplayID CVDisplayLinkGetCurrentCGDisplay( CVDisplayLinkRef CV_NONNULL displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CGDirectDisplayID CVDisplayLinkGetCurrentCGDisplay( CVDisplayLinkRef CV_NONNULL displayLink );
 
 /*!
     @function   CVDisplayLinkSetOutputCallback
@@ -138,7 +140,7 @@
     @param	userInfo  User data for the callback to identify the context.
     @result     CVReturn. kCVReturnSuccess if successfull.
 */
-CV_EXPORT CVReturn CVDisplayLinkSetOutputCallback( CVDisplayLinkRef CV_NONNULL displayLink, CVDisplayLinkOutputCallback CV_NULLABLE callback, void * CV_NULLABLE userInfo ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVReturn CVDisplayLinkSetOutputCallback( CVDisplayLinkRef CV_NONNULL displayLink, CVDisplayLinkOutputCallback CV_NULLABLE callback, void * CV_NULLABLE userInfo );
 
 /*!
 	 @function   CVDisplayLinkSetOutputHandler
@@ -159,7 +161,7 @@
     @result     CVReturn. kCVReturnSuccess if successfull.
                 kCVReturnDisplayLinkCallbacksNotSet The DisplayLink cannot be started until the output callback is set.
 */
-CV_EXPORT CVReturn CVDisplayLinkStart( CVDisplayLinkRef CV_NONNULL displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVReturn CVDisplayLinkStart( CVDisplayLinkRef CV_NONNULL displayLink );
 
 /*!
     @function   CVDisplayLinkStop
@@ -168,7 +170,7 @@
     @param      displayLink target CVDisplayLinkRef
     @result     CVReturn. kCVReturnSuccess if successfull.
 */
-CV_EXPORT CVReturn CVDisplayLinkStop( CVDisplayLinkRef CV_NONNULL displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVReturn CVDisplayLinkStop( CVDisplayLinkRef CV_NONNULL displayLink );
 
 /*!
     @function   CVDisplayLinkGetNominalOutputVideoRefreshPeriod
@@ -177,7 +179,7 @@
     @param      displayLink The CVDisplayLink to get the refresh period from.
     @result     A CVTime struct that holds the nominal refresh period.    This value may be indefinite.
 */
-CV_EXPORT CVTime CVDisplayLinkGetNominalOutputVideoRefreshPeriod( CVDisplayLinkRef CV_NONNULL displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVTime CVDisplayLinkGetNominalOutputVideoRefreshPeriod( CVDisplayLinkRef CV_NONNULL displayLink );
 
 /*!
     @function   CVDisplayLinkGetOutputVideoLatency
@@ -186,7 +188,7 @@
     @param      displayLink The CVDisplayLink to get the latency period from.
     @result     A CVTime struct that holds the latency.   This value may be indefinite.
 */
-CV_EXPORT CVTime CVDisplayLinkGetOutputVideoLatency( CVDisplayLinkRef CV_NONNULL displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVTime CVDisplayLinkGetOutputVideoLatency( CVDisplayLinkRef CV_NONNULL displayLink );
 
 /*!
     @function   CVDisplayLinkGetActualOutputVideoRefreshPeriod
@@ -195,7 +197,7 @@
     @param      displayLink The CVDisplayLink to get the refresh period from.
     @result     A double containing the actual refresh period.   This value may be zero if the device is not running, or is otherwise unavailable.
 */
-CV_EXPORT double CVDisplayLinkGetActualOutputVideoRefreshPeriod( CVDisplayLinkRef CV_NONNULL displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT double CVDisplayLinkGetActualOutputVideoRefreshPeriod( CVDisplayLinkRef CV_NONNULL displayLink );
 
 /*!
     @function   CVDisplayLinkIsRunning
@@ -204,7 +206,7 @@
     @param      displayLink The CVDisplayLink to get the running state from.
     @result     A boolean describing the running state. It returns true if it is running and false if it is not running or the CVDisplayLink is invalid.
 */
-CV_EXPORT Boolean CVDisplayLinkIsRunning( CVDisplayLinkRef CV_NONNULL displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT Boolean CVDisplayLinkIsRunning( CVDisplayLinkRef CV_NONNULL displayLink );
 
 /*!
     @function   CVDisplayLinkGetCurrentTime
@@ -214,7 +216,7 @@
     @param      outTime A pointer to a CVTimeStamp struct.  This struct's version field must currently be set correctly (currently 0) to indicate which version of the timestamp struct is desired.
     @result     kCVReturnSuccess if the current time could be retrieved, otherwise an error indicating why the operation failed.
 */
-CV_EXPORT CVReturn CVDisplayLinkGetCurrentTime( CVDisplayLinkRef CV_NONNULL displayLink, CVTimeStamp * CV_NONNULL outTime ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVReturn CVDisplayLinkGetCurrentTime( CVDisplayLinkRef CV_NONNULL displayLink, CVTimeStamp * CV_NONNULL outTime );
 
 /*!
     @function   CVDisplayLinkTranslateTime
@@ -227,7 +229,7 @@
                 which representations to translate to.
     @result     kCVReturnSuccess if the time could be translated, otherwise an error indicating why the operation failed.
 */
-CV_EXPORT CVReturn CVDisplayLinkTranslateTime( CVDisplayLinkRef CV_NONNULL displayLink, const CVTimeStamp * CV_NONNULL inTime, CVTimeStamp * CV_NONNULL outTime ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVReturn CVDisplayLinkTranslateTime( CVDisplayLinkRef CV_NONNULL displayLink, const CVTimeStamp * CV_NONNULL inTime, CVTimeStamp * CV_NONNULL outTime );
 
 /*!
     @function   CVDisplayLinkRetain
@@ -236,7 +238,7 @@
     @param      displayLink target CVDisplayLinkRef.   NULL safe.
 	@result		If successfull the passed in dislplayLink
 */
-CV_EXPORT CVDisplayLinkRef CV_NULLABLE CVDisplayLinkRetain( CVDisplayLinkRef CV_NULLABLE displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT CVDisplayLinkRef CV_NULLABLE CVDisplayLinkRetain( CVDisplayLinkRef CV_NULLABLE displayLink );
 
 /*!
     @function   CVDisplayLinkRelease
@@ -244,7 +246,9 @@
     @discussion Use this call to release a CVDisplayLink.
     @param      displayLink target CVDisplayLinkRef.  NULL safe.
 */
-CV_EXPORT void CVDisplayLinkRelease( CV_RELEASES_ARGUMENT CVDisplayLinkRef CV_NULLABLE displayLink ) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
+CV_EXPORT void CVDisplayLinkRelease( CV_RELEASES_ARGUMENT CVDisplayLinkRef CV_NULLABLE displayLink );
+
+API_DEPRECATED_END
 
 #if defined(__cplusplus)
 }
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVImageBuffer.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVImageBuffer.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVImageBuffer.h	2024-03-22 19:42:43
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVImageBuffer.h	2024-05-30 04:55:26
@@ -183,7 +183,7 @@
 /*!
     @function   CVImageBufferIsFlipped
     @abstract   Returns whether the image is flipped vertically or not.
-    @param      CVImageBuffer target
+    @param      imageBuffer target
     @result     True if 0,0 in the texture is upper left, false if 0,0 is lower left.
 */
 CV_EXPORT Boolean CVImageBufferIsFlipped( CVImageBufferRef CV_NONNULL imageBuffer ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0);
@@ -227,12 +227,15 @@
 // CFData (8 bytes) containing big-endian data matching payload of Ambient Viewing Environment SEI message
 CV_EXPORT const CFStringRef CV_NONNULL kCVImageBufferAmbientViewingEnvironmentKey API_AVAILABLE(macosx(12.0), ios(15.0), tvos(15.0), watchos(8.0));
 
+// CFNumberRef integer value in millilux
+CV_EXPORT const CFStringRef CV_NONNULL kCVImageBufferSceneIlluminationKey API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+
 /*!
 	@constant    kCVImageBufferRegionOfInterestKey
 	@abstract
-		Specifies region of interest that image statistics cover. This value should be a CGRect dictionary created by CGRectCreateDictionaryRepresentation(). The origin in the CGRect represents the x,y coordinate within the CVPixelBuffer where region of interest is located.
+		Specifies region of interest that image statistics cover.
 	@discussion
-		
+		This value should be a CGRect dictionary created by CGRectCreateDictionaryRepresentation(). The origin in the CGRect represents the x,y coordinate within the CVPixelBuffer where region of interest is located.
 */
 CV_EXPORT const CFStringRef CV_NONNULL kCVImageBufferRegionOfInterestKey           API_AVAILABLE(macosx(12.0), ios(15.0), tvos(15.0), watchos(8.0));
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVMetalBuffer.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVMetalBuffer.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVMetalBuffer.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVMetalBuffer.h	2024-05-30 02:55:29
@@ -0,0 +1,59 @@
+/*
+ *  CVMetalBuffer.h
+ *  CoreVideo
+ *
+ *  Copyright (c) 2023 Apple Inc. All rights reserved.
+ */
+ 
+ /*! @header CVMetalBuffer.h
+	@copyright 2023 Apple Inc. All rights reserved.
+	@availability iOS 18.0 or later. mac 15.0 or later.
+    @discussion A CoreVideo Metal buffer derives from a buffer, and is used for supplying buffers to Metal.
+*/
+
+#if !defined(__COREVIDEO_CVMETALBUFFER_H__)
+#define __COREVIDEO_CVMETALBUFFER_H__ 1
+
+#include <CoreVideo/CVBase.h>
+#include <CoreVideo/CVReturn.h>
+#include <CoreVideo/CVImageBuffer.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <stddef.h>
+#include <stdint.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#if COREVIDEO_SUPPORTS_IOSURFACE && COREVIDEO_SUPPORTS_METAL
+
+/*!
+    @typedef    CVMetalBufferRef
+    @abstract   Metal buffer based CVPixelBuffer wrapped buffer
+    @discussion IMPORTANT NOTE: Clients should retain CVMetalBuffer objects until they are done using the contents in them.
+                Retaining a CVMetalBuffer is your way to indicate that you're still using the image in the buffer, and that it should not be recycled yet.
+*/
+typedef CVBufferRef CVMetalBufferRef CV_SWIFT_NONSENDABLE;
+    
+CV_EXPORT CFTypeID CVMetalBufferGetTypeID(void) API_AVAILABLE(macosx(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE(watchos);
+
+    
+#if defined(__OBJC__)
+@protocol MTLBuffer;
+/*!
+    @function   CVMetalBufferGetBuffer
+    @abstract   Returns the Metal MTLBuffer object of the CVMetalBufferRef
+    @param      buffer Target CVMetalBuffer
+    @result     Metal buffer
+*/
+CV_EXPORT id<MTLBuffer> CV_NULLABLE CVMetalBufferGetBuffer(CVMetalBufferRef CV_NONNULL buffer) API_AVAILABLE(macosx(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE(watchos);
+
+#endif // defined(__OBJC__)
+
+#endif // COREVIDEO_SUPPORTS_IOSURFACE && COREVIDEO_SUPPORTS_METAL
+	
+#if defined(__cplusplus)
+}
+#endif
+
+#endif
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVMetalBufferCache.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVMetalBufferCache.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVMetalBufferCache.h	1970-01-01 01:00:00
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVMetalBufferCache.h	2024-05-30 02:55:29
@@ -0,0 +1,98 @@
+/*
+ *  CVMetalBufferCache.h
+ *  CoreVideo
+ *
+ *  Copyright (c) 2023 Apple Inc. All rights reserved.
+ */
+
+/*! @header CVMetalBufferCache.h
+   @copyright 2023 Apple Inc. All rights reserved.
+   @availability iOS 18.0 or later. mac 15.0 or later.
+   @discussion A CoreVideo Metal buffer derives from a buffer, and is used for supplying buffers to Metal.
+*/
+
+#if !defined(__COREVIDEO__CVMETALBUFFERCACHE_H__)
+#define __COREVIDEO__CVMETALBUFFERCACHE_H__ 1
+
+#include <CoreVideo/CVBase.h>
+#include <CoreVideo/CVReturn.h>
+#include <CoreVideo/CVImageBuffer.h>
+#include <CoreVideo/CVMetalBuffer.h>
+
+#if COREVIDEO_SUPPORTS_IOSURFACE && COREVIDEO_SUPPORTS_METAL
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+// By default, buffers will age out after one second.
+// Setting a maximum buffer age of zero will disable the age-out mechanism completely.
+// CVMetalBufferCacheFlush() can be used to force eviction in either case.
+CV_EXPORT const CFStringRef CV_NONNULL kCVMetalBufferCacheMaximumBufferAgeKey API_AVAILABLE(macosx(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE(watchos);
+
+typedef struct CV_BRIDGED_TYPE(id) __CVMetalBufferCache *CVMetalBufferCacheRef CV_SWIFT_NONSENDABLE;
+
+CV_EXPORT CFTypeID CVMetalBufferCacheGetTypeID(void) API_AVAILABLE(macosx(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE(watchos);
+
+#if defined(__OBJC__)
+
+@protocol MTLDevice;
+    
+/*!
+    @function   CVMetalBufferCacheCreate
+    @abstract   Creates a new Buffer Cache.
+    @param      allocator The CFAllocatorRef to use for allocating the cache.  May be NULL.
+    @param      cacheAttributes A CFDictionaryRef containing the attributes of the cache itself. May be NULL.
+    @param      metalDevice The Metal device for which the buffer objects will be created.
+    @param      cacheOut   The newly created buffer cache will be placed here
+    @result     Returns kCVReturnSuccess on success
+*/
+CV_EXPORT CVReturn CVMetalBufferCacheCreate(
+    CFAllocatorRef CV_NULLABLE allocator,
+    CFDictionaryRef CV_NULLABLE cacheAttributes,
+    id<MTLDevice> CV_NONNULL metalDevice,
+    CV_RETURNS_RETAINED_PARAMETER CVMetalBufferCacheRef CV_NULLABLE * CV_NONNULL cacheOut
+) API_AVAILABLE(macosx(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE(watchos);
+
+#endif // __OBJC__
+
+/*!
+    @function   CVMetalBufferCacheCreateBuffer
+    @abstract   Creates a CVMetalBuffer object from an existing CVImageBuffer
+    @param      allocator The CFAllocatorRef to use for allocating the CVMetalBuffer object. May be NULL.
+    @param      bufferCache The buffer cache object that will manage the buffer.
+    @param      buffer The CVImageBuffer that you want to create a CVMetalBuffer from.
+    @param      bufferOut The newly created buffer object will be placed here.
+    @result     Returns kCVReturnSuccess on success
+    @discussion Creates or returns a cached CVMetalBuffer object mapped to the CVImageBuffer.
+                This creates a live binding between the CVImageBuffer and underlying CVMetalBuffer buffer object.
+ 
+                IMPORTANT NOTE: Clients should retain CVMetalBuffer objects until they are done using the images in them.
+                Retaining a CVMetalBuffer is your way to indicate that you're still using the image in the buffer, and that it should not be recycled yet.
+*/
+CV_EXPORT CVReturn CVMetalBufferCacheCreateBufferFromImage(
+    CFAllocatorRef CV_NULLABLE allocator,
+    CVMetalBufferCacheRef CV_NONNULL bufferCache,
+    CVImageBufferRef CV_NONNULL imageBuffer,
+    CV_RETURNS_RETAINED_PARAMETER CVMetalBufferRef CV_NULLABLE * CV_NONNULL bufferOut
+) API_AVAILABLE(macosx(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE(watchos);
+
+/*!
+    @function   CVMetalBufferCacheFlush
+    @abstract   Performs internal housekeeping/recycling operations
+    @discussion This call must be made periodically to give the buffer cache a chance to do internal housekeeping operations.
+    @param      bufferCache The buffer cache object to flush
+    @param      options Currently unused, set to 0.
+*/
+CV_EXPORT void CVMetalBufferCacheFlush(
+    CVMetalBufferCacheRef CV_NONNULL bufferCache,
+    CVOptionFlags options
+) API_AVAILABLE(macosx(15.0), ios(18.0), tvos(18.0)) API_UNAVAILABLE(watchos);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // COREVIDEO_SUPPORTS_IOSURFACE && COREVIDEO_SUPPORTS_METAL
+
+#endif // __COREVIDEO__CVMETALBUFFERCACHE_H__
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h	2024-04-13 13:56:20
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h	2024-05-30 10:28:16
@@ -62,6 +62,7 @@
   kCVPixelFormatType_32AlphaGray    = 'b32a',     /* 32 bit AlphaGray, 16-bit big-endian samples, black is zero */
   kCVPixelFormatType_16Gray         = 'b16g',     /* 16 bit Grayscale, 16-bit big-endian samples, black is zero */
   kCVPixelFormatType_30RGB          = 'R10k',     /* 30 bit RGB, 10-bit big-endian samples, 2 unused padding bits (at least significant end). */
+  kCVPixelFormatType_30RGB_r210     = 'r210',     /* 30 bit RGB, 10-bit big-endian samples, 2 unused padding bits (at most significant end), video-range (64-940). */
   kCVPixelFormatType_422YpCbCr8     = '2vuy',     /* Component Y'CbCr 8-bit 4:2:2, ordered Cb Y'0 Cr Y'1 */
   kCVPixelFormatType_4444YpCbCrA8   = 'v408',     /* Component Y'CbCrA 8-bit 4:4:4:4, ordered Cb Y' Cr A */
   kCVPixelFormatType_4444YpCbCrA8R  = 'r408',     /* Component Y'CbCrA 8-bit 4:4:4:4, rendering format. full range alpha, zero biased YUV, ordered A Y' Cb Cr */
@@ -145,12 +146,14 @@
 #endif
 {
 	kCVPixelFormatType_Lossless_32BGRA                               = '&BGA', /* Lossless-compressed form of kCVPixelFormatType_32BGRA. */
-	
+	kCVPixelFormatType_Lossless_64RGBAHalf                           = '&RhA', /* Lossless-compressed form of kCVPixelFormatType_64RGBAHalf.  No CVPlanarPixelBufferInfo struct. */
+
 	// Lossless-compressed Bi-planar YCbCr pixel format types
 	kCVPixelFormatType_Lossless_420YpCbCr8BiPlanarVideoRange         = '&8v0', /* Lossless-compressed form of kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange.  No CVPlanarPixelBufferInfo struct. */
 	kCVPixelFormatType_Lossless_420YpCbCr8BiPlanarFullRange          = '&8f0', /* Lossless-compressed form of kCVPixelFormatType_420YpCbCr8BiPlanarFullRange.  No CVPlanarPixelBufferInfo struct. */
 	kCVPixelFormatType_Lossless_420YpCbCr10PackedBiPlanarVideoRange  = '&xv0', /* Lossless-compressed-packed form of kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange.  No CVPlanarPixelBufferInfo struct. Format is compressed-packed with no padding bits between pixels. */
 	kCVPixelFormatType_Lossless_422YpCbCr10PackedBiPlanarVideoRange  = '&xv2', /* Lossless-compressed form of kCVPixelFormatType_422YpCbCr10BiPlanarVideoRange.  No CVPlanarPixelBufferInfo struct. Format is compressed-packed with no padding bits between pixels. */
+	kCVPixelFormatType_Lossless_420YpCbCr10PackedBiPlanarFullRange   = '&xf0', /* Lossless-compressed form of kCVPixelFormatType_420YpCbCr10BiPlanarFullRange.  No CVPlanarPixelBufferInfo struct. Format is compressed-packed with no padding bits between pixels. */
 };
 
 /*
@@ -337,7 +340,7 @@
     @function   CVPixelBufferRetain
     @abstract   Retains a CVPixelBuffer object
     @discussion Equivalent to CFRetain, but NULL safe
-    @param      buffer A CVPixelBuffer object that you want to retain.
+    @param      texture A CVPixelBuffer object that you want to retain.
     @result     A CVPixelBuffer object that is the same as the passed in buffer.
 */
 CV_EXPORT CVPixelBufferRef CV_NULLABLE CVPixelBufferRetain( CVPixelBufferRef CV_NULLABLE texture ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0);
@@ -346,7 +349,7 @@
     @function   CVPixelBufferRelease
     @abstract   Releases a CVPixelBuffer object
     @discussion Equivalent to CFRelease, but NULL safe
-    @param      buffer A CVPixelBuffer object that you want to release.
+    @param      texture A CVPixelBuffer object that you want to release.
 */
 CV_EXPORT void CVPixelBufferRelease( CV_RELEASES_ARGUMENT CVPixelBufferRef CV_NULLABLE texture ) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0);
 
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelFormatDescription.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelFormatDescription.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelFormatDescription.h	2024-04-13 12:56:23
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelFormatDescription.h	2024-05-30 02:55:29
@@ -21,7 +21,7 @@
 extern "C" {
 #endif
 
-/* This document is influenced by Ice Floe #19: http://developer.apple.com/quicktime/icefloe/dispatch019.html */
+/* This document is influenced by Ice Floe #19: https://developer.apple.com/library/archive/technotes/tn2162/_index.html */
 
 /* The canonical name for the format.  This should be the same as the codec name you'd use in QT */
 CV_EXPORT const CFStringRef CV_NONNULL kCVPixelFormatName __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0);
@@ -64,7 +64,7 @@
    level dictionary. */
 CV_EXPORT const CFStringRef CV_NONNULL kCVPixelFormatPlanes __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0);
 
-/* The following keys describe the requirements/layout of a a single image plane. */
+/* The following keys describe the requirements/layout of a single image plane. */
 
 /* Used to assist with allocating memory for pixel formats that don't have an integer value for
    bytes per pixel */
@@ -85,7 +85,10 @@
    bitsPerPixel value. */
 CV_EXPORT const CFStringRef CV_NONNULL kCVPixelFormatBitsPerBlock __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0);
 
-/* Used to state requirements on block multiples.  v210 would be '8' here for the horizontal case, 
+/* Indicates, if available, the logical bit depth of each component of the plane. */
+CV_EXPORT const CFStringRef CV_NONNULL kCVPixelFormatBitsPerComponent API_AVAILABLE(macos(15.0), ios(18.0), tvos(18.0), watchos(11.0), visionos(2.0));
+
+/* Used to state requirements on block multiples.  v210 would be '8' here for the horizontal case,
    to match the standard v210 row alignment value of 48.
    These may be assumed as 1 if not present. */
 CV_EXPORT const CFStringRef CV_NONNULL kCVPixelFormatBlockHorizontalAlignment __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0);
diff -ruN /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h
--- /Applications/Xcode_15.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h	2024-04-13 20:58:53
+++ /Applications/Xcode_16.0.0-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h	2024-05-30 02:55:28
@@ -56,6 +56,8 @@
 #if TARGET_OS_MAC
 #include <CoreVideo/CVMetalTexture.h>
 #include <CoreVideo/CVMetalTextureCache.h>
+#include <CoreVideo/CVMetalBuffer.h>
+#include <CoreVideo/CVMetalBufferCache.h>
 #endif
 #endif
 #endif
Clone this wiki locally