Skip to content

VideoToolbox iOS xcode14.0 beta1

Manuel de la Pena edited this page Sep 1, 2022 · 3 revisions

#VideoToolbox.framework https://github.com/xamarin/xamarin-macios/pull/15845

diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTCompressionProperties.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTCompressionProperties.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTCompressionProperties.h	2022-02-23 07:59:14.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTCompressionProperties.h	2022-05-31 15:02:54.000000000 -0400
@@ -293,6 +293,28 @@
 */
 VT_EXPORT const CFStringRef kVTCompressionPropertyKey_PrioritizeEncodingSpeedOverQuality API_AVAILABLE(macosx(11.0), ios(14.0), tvos(14.0)); // CFBoolean, Optional
 
+/*!
+	@constant	kVTCompressionPropertyKey_ConstantBitRate
+	@abstract
+		Requires that the encoder use a Constant Bit Rate algorithm.
+	@discussion
+		The property kVTCompressionPropertyKey_ExpectedFrameRate should be set along with kVTCompressionPropertyKey_ConstantBitRate
+		to ensure effective CBR rate control.
+
+		This property is not compatible with kVTCompressionPropertyKey_DataRateLimits and
+		kVTCompressionPropertyKey_AverageBitRate.
+
+		The encoder will pad the frame if they are smaller than they need to be based on the Constant BitRate. This
+		property is not recommended for general streaming or export scenarios. It is intended for interoperability with
+		stremaing CDNs which specifically require that data rates not drop even during low motion and activity scenes.
+
+		This is not supported in all encoders or in all encoder operating modes. kVTPropertyNotSupportedErr will be
+		returned when this option is not supported.
+
+*/
+VT_EXPORT const CFStringRef kVTCompressionPropertyKey_ConstantBitRate API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0)); // CFNumber bits per second, Optional
+
+
 #pragma mark Bitstream configuration
 
 /*!
@@ -553,6 +575,16 @@
 */
 VT_EXPORT const CFStringRef kVTCompressionPropertyKey_BaseLayerFrameRate API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0)); // Read/write, CFNumber, Optional
 
+/*!
+	 @constant	kVTCompressionPropertyKey_ReferenceBufferCount
+	 @abstract
+		The client will be able to control the the maximum allowed ReferenceBufferCount using this optional key.
+	 @discussion
+		This is typically used to force the encoder to use lower count than allowed by the stantard for a level/profile.
+		The encoder will fail and  report an error if the requested value exceeds the limit set by the standard for such a level/profile.
+*/
+VT_EXPORT const CFStringRef kVTCompressionPropertyKey_ReferenceBufferCount API_AVAILABLE(macos(13.0), ios(16.0), tvos(16.0), watchos(9.0)); // CFNumber, Optional
+
 
 #pragma mark Hardware acceleration
 #if !TARGET_OS_IPHONE
@@ -674,7 +706,8 @@
 			kVTCompressionPropertyKey_BaseLayerBitRateFraction
 			kVTCompressionPropertyKey_Quality
 			kVTCompressionPropertyKey_MaxAllowedFrameQP
-
+			kVTCompressionPropertyKey_MinAllowedFrameQP
+ 
 		If kVTEncodeFrameOptionKey_BaseFrameQP is used, it must be set for all frames in a session. The QP value specified is
 		frame-level but macro-block level QP may be modulated inside a frame. There will be no rate-control related frame dropping
 		if kVTEncodeFrameOptionKey_BaseFrameQP is used.
@@ -948,6 +981,18 @@
 VT_EXPORT const CFStringRef kVTCompressionPropertyKey_MaxAllowedFrameQP API_AVAILABLE(macosx(12.0), ios(15.0), tvos(15.0)); // Read/write, CFNumberRef, Optional
 
 /*!
+	@constant	kVTCompressionPropertyKey_MinAllowedFrameQP
+	@abstract
+		Specifies the minimum allowed encoded frame QP (Quantization Parameter).
+	@discussion
+		This is an optional parameter. Use it only when you have a specific requirement for the video quality and you are
+		familiar with frame QP. 
+		This is not supported in all encoders or in all encoder operating modes. kVTPropertyNotSupportedErr will be
+		returned when this option is not supported.
+*/
+VT_EXPORT const CFStringRef kVTCompressionPropertyKey_MinAllowedFrameQP API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0)); // Read/write, CFNumberRef, Optional
+
+/*!
 	@constant	kVTCompressionPropertyKey_EnableLTR
 	@abstract
 		Enable Long Term Reference (LTR) frames during encoding
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTCompressionSession.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTCompressionSession.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTCompressionSession.h	2022-02-23 07:59:13.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTCompressionSession.h	2022-06-03 18:06:53.000000000 -0400
@@ -114,7 +114,7 @@
 		If the video encoder cannot support the provided width and height it may change them.
 	@param	height
 		The height of frames in pixels.
-	@param	cType
+	@param	codecType
 		The codec type.
 	@param	encoderSpecification
 		Specifies a particular video encoder that must be used.  
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTErrors.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTErrors.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTErrors.h	2022-02-15 02:24:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTErrors.h	2022-05-28 00:44:47.000000000 -0400
@@ -3,7 +3,7 @@
 	
 	Framework:  VideoToolbox
  
-    Copyright 2006-2013 Apple Inc. All rights reserved.
+    Copyright 2006-2021 Apple Inc. All rights reserved.
   
 */
 
@@ -40,7 +40,8 @@
 	kVTVideoDecoderMalfunctionErr			= -12911, // c.f. -8960
 	kVTVideoEncoderMalfunctionErr			= -12912,
 	kVTVideoDecoderNotAvailableNowErr		= -12913,
-	kVTImageRotationNotSupportedErr			= -12914,
+	kVTImageRotationNotSupportedErr			= -12914, // deprecated
+	kVTPixelRotationNotSupportedErr			= -12914,
 	kVTVideoEncoderNotAvailableNowErr		= -12915,
 	kVTFormatDescriptionChangeNotSupportedErr	= -12916,
 	kVTInsufficientSourceColorDataErr		= -12917,
@@ -62,6 +63,7 @@
 	kVTVideoEncoderNeedsRosettaErr			= -17693,
 	kVTVideoDecoderReferenceMissingErr		= -17694,
 	kVTVideoDecoderCallbackMessagingErr		= -17695,
+	kVTVideoDecoderUnknownErr				= -17696,
 };
 
 /*!
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelRotationProperties.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelRotationProperties.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelRotationProperties.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelRotationProperties.h	2022-05-31 14:51:58.000000000 -0400
@@ -0,0 +1,75 @@
+/*
+	File:  VTPixelRotationProperties.h
+	
+	Framework:  VideoToolbox
+	
+	Copyright 2021 Apple Inc. All rights reserved.
+	
+	Standard properties for VTPixelRotationSession.
+*/
+
+#ifndef VTPIXELROTATIONPROPERTIES_H
+#define VTPIXELROTATIONPROPERTIES_H
+
+#include <CoreMedia/CMBase.h>
+#include <VideoToolbox/VTBase.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+    
+#pragma pack(push, 4)
+
+CM_ASSUME_NONNULL_BEGIN
+
+/*! 
+	@constant	kVTPixelRotationPropertyKey_Rotation
+	@abstract
+		Specifies the amount of rotation in degrees.
+	@discussion
+		Specifies the amount of rotation to apply when copying source to destination.
+		Valid values: kVTRotation_0, kVTRotation_CW90, kVTRotation_180, and kVTRotation_CCW90
+		default is kVTRotation_0.
+*/
+
+VT_EXPORT const CFStringRef kVTPixelRotationPropertyKey_Rotation API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+
+VT_EXPORT const CFStringRef kVTRotation_0 		API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+VT_EXPORT const CFStringRef kVTRotation_CW90	API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+VT_EXPORT const CFStringRef kVTRotation_180		API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+VT_EXPORT const CFStringRef kVTRotation_CCW90	API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+
+/*!
+	@constant	kVTPixelRotationPropertyKey_FlipHorizontalOrientation
+	@abstract
+		Specifies the horizontal flip.
+	@discussion
+		kVTPixelRotationPropertyKey_FlipHorizontalOrientation must pass a CFBoolean as value. true will apply a horizontal flip after the rotation.
+		default is false;
+*/
+
+VT_EXPORT const CFStringRef kVTPixelRotationPropertyKey_FlipHorizontalOrientation API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+
+/*!
+	@constant	kVTPixelRotationPropertyKey_FlipVerticalOrientation
+	@abstract
+		Specifies the vertical flip.
+	@discussion
+		kVTPixelRotationPropertyKey_FlipVerticalOrientation must pass a CFBoolean as value. true will apply a vertical flip after the rotation.
+		default is false;
+*/
+
+VT_EXPORT const CFStringRef kVTPixelRotationPropertyKey_FlipVerticalOrientation API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+
+CM_ASSUME_NONNULL_END
+
+#pragma pack(pop)
+    
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // VTPIXELROTATIONPROPERTIES_H
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelRotationSession.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelRotationSession.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelRotationSession.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelRotationSession.h	2022-05-31 14:49:31.000000000 -0400
@@ -0,0 +1,109 @@
+/*
+	File:  VTPixelRotationSession.h
+ 
+	Framework:  VideoToolbox
+ 
+	Copyright 2021 Apple Inc. All rights reserved.
+ 
+*/
+
+#ifndef _VT_PIXELROTATIONSESSION_H_
+#define _VT_PIXELROTATIONSESSION_H_
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreVideo/CoreVideo.h>
+#include <CoreMedia/CMBase.h>
+#include <VideoToolbox/VTBase.h>
+#include <VideoToolbox/VTSession.h>
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+    
+#pragma pack(push, 4)
+
+/*!
+	@typedef	VTPixelRotationSessionRef
+	@abstract	A reference to a Video Toolbox Pixel Rotation Session.
+	@discussion
+		A pixel rotation session supports the rotating of images from source CVPixelBuffers to
+		destination CVPixelBuffers.  The session reference is a reference-counted CF object.
+		To create an image rotation session, call VTPixelRotationSessionCreate;
+		then you can optionally configure the session using VTSessionSetProperty;
+		then to transfer pixels, call VTPixelRotationSessionRotateImage.
+		When you are done with the session, you should call CFRelease to tear it down
+		and release your object reference.
+ */
+
+typedef struct CM_BRIDGED_TYPE(id) OpaqueVTPixelRotationSession*  VTPixelRotationSessionRef;
+
+/*!
+	@function	VTPixelRotationSessionCreate
+	@abstract	Creates a session for rotating images between CVPixelBuffers.
+	@param	allocator
+		An allocator for the session.  Pass NULL to use the default allocator.
+	@param	pixelRotationSessionOut
+		Points to a variable to receive the new pixel rotation session.
+*/
+VT_EXPORT OSStatus
+VTPixelRotationSessionCreate(
+	CM_NULLABLE CFAllocatorRef														 allocator,
+	CM_RETURNS_RETAINED_PARAMETER CM_NULLABLE VTPixelRotationSessionRef * CM_NONNULL pixelRotationSessionOut) API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+
+/*!
+	@function	VTPixelRotationSessionInvalidate
+	@abstract	Tears down a pixel rotation session.
+    @discussion 
+    	When you are done with an image rotation session you created, call VTPixelRotationSessionInvalidate
+    	to tear it down and then VTPixelRotationSessionRelease to release your object reference.
+    	When an pixel rotation session's retain count reaches zero, it is automatically invalidated, but
+    	since sessions may be retained by multiple parties, it can be hard to predict when this will happen.
+    	Calling VTPixelRotationSessionInvalidate ensures a deterministic, orderly teardown.
+*/
+VT_EXPORT void
+VTPixelRotationSessionInvalidate( CM_NONNULL VTPixelRotationSessionRef session ) API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+
+/*!
+	@function VTPixelRotationSessionGetTypeID
+	@abstract Returns the CFTypeID for pixel rotation sessions.
+*/
+VT_EXPORT CFTypeID
+VTPixelRotationSessionGetTypeID(void) API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+
+/*!
+	@function	VTPixelRotationSessionRotateImage
+	@abstract	Rotates a pixel buffer.
+	@discussion
+		Rotates sourceBuffer and places the output in destinationBuffer.
+		For 90 and 270 degree rotations, the width and height of destinationBuffer must be the inverse
+		of sourceBuffer.
+		For 180 degree rotations, the width and height of destinationBuffer and sourceBuffer must match.
+		By default, all existing attachments on destinationBuffer are removed and new attachments
+		are set describing the transferred image.  Unrecognised attachments on sourceBuffer will 
+		be propagated to destinationBuffer.
+		Some properties may modify this behaviour; see VTPixelRotationProperties.h for more details.
+	@param	session
+		The pixel rotation session.
+	@param	sourceBuffer
+		The source buffer.
+	@param	destinationBuffer
+		The destination buffer.  
+	@result
+		If the transfer was successful, noErr; otherwise an error code, such as kVTPixelRotationNotSupportedErr.
+*/
+VT_EXPORT OSStatus
+VTPixelRotationSessionRotateImage(
+	CM_NONNULL VTPixelRotationSessionRef       session,
+	CM_NONNULL CVPixelBufferRef                sourceBuffer,
+	CM_NONNULL CVPixelBufferRef                destinationBuffer) API_AVAILABLE(macosx(13.0), ios(16.0), tvos(16.0), watchos(9.0));
+
+// See VTSession.h for property access APIs on VTPixelRotationSession.
+
+#pragma pack(pop)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // _VT_PIXELROTATIONSESSION_H_
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelTransferProperties.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelTransferProperties.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelTransferProperties.h	2022-02-23 07:09:45.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelTransferProperties.h	2022-05-31 15:02:54.000000000 -0400
@@ -31,6 +31,8 @@
 	#if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
 		#define VT_SUPPORT_COLORSYNC_PIXEL_TRANSFER COREMEDIA_TRUE
 	#endif
+#elif TARGET_OS_LINUX_CLOUD
+	#define VT_SUPPORT_COLORSYNC_PIXEL_TRANSFER COREMEDIA_TRUE
 #endif
 #endif
 #ifndef VT_SUPPORT_COLORSYNC_PIXEL_TRANSFER
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelTransferSession.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelTransferSession.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelTransferSession.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTPixelTransferSession.h	2022-06-03 18:06:54.000000000 -0400
@@ -0,0 +1,141 @@
+/*
+	File:  VTPixelTransferSession.h
+	
+	Framework:  VideoToolbox
+ 
+    Copyright 2006-2013 Apple Inc. All rights reserved.
+  
+	Video Toolbox client API for transferring images between CVPixelBuffers.
+*/
+
+#ifndef VTPIXELTRANSFERSESSION_H
+#define VTPIXELTRANSFERSESSION_H
+
+#include <CoreMedia/CMBase.h>
+#include <VideoToolbox/VTBase.h>
+
+#include <CoreFoundation/CoreFoundation.h>
+#include <CoreVideo/CoreVideo.h>
+
+#include <VideoToolbox/VTSession.h>
+#include <VideoToolbox/VTPixelTransferProperties.h>
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+    
+#pragma pack(push, 4)
+
+/*!
+	@typedef	VTPixelTransferSessionRef
+	@abstract	A reference to a Video Toolbox Pixel Transfer Session.
+	@discussion
+		A pixel transfer session supports the copying and/or conversion of 
+		images from source CVPixelBuffers to destination CVPixelBuffers.
+		The session reference is a reference-counted CF object.
+		To create a pixel transfer session, call VTPixelTransferSessionCreate; 
+		then you can optionally configure the session using VTSessionSetProperty;
+		then to transfer pixels, call VTPixelTransferSessionTransferImage.
+		When you are done with the session, you should call VTPixelTransferSessionInvalidate
+		to tear it down and CFRelease to release your object reference.
+ */
+
+typedef struct CM_BRIDGED_TYPE(id) OpaqueVTPixelTransferSession*  VTPixelTransferSessionRef;
+
+/*!
+	@function	VTPixelTransferSessionCreate
+	@abstract	Creates a session for transferring images between CVPixelBuffers.
+    @discussion 
+		The function creates a session for transferring images between CVPixelBuffers. 
+	@param	allocator
+		An allocator for the session.  Pass NULL to use the default allocator.
+	@param	pixelTransferSessionOut
+		Points to a variable to receive the new pixel transfer session.
+	
+*/
+VT_EXPORT OSStatus 
+VTPixelTransferSessionCreate(
+  CM_NULLABLE CFAllocatorRef							allocator,
+  CM_RETURNS_RETAINED_PARAMETER CM_NULLABLE VTPixelTransferSessionRef * CM_NONNULL pixelTransferSessionOut) VT_AVAILABLE_STARTING(10_8);
+
+#if defined(__swift__) && __swift__
+static inline OSStatus CF_SWIFT_NAME(VTPixelTransferSessionCreate(_:_:))
+_VTPixelTransferSessionCreate_shim(
+  CM_NULLABLE CFAllocatorRef	                                                   allocator,
+  CM_RETURNS_RETAINED_PARAMETER CM_NULLABLE VTPixelTransferSessionRef * CM_NONNULL pixelTransferSessionOut)
+{
+   return VTPixelTransferSessionCreate(allocator, pixelTransferSessionOut);
+}
+#endif
+
+CF_IMPLICIT_BRIDGING_ENABLED
+	
+/*!
+	@function	VTPixelTransferSessionInvalidate
+	@abstract	Tears down a pixel transfer session.
+    @discussion 
+    	When you are done with a pixel transfer session you created, call VTPixelTransferSessionInvalidate 
+    	to tear it down and then CFRelease to release your object reference.
+    	When a pixel transfer session's retain count reaches zero, it is automatically invalidated, but 
+    	since sessions may be retained by multiple parties, it can be hard to predict when this will happen.
+    	Calling VTPixelTransferSessionInvalidate ensures a deterministic, orderly teardown.
+*/
+VT_EXPORT void 
+VTPixelTransferSessionInvalidate( CM_NONNULL VTPixelTransferSessionRef session ) VT_AVAILABLE_STARTING(10_8);
+
+/*!
+	@function VTPixelTransferSessionGetTypeID
+	@abstract Returns the CFTypeID for pixel transfer sessions.  
+*/
+VT_EXPORT CFTypeID 
+VTPixelTransferSessionGetTypeID(void) VT_AVAILABLE_STARTING(10_8);
+
+/*!
+	@function	VTPixelTransferSessionTransferImage
+	@abstract	Copies and/or converts an image from one pixel buffer to another.
+	@discussion
+		By default, the full width and height of sourceBuffer are scaled to the full 
+		width and height of destinationBuffer.  
+		By default, all existing attachments on destinationBuffer are removed and new attachments
+		are set describing the transferred image.  Unrecognised attachments on sourceBuffer will 
+		be propagated to destinationBuffer.
+		Some properties will modify this behaviour; see VTPixelTransferProperties.h for more details.
+	@param	session
+		The pixel transfer session.
+	@param	sourceBuffer
+		The source buffer.
+	@param	destinationBuffer
+		The destination buffer.  
+	@result
+		If the transfer was successful, noErr; otherwise an error code, such as kVTPixelTransferNotSupportedErr.
+*/
+VT_EXPORT OSStatus
+VTPixelTransferSessionTransferImage(
+  CM_NONNULL VTPixelTransferSessionRef       session,
+  CM_NONNULL CVPixelBufferRef                sourceBuffer,
+  CM_NONNULL CVPixelBufferRef                destinationBuffer) VT_AVAILABLE_STARTING(10_8);
+
+#if defined(__swift__) && __swift__
+static inline OSStatus CF_SWIFT_NAME(VTPixelTransferSessionTransferImage(_:_:_:))
+_VTPixelTransferSessionTransferImage_shim(
+  CM_NONNULL VTPixelTransferSessionRef       session,
+  CM_NONNULL CVPixelBufferRef                sourceBuffer,
+  CM_NONNULL CVPixelBufferRef                destinationBuffer )
+{
+   return VTPixelTransferSessionTransferImage(session, sourceBuffer, destinationBuffer);
+}
+#endif
+	
+CF_IMPLICIT_BRIDGING_DISABLED
+
+// See VTSession.h for property access APIs on VTPixelTransferSessions.
+// See VTPixelTransferProperties.h for standard property keys and values for pixel transfer sessions.
+    
+#pragma pack(pop)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif // VTPIXELTRANSFERSESSION_H
diff -ruN /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VideoToolbox.h /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VideoToolbox.h
--- /Applications/Xcode_13.3.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VideoToolbox.h	2022-02-15 02:24:00.000000000 -0500
+++ /Applications/Xcode_14.0.0-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VideoToolbox.h	2022-05-28 00:46:50.000000000 -0400
@@ -1,6 +1,6 @@
 /* VideoToolbox.h
 
-   Copyright (c) 2008-2014 Apple Computer, Inc.
+   Copyright (c) 2008-2022 Apple Computer, Inc.
    All rights reserved. */
 
 #include <VideoToolbox/VTCompressionProperties.h>
@@ -14,7 +14,11 @@
 #include <VideoToolbox/VTVideoEncoderList.h>
 #include <VideoToolbox/VTUtilities.h>
 #include <VideoToolbox/VTPixelTransferProperties.h>
-#if !TARGET_OS_IPHONE
 #include <VideoToolbox/VTPixelTransferSession.h>
+#include <VideoToolbox/VTPixelRotationProperties.h>
+#include <VideoToolbox/VTPixelRotationSession.h>
+#if !TARGET_OS_IPHONE
 #include <VideoToolbox/VTProfessionalVideoWorkflow.h>
 #endif // !TARGET_OS_IPHONE
+
+
Clone this wiki locally