diff --git a/docs/api/VideoToolbox.VTCompressionSession/VTCompressionOutputCallback.xml b/docs/api/VideoToolbox.VTCompressionSession/VTCompressionOutputCallback.xml deleted file mode 100644 index 81d7228d4e46..000000000000 --- a/docs/api/VideoToolbox.VTCompressionSession/VTCompressionOutputCallback.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - The token passed to  method - Status code indicating if the operation was successful or not. - Contains information about the encoding operation.  - Contains a pointer to the encoded buffer if successful and the frame was not dropped.  A value of null indicates either an error, or that the frame was dropped. - Handler prototype to be called for each compressed frame - The methods invoked as a result of calling  will be invoked for each frame in decode order, not necessarily the display order. - - \ No newline at end of file diff --git a/docs/api/VideoToolbox/VTCompressionSession.xml b/docs/api/VideoToolbox/VTCompressionSession.xml deleted file mode 100644 index fb2e3e53b568..000000000000 --- a/docs/api/VideoToolbox/VTCompressionSession.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - If set to , the method is invoked directly and will dispose managed and unmanaged resources; If set to the method is being called by the garbage collector finalizer and should only release unmanaged resources. - - Releases the resources used by the VTCompressionSession object. - - This Dispose method releases the resources used by the VTCompressionSession class. - This method is called by both the Dispose() method and the object finalizer (Finalize). When invoked by the Dispose method, the parameter disposing is set to and any managed object references that this object holds are also disposed or released; when invoked by the object finalizer, on the finalizer thread the value is set to . - Calling the Dispose method when the application is finished using the VTCompressionSession ensures that all external resources used by this managed object are released as soon as possible. Once developers have invoked the Dispose method, the object is no longer useful and developers should no longer make any calls to it. - For more information on how to override this method and on the Dispose/IDisposable pattern, read the ``Implementing a Dispose Method'' document at https://msdn.microsoft.com/en-us/library/fs2xkftw.aspx - - - \ No newline at end of file diff --git a/docs/api/VideoToolbox/VTDecompressionSession.xml b/docs/api/VideoToolbox/VTDecompressionSession.xml deleted file mode 100644 index 776d26e1c880..000000000000 --- a/docs/api/VideoToolbox/VTDecompressionSession.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - If set to , the method is invoked directly and will dispose managed and unmanaged resources; If set to the method is being called by the garbage collector finalizer and should only release unmanaged resources. - - Releases the resources used by the VTDecompressionSession object. - - This Dispose method releases the resources used by the VTDecompressionSession class. - This method is called by both the Dispose() method and the object finalizer (Finalize). When invoked by the Dispose method, the parameter disposing is set to and any managed object references that this object holds are also disposed or released; when invoked by the object finalizer, on the finalizer thread the value is set to . - Calling the Dispose method when the application is finished using the VTDecompressionSession ensures that all external resources used by this managed object are released as soon as possible. Once developers have invoked the Dispose method, the object is no longer useful and developers should no longer make any calls to it. - For more information on how to override this method and on the Dispose/IDisposable pattern, read the ``Implementing a Dispose Method'' document at https://msdn.microsoft.com/en-us/library/fs2xkftw.aspx - - - \ No newline at end of file diff --git a/src/CoreMedia/CMFormatDescription.cs b/src/CoreMedia/CMFormatDescription.cs index b459657fd609..449a7a992075 100644 --- a/src/CoreMedia/CMFormatDescription.cs +++ b/src/CoreMedia/CMFormatDescription.cs @@ -770,6 +770,44 @@ public bool VideoMatchesImageBuffer (CVImageBuffer imageBuffer) return arr; } + + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("tvos17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [DllImport (Constants.CoreMediaLibrary)] + unsafe static extern /* OSStatus */ CMFormatDescriptionError CMVideoFormatDescriptionCopyTagCollectionArray ( + IntPtr /* CMVideoFormatDescriptionRef CM_NONNULL */ formatDescription, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CFArrayRef CM_NULLABLE * */ tagCollectionsOut); + + /// Get any multi-image properties as an array of values. + /// Upon output, and if successful, the format description's array of values. + /// if succcessful, or an error code otherwise. + public CMFormatDescriptionError GetTagCollections (out CMTagCollection []? tagCollections) + { + IntPtr array; + CMFormatDescriptionError rv; + + tagCollections = null; + + unsafe { + rv = CMVideoFormatDescriptionCopyTagCollectionArray (GetCheckedHandle (), &array); + } + + if (rv == CMFormatDescriptionError.None) + tagCollections = CFArray.ArrayFromHandleFunc (array, (h) => new CMTagCollection (h, false), releaseHandle: true)!; + + return rv; + } + + /// Get any multi-image properties as an array of values. + public CMTagCollection []? TagCollections { + get { + GetTagCollections (out var tagCollections); + return tagCollections; + } + } + #endif } } diff --git a/src/CoreMedia/CoreMedia.cs b/src/CoreMedia/CoreMedia.cs index 009cdb56b16e..750bbcd84437 100644 --- a/src/CoreMedia/CoreMedia.cs +++ b/src/CoreMedia/CoreMedia.cs @@ -281,5 +281,11 @@ public CMVideoDimensions (int width, int height) Width = width; Height = height; } + + /// + public override string ToString () + { + return $"[{Width}, {Height}]"; + } } } diff --git a/src/Foundation/NSIndexSet.cs b/src/Foundation/NSIndexSet.cs index 005ea5488529..64d92d5a5d23 100644 --- a/src/Foundation/NSIndexSet.cs +++ b/src/Foundation/NSIndexSet.cs @@ -22,8 +22,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if MONOMAC - using System; using System.Reflection; using System.Collections; @@ -35,10 +33,6 @@ namespace Foundation { public partial class NSIndexSet : IEnumerable, IEnumerable { - - /// To be added. - /// To be added. - /// To be added. IEnumerator IEnumerable.GetEnumerator () { if (this.Count == 0) @@ -63,9 +57,8 @@ public IEnumerator GetEnumerator () } } - /// To be added. - /// To be added. - /// To be added. + /// Get all the indices in this index set as an array. + /// An array of all the indices in this index set. public nuint [] ToArray () { nuint [] indexes = new nuint [Count]; @@ -81,7 +74,7 @@ public nuint [] ToArray () return indexes; } - internal T [] ToInt64EnumArray () where T: System.Enum + internal T [] ToInt64EnumArray () where T : System.Enum { var array = ToArray (); var rv = new T [array.Length]; @@ -90,7 +83,7 @@ internal T [] ToInt64EnumArray () where T: System.Enum return rv; } - internal HashSet ToInt64EnumHashSet () where T: System.Enum + internal HashSet ToInt64EnumHashSet () where T : System.Enum { var array = ToArray (); var rv = new HashSet (); @@ -99,10 +92,9 @@ internal HashSet ToInt64EnumHashSet () where T: System.Enum return rv; } - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Create a new instance from an array of indices. + /// The indices to add to the new . + /// A new with the specified indices. public static NSIndexSet FromArray (nuint [] items) { if (items is null) @@ -114,10 +106,9 @@ public static NSIndexSet FromArray (nuint [] items) return indexSet; } - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Create a new instance from an array of indices. + /// The indices to add to the new . + /// A new with the specified indices. public static NSIndexSet FromArray (uint [] items) { if (items is null) @@ -129,10 +120,9 @@ public static NSIndexSet FromArray (uint [] items) return indexSet; } - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Create a new instance from an array of indices. + /// The indices to add to the new . + /// A new with the specified indices. public static NSIndexSet FromArray (int [] items) { if (items is null) @@ -147,13 +137,16 @@ public static NSIndexSet FromArray (int [] items) return indexSet; } - /// To be added. - /// To be added. - /// To be added. + /// Create a new instance with the specified index. + /// The index to add to the new . + /// A new with the specified index. public NSIndexSet (uint value) : this ((nuint) value) { } + /// Create a new instance with the specified index. + /// The index to add to the new . + /// A new with the specified index. public NSIndexSet (nint value) : this ((nuint) value) { if (value < 0) @@ -161,9 +154,9 @@ public NSIndexSet (nint value) : this ((nuint) value) // init done by the base ctor } - /// To be added. - /// To be added. - /// To be added. + /// Create a new instance with the specified index. + /// The index to add to the new . + /// A new with the specified index. public NSIndexSet (int value) : this ((nuint) (uint) value) { if (value < 0) @@ -172,5 +165,3 @@ public NSIndexSet (int value) : this ((nuint) (uint) value) } } } - -#endif diff --git a/src/VideoToolbox/VTCompressionSession.cs b/src/VideoToolbox/VTCompressionSession.cs index edf0a7bd1342..a8e88e6dad6f 100644 --- a/src/VideoToolbox/VTCompressionSession.cs +++ b/src/VideoToolbox/VTCompressionSession.cs @@ -8,6 +8,7 @@ // Copyright 2014 Xamarin Inc. // using System; +using System.ComponentModel; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -34,7 +35,6 @@ internal VTCompressionSession (NativeHandle handle, bool owns) : base (handle, o { } - /// protected override void Dispose (bool disposing) { if (Handle != IntPtr.Zero) @@ -46,45 +46,40 @@ protected override void Dispose (bool disposing) base.Dispose (disposing); } - // sourceFrame: It seems it's only used as a parameter to be passed into EncodeFrame so no need to strong type it - /// + /// A delegate that will be called for each compressed frame. + /// The token passed starting the encoding operation. + /// Status code indicating if the operation was successful or not. + /// Contains information about the encoding operation. + /// Contains a pointer to the encoded buffer if successful and the frame was not dropped. A value indicates either an error, or that the frame was dropped. + /// The delegate will be called in the order the frames are decoded, which is not necessarily the same as the display order. public delegate void VTCompressionOutputCallback (/* void* */ IntPtr sourceFrame, /* OSStatus */ VTStatus status, VTEncodeInfoFlags flags, CMSampleBuffer? buffer); - static void CompressionCallback (IntPtr outputCallbackClosure, IntPtr sourceFrame, VTStatus status, VTEncodeInfoFlags infoFlags, IntPtr cmSampleBufferPtr, bool owns) - { - var gch = GCHandle.FromIntPtr (outputCallbackClosure); - var func = (VTCompressionOutputCallback) gch.Target!; - if (cmSampleBufferPtr == IntPtr.Zero) { - func (sourceFrame, status, infoFlags, null); - } else { - using (var sampleBuffer = new CMSampleBuffer (cmSampleBufferPtr, owns: owns)) - func (sourceFrame, status, infoFlags, sampleBuffer); - } - } - + /// Create a new compression session /// Frame width in pixels. - /// Frame height in pixels. - /// Encoder to use to compress the frames. - /// Method that will be invoked to process a compressed frame.  See the delegate type for more information on the received parameters. - /// Parameters to choose the encoder, or null to let VideoToolbox choose it. - /// The Dictionary property extracted from a  type, or an NSDictionary with the desired CoreVideo Pixel Buffer Attributes values. - /// Creates a compression session - /// To be added. - /// The  will be invoked for each frame in decode order, not necessarily the display order. + /// Frame height in pixels. + /// Encoder to use to compress the frames. + /// A callback that will be invoked to process a compressed frame. See the delegate type for more information on the received parameters. + /// Parameters to choose the encoder, or to let VideoToolbox choose it. + /// Any additional attributes for the compressed data. + /// A new if successful, otherwise. + /// The callback will be invoked for each frame in decode order, not necessarily the display order. public static VTCompressionSession? Create (int width, int height, CMVideoCodecType codecType, VTCompressionOutputCallback compressionOutputCallback, VTVideoEncoderSpecification? encoderSpecification = null, // hardware acceleration is default behavior on iOS. no opt-in required. NSDictionary? sourceImageBufferAttributes = null) { unsafe { - return Create (width, height, codecType, compressionOutputCallback, encoderSpecification, sourceImageBufferAttributes, &NewCompressionCallback); + return Create (width, height, codecType, compressionOutputCallback, encoderSpecification, sourceImageBufferAttributes, &CompressionCallback); } } [UnmanagedCallersOnly] - static void NewCompressionCallback (IntPtr outputCallbackClosure, IntPtr sourceFrame, VTStatus status, VTEncodeInfoFlags infoFlags, IntPtr cmSampleBufferPtr) + static void CompressionCallback (IntPtr outputCallbackClosure, IntPtr sourceFrame, VTStatus status, VTEncodeInfoFlags infoFlags, IntPtr cmSampleBufferPtr) { - CompressionCallback (outputCallbackClosure, sourceFrame, status, infoFlags, cmSampleBufferPtr, false); + var gch = GCHandle.FromIntPtr (outputCallbackClosure); + var func = (VTCompressionOutputCallback) gch.Target!; + using var sampleBuffer = cmSampleBufferPtr == IntPtr.Zero ? null : new CMSampleBuffer (cmSampleBufferPtr, owns: false); + func (sourceFrame, status, infoFlags, sampleBuffer); } [DllImport (Constants.VideoToolboxLibrary)] @@ -100,24 +95,15 @@ unsafe extern static VTStatus VTCompressionSessionCreate ( /* void* */ IntPtr outputCallbackClosure, /* VTCompressionSessionRef* */ IntPtr* compressionSessionOut); -#if false // Disabling for now until we have some tests on this - public static VTCompressionSession? Create (int width, int height, CMVideoCodecType codecType, - VTVideoEncoderSpecification? encoderSpecification = null, - NSDictionary? sourceImageBufferAttributes = null) - { - return Create (width, height, codecType, null, - encoderSpecification, sourceImageBufferAttributes); - } -#endif - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Create a new compression session + /// Frame width in pixels. + /// Frame height in pixels. + /// Encoder to use to compress the frames. + /// A callback that will be invoked to process a compressed frame. See the delegate type for more information on the received parameters. + /// Parameters to choose the encoder, or to let VideoToolbox choose it. + /// Any additional attributes for the compressed data. + /// A new if successful, otherwise. + /// The callback will be invoked for each frame in decode order, not necessarily the display order. public static VTCompressionSession? Create (int width, int height, CMVideoCodecType codecType, VTCompressionOutputCallback compressionOutputCallback, VTVideoEncoderSpecification? encoderSpecification, // hardware acceleration is default behavior on iOS. no opt-in required. @@ -164,9 +150,8 @@ unsafe extern static VTStatus VTCompressionSessionCreate ( [DllImport (Constants.VideoToolboxLibrary)] extern static IntPtr /* cvpixelbufferpoolref */ VTCompressionSessionGetPixelBufferPool (IntPtr handle); - /// To be added. - /// To be added. - /// To be added. + /// Get the pixel buffer pool for this compression session. + /// The pixel buffer pool for this compression session. public CVPixelBufferPool? GetPixelBufferPool () { var ret = VTCompressionSessionGetPixelBufferPool (GetCheckedHandle ()); @@ -184,9 +169,9 @@ unsafe extern static VTStatus VTCompressionSessionCreate ( [DllImport (Constants.VideoToolboxLibrary)] extern static VTStatus VTCompressionSessionPrepareToEncodeFrames (IntPtr handle); - /// To be added. - /// To be added. - /// To be added. + /// Prepare to encode frames. + /// if successful, or an error code otherwise. + /// Calling this method before starting an encoding operation is optional. [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] @@ -206,6 +191,11 @@ unsafe extern static VTStatus VTCompressionSessionEncodeFrame ( /* void* */ IntPtr sourceFrame, /* VTEncodeInfoFlags */ VTEncodeInfoFlags* flags); +#if !XAMCORE_5_0 + // The 'sourceFrame' parameter is just a user-provided value, it's not tied to any particular type/object. + // In this overload it's typed as 'CVImageBuffer', which doesn't make much sense - thus remove this overload when we can. + [Obsolete ("Call 'EncodeFrame(CVImageBuffer,CMTime,CMTime,NSDictionary,IntPtr,out VTEncodeInfoFlags)' instead.")] + [EditorBrowsable (EditorBrowsableState.Never)] public VTStatus EncodeFrame (CVImageBuffer imageBuffer, CMTime presentationTimestamp, CMTime duration, NSDictionary frameProperties, CVImageBuffer sourceFrame, out VTEncodeInfoFlags infoFlags) { @@ -216,18 +206,18 @@ public VTStatus EncodeFrame (CVImageBuffer imageBuffer, CMTime presentationTimes GC.KeepAlive (sourceFrame); return status; } +#endif - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Encode a video frame. + /// The image buffer with the image data to compress. + /// The presentation timestamp for this frame. + /// The duration of this frame. + /// Any frame properties for this frame. + /// This value will be passed to the callback that was specified when the compression session was created. + /// Upon return, any information flags from the encoder for this frame. + /// if successful, or an error code otherwise. public VTStatus EncodeFrame (CVImageBuffer imageBuffer, CMTime presentationTimestamp, CMTime duration, - NSDictionary frameProperties, IntPtr sourceFrame, out VTEncodeInfoFlags infoFlags) + NSDictionary? frameProperties, IntPtr sourceFrame, out VTEncodeInfoFlags infoFlags) { if (imageBuffer is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (imageBuffer)); @@ -243,77 +233,12 @@ public VTStatus EncodeFrame (CVImageBuffer imageBuffer, CMTime presentationTimes } } -#if false // Disabling for now until we have some tests on this - [DllImport (Constants.VideoToolboxLibrary)] - extern static VTStatus VTCompressionSessionEncodeFrameWithOutputHandler ( - /* VTCompressionSessionRef */ IntPtr session, - /* CVImageBufferRef */ IntPtr imageBuffer, - /* CMTime */ CMTime presentation, - /* CMTime */ CMTime duration, // can ve CMTime.Invalid - /* CFDictionaryRef */ IntPtr dict, // can be null, undocumented options - /* VTEncodeInfoFlags */ out VTEncodeInfoFlags flags, - /* VTCompressionOutputHandler */ ref BlockLiteral outputHandler); - - public delegate void VTCompressionOutputHandler (VTStatus status, VTEncodeInfoFlags infoFlags, CMSampleBuffer sampleBuffer); - - unsafe delegate void VTCompressionOutputHandlerProxy (BlockLiteral *block, - VTStatus status, VTEncodeInfoFlags infoFlags, IntPtr sampleBuffer); - - static unsafe readonly VTCompressionOutputHandlerProxy compressionOutputHandlerTrampoline = VTCompressionOutputHandlerTrampoline; - - [MonoPInvokeCallback (typeof (VTCompressionOutputHandlerProxy))] - static unsafe void VTCompressionOutputHandlerTrampoline (BlockLiteral *block, - VTStatus status, VTEncodeInfoFlags infoFlags, IntPtr sampleBuffer) - { - var del = (VTCompressionOutputHandler)(block->Target); - if (del is not null) - del (status, infoFlags, new CMSampleBuffer (sampleBuffer)); - } - - public VTStatus EncodeFrame (CVImageBuffer imageBuffer, CMTime presentationTimestamp, CMTime duration, - NSDictionary frameProperties, CVImageBuffer sourceFrame, out VTEncodeInfoFlags infoFlags, - VTCompressionOutputHandler outputHandler) - { - if (sourceFrame is null) - ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (sourceFrame)); - - VTStatus status = EncodeFrame (imageBuffer, presentationTimestamp, duration, frameProperties, sourceFrame.GetCheckedHandle (), out infoFlags, outputHandler); - GC.KeepAlive (sourceFrame); - return status; - } - - public VTStatus EncodeFrame (CVImageBuffer imageBuffer, CMTime presentationTimestamp, CMTime duration, - NSDictionary frameProperties, IntPtr sourceFrame, out VTEncodeInfoFlags infoFlags, - VTCompressionOutputHandler outputHandler) - { - if (imageBuffer is null) - ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (imageBuffer)); - if (outputHandler is null) - ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (outputHandler)); - - var block = new BlockLiteral (); - block.SetupBlockUnsafe (compressionOutputHandlerTrampoline, outputHandler); - - try { - VTStatus status = VTCompressionSessionEncodeFrameWithOutputHandler (GetCheckedHandle (), - imageBuffer.Handle, presentationTimestamp, duration, - frameProperties.GetHandle (), - out infoFlags, ref block); - GC.KeepAlive (imageBuffer); - GC.KeepAlive (frameProperties); - return status; - } finally { - block.CleanupBlock (); - } - } -#endif [DllImport (Constants.VideoToolboxLibrary)] extern static VTStatus VTCompressionSessionCompleteFrames (IntPtr session, CMTime completeUntilPresentationTimeStamp); - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Finish decoding all frames. + /// If this value is numeric, all frames with presentation timestamps lower or equal to this value will be emitted. If this value is not numeric, all frames will be emitted. + /// if successful, or an error code otherwise. public VTStatus CompleteFrames (CMTime completeUntilPresentationTimeStamp) { return VTCompressionSessionCompleteFrames (GetCheckedHandle (), completeUntilPresentationTimeStamp); @@ -326,10 +251,9 @@ public VTStatus CompleteFrames (CMTime completeUntilPresentationTimeStamp) [DllImport (Constants.VideoToolboxLibrary)] extern static VTStatus VTCompressionSessionBeginPass (IntPtr session, VTCompressionSessionOptionFlags flags, IntPtr reserved); - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Start a compression pass. + /// Any flags for this compression pass. + /// if successful, or an error code otherwise. [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] @@ -346,10 +270,9 @@ public VTStatus BeginPass (VTCompressionSessionOptionFlags flags) [DllImport (Constants.VideoToolboxLibrary)] unsafe extern static VTStatus VTCompressionSessionEndPass (IntPtr session, byte* furtherPassesRequestedOut, IntPtr reserved); - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// End a compression pass. + /// Will be set to if the decoder requests another pass. + /// if successful, or an error code otherwise. [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] @@ -365,10 +288,8 @@ public VTStatus EndPass (out bool furtherPassesRequested) return result; } - // Like EndPass, but this will be the final pass, so the encoder will skip the evaluation. - /// To be added. - /// To be added. - /// To be added. + /// End a compression pass, marking this pass as the final pass. + /// if successful, or an error code otherwise. public VTStatus EndPassAsFinal () { unsafe { @@ -386,10 +307,9 @@ unsafe extern static VTStatus VTCompressionSessionGetTimeRangesForNextPass ( /* CMItemCount* */ int* itemCount, /* const CMTimeRange** */ IntPtr* target); - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Get the time ranges for the next pass. + /// Upon return, the time ranges for the next πass. + /// if successful, or an error code otherwise. [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] @@ -415,10 +335,9 @@ public VTStatus GetTimeRangesForNextPass (out CMTimeRange []? timeRanges) return VTStatus.Ok; } - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Set any compression properties. + /// The compression properties to set. + /// if successful, or an error code otherwise. public VTStatus SetCompressionProperties (VTCompressionProperties options) { if (options is null) @@ -444,5 +363,118 @@ public static bool IsStereoMvHevcEncodeSupported () { return VTIsStereoMVHEVCEncodeSupported () != 0; } + +#if !__TVOS__ + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("ios17.0")] + [UnsupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("maccatalyst17.0")] + [DllImport (Constants.VideoToolboxLibrary)] + unsafe static extern VTStatus VTCompressionSessionEncodeMultiImageFrame ( + IntPtr /* CM_NONNULL VTCompressionSessionRef */ session, + IntPtr /* CM_NONNULL CMTaggedBufferGroupRef */ taggedBufferGroup, + CMTime presentationTimeStamp, + CMTime duration, // may be kCMTimeInvalid + IntPtr /* CM_NULLABLE CFDictionaryRef */ frameProperties, + IntPtr /* void * CM_NULLABLE */ sourceFrameRefcon, + VTEncodeInfoFlags* /* VTEncodeInfoFlags * CM_NULLABLE */ infoFlagsOut); + + /// Encode a multi-image video frame. + /// The tagged buffer group with multiple images to compress. + /// The presentation timestamp for this frame. + /// The duration of this frame. + /// Any frame properties for this frame. + /// This value will be passed to the callback that was specified when the compression session was created. + /// Upon return, any information flags from the encoder for this frame. + /// if successful, or an error code otherwise. + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("ios17.0")] + [UnsupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("maccatalyst17.0")] + public unsafe VTStatus EncodeMultiImageFrame (CMTaggedBufferGroup taggedBufferGroup, CMTime presentationTimestamp, CMTime duration, NSDictionary? frameProperties, IntPtr sourceFrame, out VTEncodeInfoFlags infoFlags) + { + infoFlags = default; + + var rv = VTCompressionSessionEncodeMultiImageFrame ( + GetCheckedHandle (), + taggedBufferGroup.GetNonNullHandle (nameof (taggedBufferGroup)), + presentationTimestamp, + duration, + frameProperties.GetHandle (), + sourceFrame, + (VTEncodeInfoFlags*) Unsafe.AsPointer (ref infoFlags)); + + GC.KeepAlive (taggedBufferGroup); + GC.KeepAlive (frameProperties); + + return rv; + } + + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("ios17.0")] + [UnsupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("maccatalyst17.0")] + [DllImport (Constants.VideoToolboxLibrary)] + unsafe static extern VTStatus VTCompressionSessionEncodeMultiImageFrameWithOutputHandler ( + IntPtr /* CM_NONNULL VTCompressionSessionRef */ session, + IntPtr /* CM_NONNULL CMTaggedBufferGroupRef */ taggedBufferGroup, + CMTime presentationTimeStamp, + CMTime duration, // may be kCMTimeInvalid + IntPtr /* CM_NULLABLE CFDictionaryRef */ frameProperties, // may be NULL + VTEncodeInfoFlags* /* VTEncodeInfoFlags * CM_NULLABLE */ infoFlagsOut, + BlockLiteral* /* CM_NONNULL VTCompressionOutputHandler */ outputHandler); + + /// Encode a multi-image video frame. + /// The tagged buffer group with multiple images to compress. + /// The presentation timestamp for this frame. + /// The duration of this frame. + /// Any frame properties for this frame. + /// Upon return, any information flags from the encoder for this frame. + /// A callback that will be invoked to process a compressed frame. See the delegate type for more information on the received parameters. + /// if successful, or an error code otherwise. + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("ios17.0")] + [UnsupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("maccatalyst17.0")] + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe VTStatus EncodeMultiImageFrame (CMTaggedBufferGroup taggedBufferGroup, CMTime presentationTimestamp, CMTime duration, NSDictionary? frameProperties, out VTEncodeInfoFlags infoFlags, VTCompressionOutputHandler outputHandler) + { + delegate* unmanaged trampoline = &VTCompressionOutputHandlerCallback; + using var trampolineBlock = new BlockLiteral (trampoline, outputHandler, typeof (VTCompressionSession), nameof (VTCompressionOutputHandlerCallback)); + + infoFlags = default; + + var rv = VTCompressionSessionEncodeMultiImageFrameWithOutputHandler ( + GetCheckedHandle (), + taggedBufferGroup.GetNonNullHandle (nameof (taggedBufferGroup)), + presentationTimestamp, + duration, + frameProperties.GetHandle (), + (VTEncodeInfoFlags*) Unsafe.AsPointer (ref infoFlags), + &trampolineBlock); + + GC.KeepAlive (taggedBufferGroup); + GC.KeepAlive (frameProperties); + + return rv; + } + + [UnmanagedCallersOnly] + unsafe static void VTCompressionOutputHandlerCallback (BlockLiteral* block, VTStatus status, VTEncodeInfoFlags infoFlags, IntPtr sampleBuffer) + { + var del = BlockLiteral.GetTarget ((IntPtr) block); + if (del is not null) { + var sampleBufferObj = sampleBuffer == IntPtr.Zero ? null : new CMSampleBuffer (sampleBuffer, owns: false); + del (status, infoFlags, sampleBufferObj); + } + } + + /// A delegate that will be called for each compressed frame. + /// Status code indicating if the operation was successful or not. + /// Contains information about the encoding operation. + /// Contains a pointer to the encoded buffer if successful and the frame was not dropped. A value indicates either an error, or that the frame was dropped. + /// The delegate will be called in the order the frames are decoded, which is not necessarily the same as the display order. + public delegate void VTCompressionOutputHandler (VTStatus status, VTEncodeInfoFlags infoFlags, CMSampleBuffer? sampleBuffer); +#endif // !__TVOS__ } } diff --git a/src/VideoToolbox/VTDecompressionSession.cs b/src/VideoToolbox/VTDecompressionSession.cs index 15c64b078821..4eb30e9edaef 100644 --- a/src/VideoToolbox/VTDecompressionSession.cs +++ b/src/VideoToolbox/VTDecompressionSession.cs @@ -21,27 +21,27 @@ namespace VideoToolbox { /// Turns compressed frames into uncompressed video frames. - /// To be added. [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("macos")] public class VTDecompressionSession : VTSession { - GCHandle callbackHandle; + GCHandle? callbackHandle; [Preserve (Conditional = true)] internal VTDecompressionSession (NativeHandle handle, bool owns) : base (handle, owns) { } - /// protected override void Dispose (bool disposing) { if (Handle != IntPtr.Zero) VTDecompressionSessionInvalidate (Handle); - if (callbackHandle.IsAllocated) - callbackHandle.Free (); + if (callbackHandle is not null && callbackHandle.Value.IsAllocated) { + callbackHandle.Value.Free (); + callbackHandle = null; + } base.Dispose (disposing); } @@ -52,16 +52,14 @@ struct VTDecompressionOutputCallbackRecord { public IntPtr DecompressionOutputRefCon; } - // sourceFrame: It seems it's only used as a parameter to be passed into DecodeFrame so no need to strong type it - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// Handler prototype to be called for each decompressed frame. - /// To be added. - public delegate void VTDecompressionOutputCallback (/* void* */ IntPtr sourceFrame, /* OSStatus */ VTStatus status, VTDecodeInfoFlags flags, CVImageBuffer buffer, CMTime presentationTimeStamp, CMTime presentationDuration); + /// A delegate that will be called for each decompressed frame. + /// The token passed starting the decoding operation. + /// Status code indicating if the operation was successful or not. + /// Contains information about the decoding operation. + /// Contains a pointer to the decoded buffer if successful. A value indicates an error. + /// The presentation timestamp of the decoded frame. + /// The duration of the decoded frame. + public delegate void VTDecompressionOutputCallback (/* void* */ IntPtr sourceFrame, /* OSStatus */ VTStatus status, VTDecodeInfoFlags flags, CVImageBuffer? buffer, CMTime presentationTimeStamp, CMTime presentationDuration); [UnmanagedCallersOnly] static void DecompressionCallback (IntPtr outputCallbackClosure, IntPtr sourceFrame, VTStatus status, @@ -78,29 +76,8 @@ static void DecompressionCallback (IntPtr outputCallbackClosure, IntPtr sourceFr // step further in the inheritance hierarchy and supply the callback a CVPixelBuffer and the callback supplies // to the developer a CVImageBuffer, so the developer can choose when to use one or the other and we mimic // what Apple provides on its headers. - using (var sampleBuffer = new CVPixelBuffer (imageBufferPtr, false)) { - func (sourceFrame, status, infoFlags, sampleBuffer, presentationTimeStamp, presentationDuration); - } - } - - [UnmanagedCallersOnly] - static void NewDecompressionCallback (IntPtr outputCallbackClosure, IntPtr sourceFrame, VTStatus status, - VTDecodeInfoFlags infoFlags, IntPtr imageBufferPtr, CMTime presentationTimeStamp, CMTime presentationDuration) - { - var gch = GCHandle.FromIntPtr (outputCallbackClosure); - var func = gch.Target as VTDecompressionOutputCallback; - - if (func is null) - return; - - // Apple headers states that the callback should get a CVImageBuffer but it turned out that not all of them are a - // CVImageBuffer, some can be instances of CVImageBuffer and others can be instances of CVPixelBuffer. So we go one - // step further in the inheritance hierarchy and supply the callback a CVPixelBuffer and the callback supplies - // to the developer a CVImageBuffer, so the developer can choose when to use one or the other and we mimic - // what Apple provides on its headers. - using (var sampleBuffer = new CVPixelBuffer (imageBufferPtr, owns: false)) { - func (sourceFrame, status, infoFlags, sampleBuffer, presentationTimeStamp, presentationDuration); - } + using var sampleBuffer = imageBufferPtr == IntPtr.Zero ? null : new CVPixelBuffer (imageBufferPtr, owns: false); + func (sourceFrame, status, infoFlags, sampleBuffer, presentationTimeStamp, presentationDuration); } [DllImport (Constants.VideoToolboxLibrary)] @@ -109,70 +86,34 @@ unsafe extern static VTStatus VTDecompressionSessionCreate ( /* CMVideoFormatDescriptionRef */ IntPtr videoFormatDescription, /* CFDictionaryRef */ IntPtr videoDecoderSpecification, // can be null /* CFDictionaryRef */ IntPtr destinationImageBufferAttributes, // can be null - /* const VTDecompressionOutputCallbackRecord* */ VTDecompressionOutputCallbackRecord* outputCallback, + /* const VTDecompressionOutputCallbackRecord* CM_NULLABLE */ VTDecompressionOutputCallbackRecord* outputCallback, /* VTDecompressionSessionRef* */ IntPtr* decompressionSessionOut); -#if false // Disabling for now until we have some tests on this - public static VTDecompressionSession Create (CMVideoFormatDescription formatDescription, - VTVideoDecoderSpecification decoderSpecification = null, // hardware acceleration is default behavior on iOS. no opt-in required. - NSDictionary destinationImageBufferAttributes = null) // Undocumented options, probably always null - { - if (formatDescription is null) - ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (formatDescription)); - - var callbackStruct = default (VTDecompressionOutputCallbackRecord); - - IntPtr ret; - - VTStatus result; - unsafe { - result = VTDecompressionSessionCreate (IntPtr.Zero, formatDescription.Handle, - decoderSpecification is not null ? decoderSpecification.Dictionary.Handle : IntPtr.Zero, - destinationImageBufferAttributes.GetHandle (), - &callbackStruct, - &ret); - } - - return result == VTStatus.Ok && ret != IntPtr.Zero - ? new VTDecompressionSession (ret, true) - : null; - } -#endif + /// Create a new instance. /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - public static VTDecompressionSession? Create (VTDecompressionOutputCallback outputCallback, + /// A format description for the source video frames. + /// Optionally specify which decoder to use + /// Optionally specify any requirements for the decoded frames. + /// A new instance if successful, otherwise. + public static VTDecompressionSession? Create (VTDecompressionOutputCallback? outputCallback, CMVideoFormatDescription formatDescription, VTVideoDecoderSpecification? decoderSpecification = null, // hardware acceleration is default behavior on iOS. no opt-in required. CVPixelBufferAttributes? destinationImageBufferAttributes = null) { - unsafe { - return Create (outputCallback, formatDescription, decoderSpecification, destinationImageBufferAttributes?.Dictionary, &NewDecompressionCallback); - } - } - - unsafe static VTDecompressionSession? Create (VTDecompressionOutputCallback outputCallback, - CMVideoFormatDescription formatDescription, - VTVideoDecoderSpecification? decoderSpecification, // hardware acceleration is default behavior on iOS. no opt-in required. - NSDictionary? destinationImageBufferAttributes, - delegate* unmanaged cback) - { - if (outputCallback is null) - ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (outputCallback)); - if (formatDescription is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (formatDescription)); - var callbackHandle = GCHandle.Alloc (outputCallback); - var callbackStruct = new VTDecompressionOutputCallbackRecord () { - Proc = cback, - DecompressionOutputRefCon = GCHandle.ToIntPtr (callbackHandle), - }; + GCHandle? callbackHandle = null; + VTDecompressionOutputCallbackRecord callbackStruct = default; + + if (outputCallback is not null) { + callbackHandle = GCHandle.Alloc (outputCallback); + unsafe { + callbackStruct.Proc = &DecompressionCallback; + } + callbackStruct.DecompressionOutputRefCon = GCHandle.ToIntPtr (callbackHandle.Value); + } IntPtr ret; VTStatus result; @@ -180,7 +121,7 @@ public static VTDecompressionSession Create (CMVideoFormatDescription formatDesc result = VTDecompressionSessionCreate (IntPtr.Zero, formatDescription.Handle, decoderSpecification.GetHandle (), destinationImageBufferAttributes.GetHandle (), - &callbackStruct, + outputCallback is null ? null : &callbackStruct, &ret); GC.KeepAlive (formatDescription); GC.KeepAlive (decoderSpecification); @@ -192,7 +133,8 @@ public static VTDecompressionSession Create (CMVideoFormatDescription formatDesc callbackHandle = callbackHandle, }; - callbackHandle.Free (); + if (callbackHandle is not null) + callbackHandle.Value.Free (); return null; } @@ -207,13 +149,12 @@ unsafe extern static VTStatus VTDecompressionSessionDecodeFrame ( /* void* */ IntPtr sourceFrame, /* VTDecodeInfoFlags */ VTDecodeInfoFlags* infoFlagsOut); - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Decode a video frame. + /// A sample buffer with one or more video frames. + /// Any decoding flags to be passed to the decoder. + /// A user-provided value that is passed to any decoding callbacks. + /// Upon return, any informational flags about the decode operation. + /// if successful, or an error code otherwise. public VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, IntPtr sourceFrame, out VTDecodeInfoFlags infoFlags) { if (sampleBuffer is null) @@ -226,77 +167,73 @@ public VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags dec return status; } } -#if false // Disabling for now until we have some tests on this + [DllImport (Constants.VideoToolboxLibrary)] - extern static VTStatus VTDecompressionSessionDecodeFrameWithOutputHandler ( + unsafe extern static VTStatus VTDecompressionSessionDecodeFrameWithOutputHandler ( /* VTDecompressionSessionRef */ IntPtr session, /* CMSampleBufferRef */ IntPtr sampleBuffer, /* VTDecodeFrameFlags */ VTDecodeFrameFlags decodeFlags, - /* VTDecodeInfoFlags */ out VTDecodeInfoFlags infoFlagsOut, - /* VTDecompressionOutputHandler */ ref BlockLiteral outputHandler); - - public delegate void VTDecompressionOutputHandler (VTStatus status, VTDecodeInfoFlags infoFlags, - CVImageBuffer imageBuffer, CMTime presentationTimeStamp, CMTime presentationDuration); - - unsafe delegate void VTDecompressionOutputHandlerProxy (BlockLiteral *block, VTStatus status, VTDecodeInfoFlags infoFlags, - IntPtr imageBuffer, CMTime presentationTimeStamp, CMTime presentationDuration); + /* VTDecodeInfoFlags */ VTDecodeInfoFlags* infoFlagsOut, + /* VTDecompressionOutputHandler */ BlockLiteral* outputHandler); + + /// Decode a video frame. + /// A sample buffer with one or more video frames. + /// Any decoding flags to be passed to the decoder. + /// Upon return, any informational flags about the decode operation. + /// A callback that will be called when the decoding operation is complete. + /// if successful, or an error code otherwise. + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, out VTDecodeInfoFlags infoFlags, VTDecompressionOutputHandler outputHandler) + { + delegate* unmanaged trampoline = &VTDecompressionOutputHandlerTrampoline; + using var outputHandlerBlock = new BlockLiteral (trampoline, outputHandler, typeof (VTDecompressionSession), nameof (VTDecompressionOutputHandlerTrampoline)); - static unsafe readonly VTDecompressionOutputHandlerProxy decompressionOutputHandlerTrampoline = VTDecompressionOutputHandlerTrampoline; + infoFlags = default; - [MonoPInvokeCallback (typeof (VTDecompressionOutputHandlerProxy))] - static unsafe void VTDecompressionOutputHandlerTrampoline (BlockLiteral *block, - VTStatus status, VTDecodeInfoFlags infoFlags, IntPtr imageBuffer, - CMTime presentationTimeStamp, CMTime presentationDuration) - { - var del = (VTDecompressionOutputHandler)(block->Target); - if (del is not null) - del (status, infoFlags, new CVImageBuffer (imageBuffer, false), presentationTimeStamp, presentationDuration); + var rv = VTDecompressionSessionDecodeFrameWithOutputHandler ( + GetCheckedHandle (), + sampleBuffer.GetNonNullHandle (nameof (sampleBuffer)), + decodeFlags, + (VTDecodeInfoFlags*) Unsafe.AsPointer (ref infoFlags), + &outputHandlerBlock); + GC.KeepAlive (sampleBuffer); + return rv; } - public VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, - out VTDecodeInfoFlags infoFlags, VTDecompressionOutputHandler outputHandler) - { - if (sampleBuffer is null) - ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (sampleBuffer)); - if (outputHandler is null) - ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (outputHandler)); - - var block = new BlockLiteral (); - block.SetupBlockUnsafe (decompressionOutputHandlerTrampoline, outputHandler); - try { - VTStatus status = VTDecompressionSessionDecodeFrameWithOutputHandler (GetCheckedHandle (), - sampleBuffer.Handle, decodeFlags, out infoFlags, ref block); - GC.KeepAlive (sampleBuffer); - return status; - } finally { - block.CleanupBlock (); - } - } -#endif [DllImport (Constants.VideoToolboxLibrary)] extern static VTStatus VTDecompressionSessionFinishDelayedFrames (IntPtr sesion); - /// To be added. - /// To be added. - /// To be added. + /// Request the decoder to decode all delayed frames. + /// if successful, or an error code otherwise. public VTStatus FinishDelayedFrames () { return VTDecompressionSessionFinishDelayedFrames (GetCheckedHandle ()); } [DllImport (Constants.VideoToolboxLibrary)] - extern static VTStatus VTDecompressionSessionCanAcceptFormatDescription (IntPtr sesion, IntPtr newFormatDescriptor); - - /// To be added. - /// To be added. - /// To be added. - /// To be added. + extern static byte VTDecompressionSessionCanAcceptFormatDescription (IntPtr sesion, IntPtr newFormatDescriptor); + +#if XAMCORE_5_0 + /// Checks whether the can decode frames of the specified format. + /// The format to check. + /// if the format is supported, or otherwise. + public bool CanAcceptFormatDescriptor (CMFormatDescription newDescriptor) +#else + /// Checks whether the can decode frames of the specified format. + /// The format to check. + /// if the format is supported, or otherwise. public VTStatus CanAcceptFormatDescriptor (CMFormatDescription newDescriptor) +#endif { if (newDescriptor is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (newDescriptor)); - VTStatus status = VTDecompressionSessionCanAcceptFormatDescription (GetCheckedHandle (), newDescriptor.Handle); +#if XAMCORE_5_0 + var status = VTDecompressionSessionCanAcceptFormatDescription (GetCheckedHandle (), newDescriptor.Handle) != 0; +#else + var rv = VTDecompressionSessionCanAcceptFormatDescription (GetCheckedHandle (), newDescriptor.Handle) != 0; + var status = rv ? VTStatus.Ok : VTStatus.Parameter; +#endif GC.KeepAlive (newDescriptor); return status; } @@ -304,9 +241,8 @@ public VTStatus CanAcceptFormatDescriptor (CMFormatDescription newDescriptor) [DllImport (Constants.VideoToolboxLibrary)] extern static VTStatus VTDecompressionSessionWaitForAsynchronousFrames (IntPtr sesion); - /// To be added. - /// To be added. - /// To be added. + /// Wait until all asynchronous frames have been decoded. + /// if successful, or an error code otherwise. public VTStatus WaitForAsynchronousFrames () { return VTDecompressionSessionWaitForAsynchronousFrames (GetCheckedHandle ()); @@ -315,10 +251,9 @@ public VTStatus WaitForAsynchronousFrames () [DllImport (Constants.VideoToolboxLibrary)] unsafe extern static VTStatus VTDecompressionSessionCopyBlackPixelBuffer (IntPtr sesion, IntPtr* pixelBufferOut); - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Get a black pixel buffer from the session. + /// Upon return, the black pixel buffer if successful. + /// if successful, or an error code otherwise. public VTStatus CopyBlackPixelBuffer (out CVPixelBuffer? pixelBuffer) { VTStatus result; @@ -330,10 +265,9 @@ public VTStatus CopyBlackPixelBuffer (out CVPixelBuffer? pixelBuffer) return result; } - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Set any decompression properties. + /// The decompression properties to set. + /// if successful, or an error code otherwise. public VTStatus SetDecompressionProperties (VTDecompressionProperties options) { if (options is null) @@ -349,10 +283,9 @@ public VTStatus SetDecompressionProperties (VTDecompressionProperties options) [DllImport (Constants.VideoToolboxLibrary)] extern static byte VTIsHardwareDecodeSupported (CMVideoCodecType codecType); - /// To be added. - /// To be added. - /// To be added. - /// To be added. + /// Checks whether the specified can be decoded in hardware. + /// The codec to check if the current system can decode in hardware. + /// if hardware decoding is supported for the specified codec, otherwise. [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("tvos")] @@ -379,5 +312,264 @@ public static bool IsStereoMvHevcDecodeSupported () { return VTIsStereoMVHEVCDecodeSupported () != 0; } + +#if !__TVOS__ + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [UnsupportedOSPlatform ("tvos")] + [DllImport (Constants.VideoToolboxLibrary)] + unsafe extern static /* OSStatus */ VTStatus VTDecompressionSessionDecodeFrameWithMultiImageCapableOutputHandler ( + IntPtr /* CM_NONNULL VTDecompressionSessionRef */ session, + IntPtr /* CM_NONNULL CMSampleBufferRef */ sampleBuffer, + VTDecodeFrameFlags decodeFlags, // bit 0 is enableAsynchronousDecompression + VTDecodeInfoFlags* /* VTDecodeInfoFlags * CM_NULLABLE */ infoFlagsOut, + BlockLiteral* /* CM_NONNULL VTDecompressionMultiImageCapableOutputHandler */ multiImageCapableOutputHandler); + + /// Decode a video frame that may contain more than one image. + /// A sample buffer with one or more video frames. + /// Any decoding flags to be passed to the decoder. + /// Upon return, any informational flags about the decode operation. + /// A callback that will be called when the decoding operation is complete. + /// if successful, or an error code otherwise. + [BindingImpl (BindingImplOptions.Optimizable)] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [UnsupportedOSPlatform ("tvos")] + public unsafe VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, out VTDecodeInfoFlags infoFlags, VTDecompressionMultiImageCapableOutputHandler multiImageCapableOutputHandler) + { + delegate* unmanaged trampoline = &VTDecompressionMultiImageCapableOutputBlockCallback; + using var multiImageCapableOutputHandlerBlock = new BlockLiteral (trampoline, multiImageCapableOutputHandler, typeof (VTDecompressionSession), nameof (VTDecompressionMultiImageCapableOutputBlockCallback)); + + infoFlags = default; + + var rv = VTDecompressionSessionDecodeFrameWithMultiImageCapableOutputHandler ( + GetCheckedHandle (), + sampleBuffer.GetNonNullHandle (nameof (sampleBuffer)), + decodeFlags, + (VTDecodeInfoFlags*) Unsafe.AsPointer (ref infoFlags), + &multiImageCapableOutputHandlerBlock); + GC.KeepAlive (sampleBuffer); + return rv; + } + + [UnmanagedCallersOnly] + unsafe static void VTDecompressionMultiImageCapableOutputBlockCallback (BlockLiteral* block, VTStatus status, VTDecodeInfoFlags infoFlags, IntPtr imageBuffer, IntPtr taggedBufferGroup, CMTime presentationTimeStamp, CMTime presentationDuration) + { + var del = BlockLiteral.GetTarget ((IntPtr) block); + if (del is not null) { + var imageBufferObj = imageBuffer == IntPtr.Zero ? null : new CVImageBuffer (imageBuffer, owns: false); + var taggedBufferGroupObj = taggedBufferGroup == IntPtr.Zero ? null : new CMTaggedBufferGroup (taggedBufferGroup, owns: false); + del (status, infoFlags, imageBufferObj, taggedBufferGroupObj, presentationTimeStamp, presentationDuration); + } + } + + /// A callback for . + /// if the decode operation was successful, an error code otherwise. + /// Any information flags about the decode operation. + /// If the decoding operation was successful, and a single image was decoded, the decoded image. + /// If the decoding operation was successful, and multiple images were decoded, the decoded images. + /// The frame's presentation timestamp. + /// The frame's presentation duration. + public delegate void VTDecompressionMultiImageCapableOutputHandler ( + VTStatus status, + VTDecodeInfoFlags infoFlags, + CVImageBuffer? /* CM_NULLABLE CVImageBufferRef */ imageBuffer, + CMTaggedBufferGroup? /* CM_NULLABLE CMTaggedBufferGroupRef */ taggedBufferGroup, + CMTime presentationTimeStamp, + CMTime presentationDuration); +#endif // !__TVOS__ + +#if !__TVOS__ + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [UnsupportedOSPlatform ("tvos")] + [DllImport (Constants.VideoToolboxLibrary)] + unsafe static extern VTStatus VTDecompressionSessionSetMultiImageCallback ( + IntPtr /* CM_NONNULL VTDecompressionSessionRef */ decompressionSession, + BlockLiteral* /* CM_NONNULL VTDecompressionOutputMultiImageCallback */ outputMultiImageCallback, + IntPtr /* void * CM_NULLABLE */ outputMultiImageRefcon); + + /// Set a callback that will be called when a single call to produces multiple images. + /// The callback that will be called when a single call to produces multiple images. + /// A user-provided value that is passed to the callback. + /// if successful, or an error code otherwise. + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [UnsupportedOSPlatform ("tvos")] + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe VTStatus SetMultiImageCallback (VTDecompressionOutputMultiImageCallback outputMultiImageCallback, IntPtr outputMultiImageReference) + { + delegate* unmanaged trampoline = &VTDecompressionOutputMultiImageCallbackBlock; + using var multiImageCapableOutputHandlerBlock = new BlockLiteral (trampoline, outputMultiImageCallback, typeof (VTDecompressionSession), nameof (VTDecompressionOutputMultiImageCallbackBlock)); + + return VTDecompressionSessionSetMultiImageCallback (GetCheckedHandle (), &multiImageCapableOutputHandlerBlock, outputMultiImageReference); + } + + [UnmanagedCallersOnly] + unsafe static void VTDecompressionOutputMultiImageCallbackBlock (BlockLiteral* block, IntPtr decompressionOutputMultiImageRefCon, IntPtr sourceFrameRefCon, VTStatus status, VTDecodeInfoFlags infoFlags, IntPtr taggedBufferGroup, CMTime presentationTimeStamp, CMTime presentationDuration) + { + var del = BlockLiteral.GetTarget ((IntPtr) block); + if (del is not null) { + var taggedBufferGroupObj = taggedBufferGroup == IntPtr.Zero ? null : new CMTaggedBufferGroup (taggedBufferGroup, owns: false); + del (decompressionOutputMultiImageRefCon, sourceFrameRefCon, status, infoFlags, taggedBufferGroupObj, presentationTimeStamp, presentationDuration); + } + } + + /// A callback for . + /// This is the outputMultiImageReference parameter passed to . + /// This is the sourceFrame parameter passed to . + /// if the decode operation was successful, an error code otherwise. + /// Any information flags about the decode operation. + /// If the decoding operation was successful, the decoded images. + /// The frame's presentation timestamp. + /// The frame's presentation duration. + public delegate void VTDecompressionOutputMultiImageCallback (IntPtr outputMultiImageReference, IntPtr sourceFrameReference, VTStatus status, VTDecodeInfoFlags infoFlags, CMTaggedBufferGroup? taggedBufferGroup, CMTime presentationTimeStamp, CMTime presentationDuration); +#endif // !__TVOS__ + + + [SupportedOSPlatform ("macos15.0")] + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] + [SupportedOSPlatform ("tvos18.0")] + [DllImport (Constants.VideoToolboxLibrary)] + unsafe static extern VTStatus VTDecompressionSessionDecodeFrameWithOptions ( + IntPtr /* CM_NONNULL VTDecompressionSessionRef */ session, + IntPtr /* CM_NONNULL CMSampleBufferRef */ sampleBuffer, + VTDecodeFrameFlags decodeFlags, + IntPtr /* CM_NULLABLE CFDictionaryRef */ frameOptions, + IntPtr /* void * CM_NULLABLE */ sourceFrameRefCon, + VTDecodeInfoFlags* /* VTDecodeInfoFlags * CM_NULLABLE */ infoFlagsOut); + + /// Decode a video frame that may contain more than one image. + /// A sample buffer with one or more video frames. + /// Any decoding flags to be passed to the decoder. + /// Any additional decoding options to be passed to the decoder. + /// A user-provided value that is passed to any decoding callbacks. + /// Upon return, any informational flags about the decode operation. + /// if successful, or an error code otherwise. + [SupportedOSPlatform ("macos15.0")] + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] + [SupportedOSPlatform ("tvos18.0")] + public unsafe VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, NSDictionary? frameOptions, IntPtr sourceFrameReference, out VTDecodeInfoFlags infoFlags) + { + infoFlags = default; + + var rv = VTDecompressionSessionDecodeFrameWithOptions ( + GetCheckedHandle (), + sampleBuffer.GetNonNullHandle (nameof (sampleBuffer)), + decodeFlags, + frameOptions.GetHandle (), + sourceFrameReference, + (VTDecodeInfoFlags*) Unsafe.AsPointer (ref infoFlags)); + + GC.KeepAlive (sampleBuffer); + GC.KeepAlive (frameOptions); + + return rv; + } + + /// Decode a video frame that may contain more than one image. + /// A sample buffer with one or more video frames. + /// Any decoding flags to be passed to the decoder. + /// Any additional decoding options to be passed to the decoder. + /// A user-provided value that is passed to any decoding callbacks. + /// Upon return, any informational flags about the decode operation. + /// if successful, or an error code otherwise. + [SupportedOSPlatform ("macos15.0")] + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] + [SupportedOSPlatform ("tvos18.0")] + public VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, VTDecodeFrameOptions? frameOptions, IntPtr sourceFrameReference, out VTDecodeInfoFlags infoFlags) + { + return DecodeFrame (sampleBuffer, decodeFlags, frameOptions.GetDictionary (), sourceFrameReference, out infoFlags); + } + + [SupportedOSPlatform ("macos15.0")] + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] + [SupportedOSPlatform ("tvos18.0")] + [DllImport (Constants.VideoToolboxLibrary)] + unsafe static extern VTStatus VTDecompressionSessionDecodeFrameWithOptionsAndOutputHandler ( + IntPtr /* CM_NONNULL VTDecompressionSessionRef */ session, + IntPtr /* CM_NONNULL CMSampleBufferRef */ sampleBuffer, + VTDecodeFrameFlags decodeFlags, + IntPtr /* CM_NULLABLE CFDictionaryRef */ frameOptions, + VTDecodeInfoFlags* /* VTDecodeInfoFlags * CM_NULLABLE */ infoFlagsOut, + BlockLiteral* /* CM_NONNULL VTDecompressionOutputHandler */ outputHandler); + + /// Decode a video frame that may contain more than one image. + /// A sample buffer with one or more video frames. + /// Any decoding flags to be passed to the decoder. + /// Any additional decoding options to be passed to the decoder. + /// Upon return, any informational flags about the decode operation. + /// A callback that will be called when the decoding operation is complete. + /// if successful, or an error code otherwise. + [SupportedOSPlatform ("macos15.0")] + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] + [SupportedOSPlatform ("tvos18.0")] + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, NSDictionary? frameOptions, out VTDecodeInfoFlags infoFlags, VTDecompressionOutputHandler outputHandler) + { + delegate* unmanaged trampoline = &VTDecompressionOutputHandlerTrampoline; + using var outputHandlerBlock = new BlockLiteral (trampoline, outputHandler, typeof (VTDecompressionSession), nameof (VTDecompressionOutputHandlerTrampoline)); + + infoFlags = default; + + var rv = VTDecompressionSessionDecodeFrameWithOptionsAndOutputHandler ( + GetCheckedHandle (), + sampleBuffer.GetNonNullHandle (nameof (sampleBuffer)), + decodeFlags, + frameOptions.GetHandle (), + (VTDecodeInfoFlags*) Unsafe.AsPointer (ref infoFlags), + &outputHandlerBlock); + GC.KeepAlive (sampleBuffer); + GC.KeepAlive (frameOptions); + return rv; + } + + /// Decode a video frame that may contain more than one image. + /// A sample buffer with one or more video frames. + /// Any decoding flags to be passed to the decoder. + /// Any additional decoding options to be passed to the decoder. + /// Upon return, any informational flags about the decode operation. + /// A callback that will be called when the decoding operation is complete. + /// if successful, or an error code otherwise. + [SupportedOSPlatform ("macos15.0")] + [SupportedOSPlatform ("ios18.0")] + [SupportedOSPlatform ("maccatalyst18.0")] + [SupportedOSPlatform ("tvos18.0")] + public unsafe VTStatus DecodeFrame (CMSampleBuffer sampleBuffer, VTDecodeFrameFlags decodeFlags, VTDecodeFrameOptions? frameOptions, out VTDecodeInfoFlags infoFlags, VTDecompressionOutputHandler outputHandler) + { + return DecodeFrame (sampleBuffer, decodeFlags, frameOptions.GetDictionary (), out infoFlags, outputHandler); + } + + /// A callback for . + /// if the decode operation was successful, an error code otherwise. + /// Any information flags about the decode operation. + /// If the decoding operation was successful, the decoded image. + /// The frame's presentation timestamp. + /// The frame's presentation duration. + public delegate void VTDecompressionOutputHandler ( + VTStatus status, + VTDecodeInfoFlags infoFlags, + CVImageBuffer? /* CM_NULLABLE CVImageBufferRef */ imageBuffer, + CMTime presentationTimeStamp, + CMTime presentationDuration); + + [UnmanagedCallersOnly] + static unsafe void VTDecompressionOutputHandlerTrampoline (BlockLiteral* block, VTStatus status, VTDecodeInfoFlags infoFlags, IntPtr imageBuffer, CMTime presentationTimeStamp, CMTime presentationDuration) + { + var del = BlockLiteral.GetTarget ((IntPtr) block); + if (del is not null) { + var imageBufferObj = imageBuffer == IntPtr.Zero ? null : new CVImageBuffer (imageBuffer, owns: false); + del (status, infoFlags, imageBufferObj, presentationTimeStamp, presentationDuration); + } + } } } diff --git a/src/VideoToolbox/VTDefs.cs b/src/VideoToolbox/VTDefs.cs index 026807eefaf6..3e2f297a5e2c 100644 --- a/src/VideoToolbox/VTDefs.cs +++ b/src/VideoToolbox/VTDefs.cs @@ -105,6 +105,7 @@ public enum VTStatus { /// Flags to control encoder in a decompression session [Flags] public enum VTDecodeFrameFlags : uint { + None = 0, /// To be added. EnableAsynchronousDecompression = 1 << 0, /// To be added. @@ -119,6 +120,7 @@ public enum VTDecodeFrameFlags : uint { /// Flags for status reporting in decoding sessions. [Flags] public enum VTDecodeInfoFlags : uint { + None = 0, /// To be added. Asynchronous = 1 << 0, /// To be added. @@ -126,6 +128,8 @@ public enum VTDecodeInfoFlags : uint { /// To be added. ImageBufferModifiable = 1 << 2, SkippedLeadingFrameDropped = 1 << 3, + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + FrameInterrupted = 1 << 4, } // UInt32 -> VTErrors.h @@ -442,6 +446,11 @@ public enum HdrMetadataInsertionMode { None, [Field ("kVTHDRMetadataInsertionMode_Auto")] Auto, + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Field ("kVTHDRMetadataInsertionMode_RequestSDRRangePreservation")] + RequestSdrRangePreservation, + } [Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0), TV (16, 0)] diff --git a/src/VideoToolbox/VTLowLatencyFrameInterpolationConfiguration.cs b/src/VideoToolbox/VTLowLatencyFrameInterpolationConfiguration.cs new file mode 100644 index 000000000000..0890b72097b0 --- /dev/null +++ b/src/VideoToolbox/VTLowLatencyFrameInterpolationConfiguration.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Foundation; + +namespace VideoToolbox; + +public partial class VTLowLatencyFrameInterpolationConfiguration { + /// Create a new instance, specifying the number of interpolated frames. + /// The frame width for the new instance. + /// The frame height for the new instance. + /// The number of interpolated frames for the new instance. + /// A new instance if successful, otherwise. + public static VTLowLatencyFrameInterpolationConfiguration CreateWithNumberOfInterpolatedFrames (nint frameWidth, nint frameHeight, nint numberOfInterpolatedFrames) + { + var rv = new VTLowLatencyFrameInterpolationConfiguration (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithFrameWidthAndNumberOfInterpolatedFrames (frameWidth, frameHeight, numberOfInterpolatedFrames), "initWithFrameWidth:frameHeight:numberOfInterpolatedFrames:"); + return rv; + } + + /// Create a new instance, specifying the spatial scale factor. + /// The frame width for the new instance. + /// The frame height for the new instance. + /// The spatial scale factor for the new instance. + /// A new instance if successful, otherwise. + public static VTLowLatencyFrameInterpolationConfiguration CreateWithSpatialScaleFactor (nint frameWidth, nint frameHeight, nint spatialScaleFactor) + { + var rv = new VTLowLatencyFrameInterpolationConfiguration (NSObjectFlag.Empty); + rv.InitializeHandle (rv._InitWithFrameWidthAndSpatialScaleFactor (frameWidth, frameHeight, spatialScaleFactor), "initWithFrameWidth:frameHeight:spatialScaleFactor:"); + return rv; + } +} diff --git a/src/VideoToolbox/VTMotionEstimationSession.cs b/src/VideoToolbox/VTMotionEstimationSession.cs new file mode 100644 index 000000000000..c397212e4e85 --- /dev/null +++ b/src/VideoToolbox/VTMotionEstimationSession.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +#nullable enable + +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; + +using CoreVideo; +using Foundation; +using ObjCRuntime; + +namespace VideoToolbox; + +/// A class that is used to create estimated motion vectors between two pixel buffers. +[SupportedOSPlatform ("ios26.0")] +[SupportedOSPlatform ("tvos26.0")] +[SupportedOSPlatform ("macos26.0")] +[SupportedOSPlatform ("maccatalyst26.0")] +public class VTMotionEstimationSession : VTSession { + + [Preserve (Conditional = true)] + internal VTMotionEstimationSession (NativeHandle handle, bool owns) + : base (handle, owns) + { + } + + protected override void Dispose (bool disposing) + { + if (Handle != IntPtr.Zero) + VTMotionEstimationSessionInvalidate (Handle); + + base.Dispose (disposing); + } + + [DllImport (Constants.VideoToolboxLibrary)] + static extern unsafe VTStatus VTMotionEstimationSessionCreate ( + IntPtr /* CM_NULLABLE CFAllocatorRef */ allocator, + IntPtr /* CM_NULLABLE CFDictionaryRef */ motionVectorProcessorSelectionOptions, + uint width, + uint height, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CM_NULLABLE VTMotionEstimationSessionRef * CM_NONNULL */ motionEstimationSessionOut); + + /// Create a new instance. + /// Any options for the new instance. + /// The frame width of the source and destination frames. + /// The frame height of the source and destination frames. + /// Upon return, if successful, or an error code otherwise. + /// A new instance if successful, otherwise. + public static VTMotionEstimationSession? Create (NSDictionary? options, uint width, uint height, out VTStatus status) + { + IntPtr handle; + unsafe { + status = VTMotionEstimationSessionCreate (IntPtr.Zero, options.GetHandle (), width, height, &handle); + GC.KeepAlive (options); + } + if (handle == IntPtr.Zero) + return null; + + return new VTMotionEstimationSession (handle, true); + } + + /// Create a new instance. + /// Any options for the new instance. + /// The frame width of the source and destination frames. + /// The frame height of the source and destination frames. + /// Upon return, if successful, or an error code otherwise. + /// A new instance if successful, otherwise. + public static VTMotionEstimationSession? Create (VTMotionEstimationSessionCreationOption? options, uint width, uint height, out VTStatus status) + { + return Create (options?.Dictionary, width, height, out status); + } + + [DllImport (Constants.VideoToolboxLibrary)] + static extern unsafe VTStatus /* OSStatus */ VTMotionEstimationSessionCopySourcePixelBufferAttributes ( + IntPtr /* CM_NONNULL VTMotionEstimationSessionRef */ motionEstimationSession, + IntPtr* /* CM_RETURNS_RETAINED_PARAMETER CM_NULLABLE CFDictionaryRef * CM_NONNULL */ attributesOut); + + /// Get the pixel buffer attributes this session expects for any source pixel buffers. + /// A instance if successful, otherwise. + /// Upon return, if successful, or an error code otherwise. + /// if successful, otherwise. + public unsafe bool TryGetSourcePixelBufferAttributes ([NotNullWhen (true)] out NSDictionary? pixelBufferAttributes, out VTStatus status) + { + IntPtr handle; + status = VTMotionEstimationSessionCopySourcePixelBufferAttributes (GetCheckedHandle (), &handle); + pixelBufferAttributes = Runtime.GetNSObject (handle, owns: true); + return status == 0 && pixelBufferAttributes is not null; + } + + /// Get the pixel buffer attributes this session expects for any source pixel buffers. + /// A instance if successful, otherwise. + public CVPixelBufferAttributes? SourcePixelBufferAttributes { + get { + if (TryGetSourcePixelBufferAttributes (out var dict, out var _)) + return new CVPixelBufferAttributes (dict); + return null; + } + } + + [DllImport (Constants.VideoToolboxLibrary)] + static extern void VTMotionEstimationSessionInvalidate ( + IntPtr /* CM_NONNULL VTMotionEstimationSessionRef */ session); + + [DllImport (Constants.VideoToolboxLibrary)] + static extern unsafe VTStatus /* OSStatus */ VTMotionEstimationSessionEstimateMotionVectors ( + IntPtr /* CM_NONNULL VTMotionEstimationSessionRef */ session, + IntPtr /* CM_NONNULL CVPixelBufferRef */ referenceImage, + IntPtr /* CM_NONNULL CVPixelBufferRef */ currentImage, + VTMotionEstimationFrameFlags motionEstimationFrameFlags, + IntPtr /* CM_NULLABLE CFDictionaryRef */ additionalFrameOptions, + BlockLiteral* /* CM_NONNULL VTMotionEstimationOutputHandler */ outputHandler); + + /// Compute estimated motion vectors between to pixel buffers. + /// The reference image to use for the computation. + /// The current image to use for the computation. + /// Any flags for the operation. + /// Any additional frame options for the operation. + /// The callback that will be called with the result of the operation. + /// if successful, or an error code otherwise. + [BindingImpl (BindingImplOptions.Optimizable)] + public unsafe VTStatus EstimateMotionVectors (CVPixelBuffer referenceImage, CVPixelBuffer currentImage, VTMotionEstimationFrameFlags motionEstimationFrameFlags, NSDictionary? additionalFrameOptions, VTMotionEstimationOutputHandler outputHandler) + { + delegate* unmanaged trampoline = &OutputHandlerTrampoline; + using var outputBlock = new BlockLiteral (trampoline, outputHandler, typeof (VTMotionEstimationSession), nameof (OutputHandlerTrampoline)); + + var rv = VTMotionEstimationSessionEstimateMotionVectors ( + GetCheckedHandle (), + referenceImage.GetNonNullHandle (nameof (referenceImage)), + currentImage.GetNonNullHandle (nameof (currentImage)), + motionEstimationFrameFlags, + additionalFrameOptions.GetHandle (), + &outputBlock); + + GC.KeepAlive (referenceImage); + GC.KeepAlive (currentImage); + GC.KeepAlive (additionalFrameOptions); + + return rv; + } + + [UnmanagedCallersOnly] + unsafe static void OutputHandlerTrampoline (BlockLiteral* block, VTStatus status, VTMotionEstimationInfoFlags infoFlags, IntPtr additionalInfo, IntPtr motionVectors) + { + var del = BlockLiteral.GetTarget ((IntPtr) block); + if (del is not null) { + var motionVectorObj = motionVectors == IntPtr.Zero ? null : new CVPixelBuffer (motionVectors, false); + del (status, infoFlags, Runtime.GetNSObject (additionalInfo, false), motionVectorObj); + } + } + + [DllImport (Constants.VideoToolboxLibrary)] + static extern unsafe VTStatus /* OSStatus */ VTMotionEstimationSessionCompleteFrames ( + IntPtr /* CM_NONNULL VTMotionEstimationSessionRef */ session); + + /// Tells the motion estimation session to finish processing all frames. + /// if successful, or an error code otherwise. + public VTStatus CompleteFrames () + { + return VTMotionEstimationSessionCompleteFrames (GetCheckedHandle ()); + } + + [DllImport (Constants.VideoToolboxLibrary)] + static extern nuint VTMotionEstimationSessionGetTypeID (); + + /// Get this type's CFTypeID. + /// This type's CFTypeID. + public static nuint GetTypeId () + { + return VTMotionEstimationSessionGetTypeID (); + } +} + +/// A callback for . +/// if the operation was successful, an error code otherwise. +/// Any information flags about the operation. +/// A dictionary with any additional info for the operation. +/// If successful, a with the result of the operation, or otherwise. +public delegate void VTMotionEstimationOutputHandler ( + VTStatus /* OSStatus */ status, + VTMotionEstimationInfoFlags infoFlags, + NSDictionary? additionalInfo, + CVPixelBuffer? motionVectors); diff --git a/src/VideoToolbox/VTRawProcessingSession.cs b/src/VideoToolbox/VTRawProcessingSession.cs index bdd1e65e2c32..f1fc5c743635 100644 --- a/src/VideoToolbox/VTRawProcessingSession.cs +++ b/src/VideoToolbox/VTRawProcessingSession.cs @@ -106,24 +106,31 @@ public static nint GetTypeId () return VTRAWProcessingSessionGetTypeID (); } + [SupportedOSPlatform ("macos")] + [ObsoletedOSPlatform ("macos26.0")] [DllImport (Constants.VideoToolboxLibrary)] unsafe static extern VTStatus VTRAWProcessingSessionSetParameterChangedHander ( IntPtr /* VTRAWProcessingSessionRef */ session, BlockLiteral* /* VTRAWProcessingParameterChangeHandler */ parameterChangeHandler ); + [SupportedOSPlatform ("macos26.0")] + [DllImport (Constants.VideoToolboxLibrary)] + unsafe static extern VTStatus VTRAWProcessingSessionSetParameterChangedHandler ( + IntPtr /* VTRAWProcessingSessionRef */ session, + BlockLiteral* /* VTRAWProcessingParameterChangeHandler */ parameterChangeHandler + ); + /// Provide a callback that will be called when the VTRawProcessingPlugin changes the set of processing parameters. /// The callback that will be called. Set to null to remove the current handler. [BindingImpl (BindingImplOptions.Optimizable)] public unsafe VTStatus SetParameterChangedHandler (VTRawProcessingParameterChangeHandler? handler) { - if (handler is null) { - return VTRAWProcessingSessionSetParameterChangedHander (GetCheckedHandle (), null); - } else { - delegate* unmanaged trampoline = &VTRawProcessingParameterChangeHandlerCallback; - using var block = new BlockLiteral (trampoline, handler, typeof (VTRawProcessingSession), nameof (VTRawProcessingParameterChangeHandlerCallback)); - return VTRAWProcessingSessionSetParameterChangedHander (GetCheckedHandle (), &block); - } + delegate* unmanaged trampoline = &VTRawProcessingParameterChangeHandlerCallback; + using var block = handler is null ? default (BlockLiteral) : new BlockLiteral (trampoline, handler, typeof (VTRawProcessingSession), nameof (VTRawProcessingParameterChangeHandlerCallback)); + if (!SystemVersion.IsAtLeastXcode26) + return VTRAWProcessingSessionSetParameterChangedHander (GetCheckedHandle (), handler is null ? null : &block); + return VTRAWProcessingSessionSetParameterChangedHandler (GetCheckedHandle (), handler is null ? null : &block); } [UnmanagedCallersOnly] diff --git a/src/frameworks.sources b/src/frameworks.sources index 54f2c782058b..ba619f1f3cbd 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -1776,6 +1776,7 @@ VIDEOTOOLBOX_SOURCES = \ VideoToolbox/VTDecompressionSession.cs \ VideoToolbox/VTFrameSilo.cs \ VideoToolbox/VTHdrPerFrameMetadataGenerationSession.cs \ + VideoToolbox/VTLowLatencyFrameInterpolationConfiguration.cs \ VideoToolbox/VTMultiPassStorage.cs \ VideoToolbox/VTPixelRotationProperties.cs \ VideoToolbox/VTPixelRotationSession.cs \ @@ -1788,6 +1789,7 @@ VIDEOTOOLBOX_SOURCES = \ VideoToolbox/VTVideoEncoder.cs \ VideoToolbox/VTUtilities.cs \ VideoToolbox/VTPixelTransferProperties.cs \ + VideoToolbox/VTMotionEstimationSession.cs \ # Vision diff --git a/src/videotoolbox.cs b/src/videotoolbox.cs index 71aac73cc926..8742b0af8954 100644 --- a/src/videotoolbox.cs +++ b/src/videotoolbox.cs @@ -8,6 +8,8 @@ // using System; using System.Collections.Generic; + +using CoreGraphics; using Foundation; using ObjCRuntime; using CoreMedia; @@ -338,11 +340,11 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_RecommendedParallelizationLimit")] NSString RecommendedParallelizationLimit { get; } - [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] + [iOS (26, 0), TV (26, 0), MacCatalyst (26, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumFrameCount")] NSString RecommendedParallelizedSubdivisionMinimumFrameCount { get; } - [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] + [iOS (26, 0), TV (26, 0), MacCatalyst (26, 0), Mac (14, 0)] [Field ("kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumDuration")] NSString RecommendedParallelizedSubdivisionMinimumDuration { get; } @@ -457,6 +459,58 @@ interface VTCompressionPropertyKey { [Field ("kVTCompressionPropertyKey_HorizontalFieldOfView")] NSString HorizontalFieldOfView { get; } + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Field ("kVTCompressionPropertyKey_VariableBitRate")] + NSString VariableBitRate { get; } + + // VBV = Video Buffering Verifier + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Field ("kVTCompressionPropertyKey_VBVMaxBitRate")] + NSString VbvMaxBitRate { get; } + + // VBV = Video Buffering Verifier + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Field ("kVTCompressionPropertyKey_VBVBufferDuration")] + NSString VbvBufferDuration { get; } + + // VBV = Video Buffering Verifier + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Field ("kVTCompressionPropertyKey_VBVInitialDelayPercentage")] + NSString VbvInitialDelayPercentage { get; } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Field ("kVTCompressionPropertyKey_CameraCalibrationDataLensCollection")] + NSString CameraCalibrationDataLensCollection { get; } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Field ("kVTCompressionPropertyKey_SupportedPresetDictionaries")] + NSString SupportedPresetDictionaries { get; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Static] + interface VTCompressionPresetKey { + [Field ("kVTCompressionPreset_HighQuality")] + NSString HighQuality { get; } + + [Field ("kVTCompressionPreset_Balanced")] + NSString Balanced { get; } + + [Field ("kVTCompressionPreset_HighSpeed")] + NSString HighSpeed { get; } + + [Field ("kVTCompressionPreset_VideoConferencing")] + NSString VideoConferencing { get; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [StrongDictionary ("VTCompressionPresetKey", Suffix = "")] + interface VTCompressionPreset { + // FIXME: investigate stronger typing that NSDictionary + NSDictionary HighQuality { get; } + NSDictionary Balanced { get; } + NSDictionary HighSpeed { get; } + NSDictionary VideoConferencing { get; } } [iOS (13, 0), TV (13, 0)] @@ -693,11 +747,11 @@ interface VTCompressionProperties { [Export ("RecommendedParallelizationLimit")] int RecommendedParallelizationLimit { get; } - [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] + [iOS (26, 0), TV (26, 0), MacCatalyst (26, 0), Mac (14, 0)] [Export ("RecommendedParallelizedSubdivisionMinimumFrameCount")] ulong RecommendedParallelizedSubdivisionMinimumFrameCount { get; } - [NoiOS, NoTV, NoMacCatalyst, Mac (14, 0)] + [iOS (26, 0), TV (26, 0), MacCatalyst (26, 0), Mac (14, 0)] [Export ("RecommendedParallelizedSubdivisionMinimumDuration")] NSDictionary RecommendedParallelizedSubdivisionMinimumDuration { get; } @@ -762,11 +816,19 @@ interface VTCompressionProperties { [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("ProjectionKind")] +#if XAMCORE_5_0 + VTProjectionKind /* NSString */ ProjectionKind { get; } +#else CMFormatDescriptionProjectionKind /* NSString */ ProjectionKind { get; } +#endif [NoTV, Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Export ("ViewPackingKind")] +#if XAMCORE_5_0 + VTViewPackingKind /* NSString */ ViewPackingKind { get; } +#else CMFormatDescriptionViewPackingKind /* NSString */ ViewPackingKind { get; } +#endif [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] [Export ("SuggestedLookAheadFrameCount")] @@ -778,19 +840,33 @@ interface VTCompressionProperties { [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("MvHevcVideoLayerIds")] - NSNumber [] MvHevcVideoLayerIds { get; } + NSNumber [] MvHevcVideoLayerIds { get; set; } [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("MvHevcViewIds")] - NSNumber [] MvHevcViewIds { get; } + NSNumber [] MvHevcViewIds { get; set; } [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("MvHevcLeftAndRightViewIds")] - NSNumber [] MvHevcLeftAndRightViewIds { get; } + NSNumber [] MvHevcLeftAndRightViewIds { get; set; } [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HeroEye")] +#if XAMCORE_5_0 + VTHeroEye HeroEye { get; } +#else + [Obsolete ("Use the strongly typed 'VTHeroEye' instead.")] string HeroEye { get; } +#endif + +#if !XAMCORE_6_0 +#if XAMCORE_5_0 + [Obsolete ("Use 'HeroEye' instead.")] +#endif + [NoTV, MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Export ("HeroEye")] + VTHeroEye VTHeroEye { get; } +#endif [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("StereoCameraBaseline")] @@ -802,15 +878,176 @@ interface VTCompressionProperties { [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HasLeftStereoEyeView")] - bool HasLeftStereoEyeView { get; } + bool HasLeftStereoEyeView { get; set; } [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HasRightStereoEyeView")] - bool HasRightStereoEyeView { get; } + bool HasRightStereoEyeView { get; set; } [iOS (17, 0), NoTV, MacCatalyst (17, 0), Mac (14, 0)] [Export ("HorizontalFieldOfView")] - uint HorizontalFieldOfView { get; } + uint HorizontalFieldOfView { get; set; } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Export ("VariableBitRate")] + uint VariableBitRate { get; set; } + + // VBV = Video Buffering Verifier + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Export ("VbvMaxBitRate")] + uint VbvMaxBitRate { get; set; } + + // VBV = Video Buffering Verifier + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Export ("VbvBufferDuration")] + float VbvBufferDuration { get; set; } + + // VBV = Video Buffering Verifier + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Export ("VbvInitialDelayPercentage")] + float VbvInitialDelayPercentage { get; set; } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Export ("CameraCalibrationDataLensCollection")] + VTCompressionPropertyCameraCalibration [] CameraCalibrationDataLensCollection { get; set; } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Export ("SupportedPresetDictionaries")] + VTCompressionPreset SupportedPresetDictionaries { get; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + enum VTCameraCalibrationLensAlgorithmKind { + [Field ("kVTCameraCalibrationLensAlgorithmKind_ParametricLens")] + ParametricLens, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + enum VTCameraCalibrationLensDomain { + [Field ("kVTCameraCalibrationLensDomain_Color")] + Color, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + enum VTCameraCalibrationLensRole { + [Field ("kVTCameraCalibrationLensRole_Mono")] + Mono, + + [Field ("kVTCameraCalibrationLensRole_Left")] + Left, + + [Field ("kVTCameraCalibrationLensRole_Right")] + Right, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + enum VTCameraCalibrationExtrinsicOriginSource { + [Field ("kVTCameraCalibrationExtrinsicOriginSource_StereoCameraSystemBaseline")] + StereoCameraSystemBaseline, + } + + // There's an almost identical mirror of this class in CoreMedia (as CMCompressionPropertyCameraCalibrationKey), + // which should probably be updated if this class is updated. + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Static] + interface VTCompressionPropertyCameraCalibrationKey { + [Field ("kVTCompressionPropertyCameraCalibrationKey_LensAlgorithmKind")] + NSString LensAlgorithmKind { get; } // VTCameraCalibrationLensAlgorithmKind + + [Field ("kVTCompressionPropertyCameraCalibrationKey_LensDomain")] + NSString LensDomain { get; } // VTCameraCalibrationLensDomain + + [Field ("kVTCompressionPropertyCameraCalibrationKey_LensIdentifier")] + NSString LensIdentifier { get; } // int + + [Field ("kVTCompressionPropertyCameraCalibrationKey_LensRole")] + NSString LensRole { get; } // kVTCameraCalibrationLensRole + + [Field ("kVTCompressionPropertyCameraCalibrationKey_LensDistortions")] + NSString LensDistortions { get; } // float[] + + [Field ("kVTCompressionPropertyCameraCalibrationKey_RadialAngleLimit")] + NSString RadialAngleLimit { get; } // float + + [Field ("kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialX")] + NSString LensFrameAdjustmentsPolynomialX { get; } // float[] + + [Field ("kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialY")] + NSString LensFrameAdjustmentsPolynomialY { get; } // float[] + + [Field ("kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrix")] + NSString IntrinsicMatrix { get; } + + [Field ("kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixProjectionOffset")] + NSString IntrinsicMatrixProjectionOffset { get; } // float + + [Field ("kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixReferenceDimensions")] + NSString IntrinsicMatrixReferenceDimensions { get; } // "CGSize dictionary" = ?? + + [Field ("kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOriginSource")] + NSString ExtrinsicOriginSource { get; } // VTCameraCalibrationExtrinsicOriginSource + + [Field ("kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOrientationQuaternion")] + NSString ExtrinsicOrientationQuaternion { get; } // float[] + + // There's an almost identical mirror of this class in CoreMedia (as CMCompressionPropertyCameraCalibrationKey), + // which should probably be updated if this class is updated. + } + + // There's an almost identical mirror of this class in CoreMedia (as CMCompressionPropertyCameraCalibrationKey), + // which should probably be updated if this class is updated. + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [StrongDictionary ("VTCompressionPropertyCameraCalibrationKey", Suffix = "")] + interface VTCompressionPropertyCameraCalibration { + VTCameraCalibrationLensAlgorithmKind LensAlgorithmKind { get; set; } + VTCameraCalibrationLensDomain LensDomain { get; set; } + int LensIdentifier { get; set; } + VTCameraCalibrationLensRole LensRole { get; set; } + float [] LensDistortions { get; set; } // CFArray[CFNumber(float)] + float RadialAngleLimit { get; set; } + float [] LensFrameAdjustmentsPolynomialX { get; set; } // CFArray[CFNumber(float)] + float [] LensFrameAdjustmentsPolynomialY { get; set; } // CFArray[CFNumber(float)] + NMatrix3 IntrinsicMatrix { get; set; } + float IntrinsicMatrixProjectionOffset { get; set; } + CGSizeDictionary IntrinsicMatrixReferenceDimensions { get; set; } + VTCameraCalibrationExtrinsicOriginSource ExtrinsicOriginSource { get; set; } + float [] ExtrinsicOrientationQuaternion { get; set; } // CFArray[CFNumber(float)] + + // There's an almost identical mirror of this class in CoreMedia (as CMCompressionPropertyCameraCalibrationKey), + // which should probably be updated if this class is updated. + } + + [NoTV, MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + enum VTHeroEye { + [Field ("kVTHeroEye_Left")] + Left, + + [Field ("kVTHeroEye_Right")] + Right, + } + + [NoTV, MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + enum VTProjectionKind { + [Field ("kVTProjectionKind_Rectilinear")] + Rectilinear, + + [Field ("kVTProjectionKind_Equirectangular")] + Equirectangular, + + [Field ("kVTProjectionKind_HalfEquirectangular")] + HalfEquirectangular, + + [Field ("kVTProjectionKind_ParametricImmersive")] + ParametricImmersive, + } + + [NoTV, MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + enum VTViewPackingKind { + [Field ("kVTViewPackingKind_SideBySide")] + SideBySide, + + [Field ("kVTViewPackingKind_OverUnder")] + OverUnder, } [NoTV, Mac (15, 0), NoiOS, NoMacCatalyst] @@ -1731,7 +1968,11 @@ interface VTDecompressionProperties { [TV (14, 2)] [MacCatalyst (14, 1)] [Export ("PropagatePerFrameHdrDisplayMetadata")] +#if XAMCORE_5_0 + bool PropagatePerFrameHdrDisplayMetadata { get; set; } +#else bool PropagatePerFrameHhrDisplayMetadata { get; set; } +#endif [Export ("GeneratePerFrameHdrDisplayMetadata")] [iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0)] @@ -1773,18 +2014,12 @@ interface VTVideoDecoderSpecification { /// To be added. /// To be added. /// To be added. - [NoiOS] - [NoTV] - [NoMacCatalyst] [Export ("RequiredDecoderGpuRegistryId")] NSNumber RequiredDecoderGpuRegistryId { get; } /// To be added. /// To be added. /// To be added. - [NoiOS] - [NoTV] - [NoMacCatalyst] [Export ("PreferredDecoderGpuRegistryId")] NSNumber PreferredDecoderGpuRegistryId { get; } } @@ -1808,18 +2043,12 @@ interface VTVideoDecoderSpecificationKeys { /// To be added. /// To be added. /// To be added. - [NoiOS] - [NoTV] - [NoMacCatalyst] [Field ("kVTVideoDecoderSpecification_RequiredDecoderGPURegistryID")] NSString RequiredDecoderGpuRegistryId { get; } /// To be added. /// To be added. /// To be added. - [NoiOS] - [NoTV] - [NoMacCatalyst] [Field ("kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID")] NSString PreferredDecoderGpuRegistryId { get; } } @@ -2472,6 +2701,10 @@ interface VTRawProcessingPropertyKey { [Field ("kVTRAWProcessingPropertyKey_OutputColorAttachments")] NSString OutputColorAttachments { get; } + + [Mac (26, 0)] + [Field ("kVTRAWProcessingPropertyKey_MetadataForSidecarFile")] + NSString MetadataForSidecarFile { get; } } [NoTV, NoiOS, NoMacCatalyst, Mac (15, 0)] @@ -2480,6 +2713,9 @@ interface VTRawProcessingProperty { ulong MetalDeviceRegistryId { get; set; } NSDictionary OutputColorAttachments { get; } + + [Mac (26, 0)] + NSData MetadataForSidecarFile { get; } } [MacCatalyst (13, 1)] @@ -2505,7 +2741,7 @@ interface VTSampleAttachmentQualityMetrics { NSString ChromaRedMeanSquaredError { get; } } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), TV (26, 0), iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] interface VTFrameProcessor { [Export ("startSessionWithConfiguration:error:")] @@ -2514,9 +2750,14 @@ interface VTFrameProcessor { [Export ("processWithParameters:error:")] bool Process (IVTFrameProcessorParameters parameters, [NullAllowed] out NSError error); + [Async] [Export ("processWithParameters:completionHandler:")] void Process (IVTFrameProcessorParameters parameters, VTFrameProcessorProcessHandler completionHandler); + [MacCatalyst (26, 0), TV (26, 0), iOS (26, 0), Mac (26, 0)] + [Export ("processWithParameters:frameOutputHandler:")] + void Process (IVTFrameProcessorParameters parameters, VTFrameProcessorProcessFrameOutputHandler frameOutputHandler); + [Export ("processWithCommandBuffer:parameters:")] void Process (IMTLCommandBuffer commandBuffer, IVTFrameProcessorParameters parameters); @@ -2525,13 +2766,18 @@ interface VTFrameProcessor { } delegate void VTFrameProcessorProcessHandler (IVTFrameProcessorParameters parameters, [NullAllowed] NSError error); + delegate void VTFrameProcessorProcessFrameOutputHandler (IVTFrameProcessorParameters parameters, CMTime presentationTimeStamp, bool isFinalOutput, [NullAllowed] NSError error); - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), TV (26, 0), iOS (26, 0), Mac (15, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface VTFrameProcessorConfiguration { +#if !XAMCORE_5_0 + [NoMacCatalyst, NoTV, NoiOS] + [Deprecated (PlatformName.MacCatalyst, 26, 0, "Use 'Supported' instead.")] [Static, Abstract] [Export ("processorSupported")] bool ProcessorSupported { get; } +#endif [Abstract] [Export ("frameSupportedPixelFormats")] @@ -2573,10 +2819,8 @@ CVPixelFormatType [] FrameSupportedPixelFormats { interface IVTFrameProcessorConfiguration { } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] -#if !__MACCATALYST__ - [ErrorDomain ("VTFrameProcessorErrorDomain")] -#endif + [MacCatalyst (18, 4), TV (26, 0), iOS (26, 0), Mac (15, 4)] + [ErrorDomain ("VTFrameProcessorErrorDomain")] // this field is only available in Mac Catalyst for Mac Catalyst 26+ [Native] public enum VTFrameProcessorError : long { UnknownError = -19730, @@ -2591,10 +2835,11 @@ public enum VTFrameProcessorError : long { RevisionNotSupported = -19739, ProcessingError = -19740, InvalidParameterError = -19741, - InvalidFrameTiming = -19742 + InvalidFrameTiming = -19742, + AssetDownloadFailed = -19743, } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), TV (26, 0), iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VTFrameProcessorFrame { @@ -2608,7 +2853,7 @@ interface VTFrameProcessorFrame { CMTime PresentationTimeStamp { get; } } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), TV (26, 0), iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VTFrameProcessorOpticalFlow { @@ -2622,30 +2867,38 @@ interface VTFrameProcessorOpticalFlow { CVPixelBuffer BackwardFlow { get; } } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), TV (26, 0), iOS (26, 0), Mac (15, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] interface VTFrameProcessorParameters { [Abstract] [Export ("sourceFrame")] VTFrameProcessorFrame SourceFrame { get; } + + [MacCatalyst (26, 0), TV (26, 0), iOS (26, 0), Mac (26, 0)] + [Export ("destinationFrame")] + VTFrameProcessorFrame DestinationFrame { get; } + + [MacCatalyst (26, 0), TV (26, 0), iOS (26, 0), Mac (26, 0)] + [Export ("destinationFrames")] + VTFrameProcessorFrame [] DestinationFrames { get; } } interface IVTFrameProcessorParameters { } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTFrameRateConversionConfigurationQualityPrioritization : long { Normal = 1, Quality = 2, } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTFrameRateConversionConfigurationRevision : long { Revision1 = 1, } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTFrameRateConversionParametersSubmissionMode : long { Random = 1, @@ -2653,7 +2906,7 @@ public enum VTFrameRateConversionParametersSubmissionMode : long { SequentialReferencesUnchanged = 3, } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VTFrameRateConversionConfiguration : VTFrameProcessorConfiguration { @@ -2686,18 +2939,20 @@ interface VTFrameRateConversionConfiguration : VTFrameProcessorConfiguration { [Static] [Export ("defaultRevision")] VTFrameRateConversionConfigurationRevision DefaultRevision { get; } + + [MacCatalyst (26, 0), iOS (26, 0), Mac (26, 0)] + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VTFrameRateConversionParameters : VTFrameProcessorParameters { [Export ("initWithSourceFrame:nextFrame:opticalFlow:interpolationPhase:submissionMode:destinationFrames:")] NativeHandle Constructor (VTFrameProcessorFrame sourceFrame, VTFrameProcessorFrame nextFrame, [NullAllowed] VTFrameProcessorOpticalFlow opticalFlow, NSNumber [] interpolationPhase, VTFrameRateConversionParametersSubmissionMode submissionMode, VTFrameProcessorFrame [] destinationFrame); - [Export ("sourceFrame")] - new VTFrameProcessorFrame SourceFrame { get; } - [NullAllowed, Export ("nextFrame")] VTFrameProcessorFrame NextFrame { get; } @@ -2710,32 +2965,29 @@ interface VTFrameRateConversionParameters : VTFrameProcessorParameters { [Export ("submissionMode")] VTFrameRateConversionParametersSubmissionMode SubmissionMode { get; } - - [Export ("destinationFrames")] - VTFrameProcessorFrame [] DestinationFrames { get; } } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTMotionBlurConfigurationQualityPrioritization : long { Normal = 1, Quality = 2, } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTMotionBlurConfigurationRevision : long { Revision1 = 1, } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTMotionBlurParametersSubmissionMode : long { Random = 1, Sequential = 2, } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), NoTV, iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VTMotionBlurConfiguration : VTFrameProcessorConfiguration { @@ -2768,18 +3020,20 @@ interface VTMotionBlurConfiguration : VTFrameProcessorConfiguration { [Static] [Export ("defaultRevision")] VTMotionBlurConfigurationRevision DefaultRevision { get; } + + [MacCatalyst (26, 0), iOS (26, 0), Mac (26, 0)] + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), NoTV, iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VTMotionBlurParameters : VTFrameProcessorParameters { [Export ("initWithSourceFrame:nextFrame:previousFrame:nextOpticalFlow:previousOpticalFlow:motionBlurStrength:submissionMode:destinationFrame:")] NativeHandle Constructor (VTFrameProcessorFrame sourceFrame, [NullAllowed] VTFrameProcessorFrame nextFrame, [NullAllowed] VTFrameProcessorFrame previousFrame, [NullAllowed] VTFrameProcessorOpticalFlow nextOpticalFlow, [NullAllowed] VTFrameProcessorOpticalFlow previousOpticalFlow, nint motionBlurStrength, VTMotionBlurParametersSubmissionMode submissionMode, VTFrameProcessorFrame destinationFrame); - [Export ("sourceFrame")] - new VTFrameProcessorFrame SourceFrame { get; } - [NullAllowed, Export ("nextFrame")] VTFrameProcessorFrame NextFrame { get; } @@ -2797,32 +3051,29 @@ interface VTMotionBlurParameters : VTFrameProcessorParameters { [Export ("submissionMode")] VTMotionBlurParametersSubmissionMode SubmissionMode { get; } - - [Export ("destinationFrame")] - VTFrameProcessorFrame DestinationFrame { get; } } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTOpticalFlowConfigurationQualityPrioritization : long { Normal = 1, Quality = 2, } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTOpticalFlowConfigurationRevision : long { Revision1 = 1, } - [MacCatalyst (18, 4), NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (18, 4), NoTV, iOS (26, 0), Mac (15, 4)] [Native] public enum VTOpticalFlowParametersSubmissionMode : long { Random = 1, Sequential = 2, } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), NoTV, iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VTOpticalFlowConfiguration : VTFrameProcessorConfiguration { @@ -2852,18 +3103,20 @@ interface VTOpticalFlowConfiguration : VTFrameProcessorConfiguration { [Static] [Export ("defaultRevision")] VTOpticalFlowConfigurationRevision DefaultRevision { get; } + + [MacCatalyst (26, 0), NoTV, iOS (26, 0), Mac (26, 0)] + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } } - [NoMacCatalyst, NoTV, NoiOS, Mac (15, 4)] + [MacCatalyst (26, 0), NoTV, iOS (26, 0), Mac (15, 4)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface VTOpticalFlowParameters : VTFrameProcessorParameters { [Export ("initWithSourceFrame:nextFrame:submissionMode:destinationOpticalFlow:")] NativeHandle Constructor (VTFrameProcessorFrame sourceFrame, VTFrameProcessorFrame nextFrame, VTOpticalFlowParametersSubmissionMode submissionMode, VTFrameProcessorOpticalFlow destinationOpticalFlow); - [Export ("sourceFrame")] - new VTFrameProcessorFrame SourceFrame { get; } - [Export ("nextFrame")] VTFrameProcessorFrame NextFrame { get; } @@ -2873,4 +3126,294 @@ interface VTOpticalFlowParameters : VTFrameProcessorParameters { [Export ("destinationOpticalFlow")] VTFrameProcessorOpticalFlow DestinationOpticalFlow { get; } } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VTLowLatencyFrameInterpolationConfiguration : VTFrameProcessorConfiguration { + [Internal] + [Export ("initWithFrameWidth:frameHeight:numberOfInterpolatedFrames:")] + NativeHandle _InitWithFrameWidthAndNumberOfInterpolatedFrames (nint frameWidth, nint frameHeight, nint numberOfInterpolatedFrames); + + [Internal] + [Export ("initWithFrameWidth:frameHeight:spatialScaleFactor:")] + NativeHandle _InitWithFrameWidthAndSpatialScaleFactor (nint frameWidth, nint frameHeight, nint spatialScaleFactor); + + [Export ("frameWidth")] + nint FrameWidth { get; } + + [Export ("frameHeight")] + nint FrameHeight { get; } + + [Export ("spatialScaleFactor")] + nint SpatialScaleFactor { get; } + + [Export ("numberOfInterpolatedFrames")] + nint NumberOfInterpolatedFrames { get; } + + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VTLowLatencyFrameInterpolationParameters : VTFrameProcessorParameters { + [Export ("initWithSourceFrame:previousFrame:interpolationPhase:destinationFrames:")] + NativeHandle Constructor (VTFrameProcessorFrame sourceFrame, VTFrameProcessorFrame previousFrame, [BindAs (typeof (float []))] NSNumber [] interpolationPhase, VTFrameProcessorFrame [] destinationFrames); + + [Export ("previousFrame")] + VTFrameProcessorFrame PreviousFrame { get; } + + [Export ("interpolationPhase")] + [BindAs (typeof (float []))] + NSNumber [] InterpolationPhase { get; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VTLowLatencySuperResolutionScalerConfiguration : VTFrameProcessorConfiguration { + [Export ("initWithFrameWidth:frameHeight:scaleFactor:")] + NativeHandle Constructor (nint frameWidth, nint frameHeight, float scaleFactor); + + [Export ("frameWidth")] + nint FrameWidth { get; } + + [Export ("frameHeight")] + nint FrameHeight { get; } + + [Export ("scaleFactor")] + float ScaleFactor { get; } + + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } + + [Static] + [Export ("supportedScaleFactorsForFrameWidth:frameHeight:")] + [return: BindAs (typeof (nint []))] + NSNumber [] GetSupportedScaleFactors (nint frameWidth, nint frameHeight); + } + + [NoTV, MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VTSuperResolutionScalerConfiguration : VTFrameProcessorConfiguration { + [Export ("initWithFrameWidth:frameHeight:scaleFactor:inputType:usePrecomputedFlow:qualityPrioritization:revision:")] + NativeHandle Constructor (nint frameWidth, nint frameHeight, nint scaleFactor, VTSuperResolutionScalerConfigurationInputType inputType, bool usePrecomputedFlow, VTSuperResolutionScalerConfigurationQualityPrioritization qualityPrioritization, VTSuperResolutionScalerConfigurationRevision revision); + + [Export ("frameWidth")] + nint FrameWidth { get; } + + [Export ("frameHeight")] + nint FrameHeight { get; } + + [Export ("inputType")] + VTSuperResolutionScalerConfigurationInputType InputType { get; } + + [Export ("precomputedFlow")] + bool PrecomputedFlow { [Bind ("usesPrecomputedFlow")] get; } + + [Export ("scaleFactor")] + nint ScaleFactor { get; } + + [Export ("qualityPrioritization")] + VTSuperResolutionScalerConfigurationQualityPrioritization QualityPrioritization { get; } + + [Export ("revision")] + VTSuperResolutionScalerConfigurationRevision Revision { get; } + + [Static] + [Export ("supportedRevisions")] + NSIndexSet SupportedRevisions { get; } + + [Static] + [Export ("defaultRevision")] + VTSuperResolutionScalerConfigurationRevision DefaultRevision { get; } + + [Export ("configurationModelStatus")] + VTSuperResolutionScalerConfigurationModelStatus ConfigurationModelStatus { get; } + + [Async] + [Export ("downloadConfigurationModelWithCompletionHandler:")] + void DownloadConfigurationModel (VTSuperResolutionScalerConfigurationDownloadConfigurationModelCallback completionHandler); + + [Export ("configurationModelPercentageAvailable")] + float ConfigurationModelPercentageAvailable { get; } + + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } + + [Static] + [Export ("supportedScaleFactors")] + [BindAs (typeof (float []))] + NSNumber [] SupportedScaleFactors { get; } + } + + delegate void VTSuperResolutionScalerConfigurationDownloadConfigurationModelCallback ([NullAllowed] NSError error); + + [MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VTSuperResolutionScalerParameters : VTFrameProcessorParameters { + [Export ("initWithSourceFrame:previousFrame:previousOutputFrame:opticalFlow:submissionMode:destinationFrame:")] + NativeHandle Constructor (VTFrameProcessorFrame sourceFrame, [NullAllowed] VTFrameProcessorFrame previousFrame, [NullAllowed] VTFrameProcessorFrame previousOutputFrame, [NullAllowed] VTFrameProcessorOpticalFlow opticalFlow, VTSuperResolutionScalerParametersSubmissionMode submissionMode, VTFrameProcessorFrame destinationFrame); + + [NullAllowed, Export ("previousFrame")] + VTFrameProcessorFrame PreviousFrame { get; } + + [NullAllowed, Export ("previousOutputFrame")] + VTFrameProcessorFrame PreviousOutputFrame { get; } + + [NullAllowed, Export ("opticalFlow")] + VTFrameProcessorOpticalFlow OpticalFlow { get; } + + [Export ("submissionMode")] + VTSuperResolutionScalerParametersSubmissionMode SubmissionMode { get; } + } + + [MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VTTemporalNoiseFilterConfiguration : VTFrameProcessorConfiguration { + [Export ("initWithFrameWidth:frameHeight:sourcePixelFormat:")] + NativeHandle Constructor (nint frameWidth, nint frameHeight, CMPixelFormat sourcePixelFormat); + + [Export ("frameWidth")] + nint FrameWidth { get; } + + [Export ("frameHeight")] + nint FrameHeight { get; } + + [Static] + [Export ("supportedSourcePixelFormats")] + [BindAs (typeof (CMPixelFormat []))] + NSNumber [] SupportedSourcePixelFormats { get; } + + [Static] + [Export ("supported")] + bool Supported { [Bind ("isSupported")] get; } + } + + [MacCatalyst (26, 0), NoTV, Mac (26, 0), iOS (26, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VTTemporalNoiseFilterParameters : VTFrameProcessorParameters { + [Export ("initWithSourceFrame:nextFrames:previousFrames:destinationFrame:filterStrength:hasDiscontinuity:")] + NativeHandle Constructor (VTFrameProcessorFrame sourceFrame, VTFrameProcessorFrame [] nextFrames, VTFrameProcessorFrame [] previousFrames, VTFrameProcessorFrame destinationFrame, float filterStrength, byte hasDiscontinuity); + + [Export ("nextFrames")] + VTFrameProcessorFrame [] NextFrames { get; } + + [Export ("previousFrames")] + VTFrameProcessorFrame [] PreviousFrames { get; } + + [Export ("filterStrength")] + float FilterStrength { get; set; } + + [Export ("hasDiscontinuity")] + bool HasDiscontinuity { get; set; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Flags] + public enum VTMotionEstimationFrameFlags : uint { + None = 0, + CurrentBufferWillBeNextReferenceBuffer = 1u << 0, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Flags] + public enum VTMotionEstimationInfoFlags : uint { + None = 0, + Reserved0 = 1u << 0, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Static] + interface VTMotionEstimationSessionCreationOptionKey { + [Field ("kVTMotionEstimationSessionCreationOption_MotionVectorSize")] + NSString MotionVectorSize { get; } + + [Field ("kVTMotionEstimationSessionCreationOption_UseMultiPassSearch")] + NSString UseMultiPassSearch { get; } + + [Field ("kVTMotionEstimationSessionCreationOption_Label")] + NSString Label { get; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface VTLowLatencySuperResolutionScalerParameters : VTFrameProcessorParameters { + [Export ("initWithSourceFrame:destinationFrame:")] + NativeHandle Constructor (VTFrameProcessorFrame sourceFrame, VTFrameProcessorFrame destinationFrame); + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [StrongDictionary ("VTMotionEstimationSessionCreationOptionKey", Suffix = "")] + interface VTMotionEstimationSessionCreationOption { + [Field ("kVTMotionEstimationSessionCreationOption_MotionVectorSize")] + nint MotionVectorSize { get; set; } + + [Field ("kVTMotionEstimationSessionCreationOption_UseMultiPassSearch")] + bool UseMultiPassSearch { get; set; } + + [Field ("kVTMotionEstimationSessionCreationOption_Label")] + string Label { get; set; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Static] + interface VTDecodeFrameOptionKey { + [Field ("kVTDecodeFrameOptionKey_ContentAnalyzerRotation")] + NSString ContentAnalyzerRotation { get; } + + [Field ("kVTDecodeFrameOptionKey_ContentAnalyzerCropRectangle")] + NSString ContentAnalyzerCropRectangle { get; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [StrongDictionary ("VTDecodeFrameOptionKey", Suffix = "")] + interface VTDecodeFrameOptions { + nint ContentAnalyzerRotation { get; set; } + CGRectDictionary ContentAnalyzerCropRectangle { get; set; } + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Native] + public enum VTSuperResolutionScalerConfigurationQualityPrioritization : long { + Normal = 1, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Native] + public enum VTSuperResolutionScalerConfigurationRevision : long { + Revision1 = 1, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Native] + public enum VTSuperResolutionScalerConfigurationInputType : long { + Video = 1, + Image = 2, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Native] + public enum VTSuperResolutionScalerConfigurationModelStatus : long { + DownloadRequired = 0, + Downloading = 1, + Ready = 2, + } + + [TV (26, 0), MacCatalyst (26, 0), Mac (26, 0), iOS (26, 0)] + [Native] + public enum VTSuperResolutionScalerParametersSubmissionMode : long { + Random = 1, + Sequential = 2, + } } diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index 9c7688ca4b69..1174464f6ab5 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -7497,9 +7497,20 @@ F:VideoSubscriberAccount.VSUserAccountType.Free F:VideoSubscriberAccount.VSUserAccountType.Paid F:VideoToolbox.HdrMetadataInsertionMode.Auto F:VideoToolbox.HdrMetadataInsertionMode.None +F:VideoToolbox.HdrMetadataInsertionMode.RequestSdrRangePreservation F:VideoToolbox.VTAlphaChannelMode.PremultipliedAlpha F:VideoToolbox.VTAlphaChannelMode.StraightAlpha +F:VideoToolbox.VTCameraCalibrationExtrinsicOriginSource.StereoCameraSystemBaseline +F:VideoToolbox.VTCameraCalibrationLensAlgorithmKind.ParametricLens +F:VideoToolbox.VTCameraCalibrationLensDomain.Color +F:VideoToolbox.VTCameraCalibrationLensRole.Left +F:VideoToolbox.VTCameraCalibrationLensRole.Mono +F:VideoToolbox.VTCameraCalibrationLensRole.Right +F:VideoToolbox.VTDecodeFrameFlags.None +F:VideoToolbox.VTDecodeInfoFlags.FrameInterrupted +F:VideoToolbox.VTDecodeInfoFlags.None F:VideoToolbox.VTDecodeInfoFlags.SkippedLeadingFrameDropped +F:VideoToolbox.VTFrameProcessorError.AssetDownloadFailed F:VideoToolbox.VTFrameProcessorError.FatalError F:VideoToolbox.VTFrameProcessorError.InitializationFailed F:VideoToolbox.VTFrameProcessorError.InvalidFrameTiming @@ -7520,16 +7531,26 @@ F:VideoToolbox.VTFrameRateConversionParametersSubmissionMode.Random F:VideoToolbox.VTFrameRateConversionParametersSubmissionMode.Sequential F:VideoToolbox.VTFrameRateConversionParametersSubmissionMode.SequentialReferencesUnchanged F:VideoToolbox.VTHdrPerFrameMetadataGenerationHdrFormatType.DolbyVision +F:VideoToolbox.VTHeroEye.Left +F:VideoToolbox.VTHeroEye.Right F:VideoToolbox.VTMotionBlurConfigurationQualityPrioritization.Normal F:VideoToolbox.VTMotionBlurConfigurationQualityPrioritization.Quality F:VideoToolbox.VTMotionBlurConfigurationRevision.Revision1 F:VideoToolbox.VTMotionBlurParametersSubmissionMode.Random F:VideoToolbox.VTMotionBlurParametersSubmissionMode.Sequential +F:VideoToolbox.VTMotionEstimationFrameFlags.CurrentBufferWillBeNextReferenceBuffer +F:VideoToolbox.VTMotionEstimationFrameFlags.None +F:VideoToolbox.VTMotionEstimationInfoFlags.None +F:VideoToolbox.VTMotionEstimationInfoFlags.Reserved0 F:VideoToolbox.VTOpticalFlowConfigurationQualityPrioritization.Normal F:VideoToolbox.VTOpticalFlowConfigurationQualityPrioritization.Quality F:VideoToolbox.VTOpticalFlowConfigurationRevision.Revision1 F:VideoToolbox.VTOpticalFlowParametersSubmissionMode.Random F:VideoToolbox.VTOpticalFlowParametersSubmissionMode.Sequential +F:VideoToolbox.VTProjectionKind.Equirectangular +F:VideoToolbox.VTProjectionKind.HalfEquirectangular +F:VideoToolbox.VTProjectionKind.ParametricImmersive +F:VideoToolbox.VTProjectionKind.Rectilinear F:VideoToolbox.VTQPModulationLevel.Default F:VideoToolbox.VTQPModulationLevel.Disable F:VideoToolbox.VTRotation.ClockwiseNinety @@ -7548,6 +7569,17 @@ F:VideoToolbox.VTStatus.VideoDecoderCallbackMessaging F:VideoToolbox.VTStatus.VideoDecoderReferenceMissing F:VideoToolbox.VTStatus.VideoDecoderUnknownErr F:VideoToolbox.VTStatus.VideoEncoderMVHEVCVideoLayerIDsMismatchErr +F:VideoToolbox.VTSuperResolutionScalerConfigurationInputType.Image +F:VideoToolbox.VTSuperResolutionScalerConfigurationInputType.Video +F:VideoToolbox.VTSuperResolutionScalerConfigurationModelStatus.Downloading +F:VideoToolbox.VTSuperResolutionScalerConfigurationModelStatus.DownloadRequired +F:VideoToolbox.VTSuperResolutionScalerConfigurationModelStatus.Ready +F:VideoToolbox.VTSuperResolutionScalerConfigurationQualityPrioritization.Normal +F:VideoToolbox.VTSuperResolutionScalerConfigurationRevision.Revision1 +F:VideoToolbox.VTSuperResolutionScalerParametersSubmissionMode.Random +F:VideoToolbox.VTSuperResolutionScalerParametersSubmissionMode.Sequential +F:VideoToolbox.VTViewPackingKind.OverUnder +F:VideoToolbox.VTViewPackingKind.SideBySide F:Vision.VNAnimalBodyPoseObservationJointName.LeftBackElbow F:Vision.VNAnimalBodyPoseObservationJointName.LeftBackKnee F:Vision.VNAnimalBodyPoseObservationJointName.LeftBackPaw @@ -11593,7 +11625,6 @@ M:Foundation.NSHost.op_Explicit(Foundation.NSHost)~System.Net.IPAddress M:Foundation.NSHost.op_Explicit(Foundation.NSHost)~System.Net.IPHostEntry M:Foundation.NSHost.op_Explicit(System.Net.IPAddress)~Foundation.NSHost M:Foundation.NSHost.op_Explicit(System.Net.IPHostEntry)~Foundation.NSHost -M:Foundation.NSIndexSet.#ctor(System.IntPtr) M:Foundation.NSInvocation.Dispose(System.Boolean) M:Foundation.NSItemProviderWriting_Extensions.LoadDataAsync(Foundation.INSItemProviderWriting,System.String,Foundation.NSProgress@) M:Foundation.NSKeyedArchiver.add_EncodedObject(System.EventHandler{Foundation.NSObjectEventArgs}) @@ -18147,19 +18178,27 @@ M:VideoSubscriberAccount.VSUserAccountManager.UpdateUserAccountAsync(VideoSubscr M:VideoToolbox.IVTFrameProcessorConfiguration.GetMaximumDimensions``1 M:VideoToolbox.IVTFrameProcessorConfiguration.GetMinimumDimensions``1 M:VideoToolbox.IVTFrameProcessorConfiguration.GetProcessorSupported``1 -M:VideoToolbox.VTCompressionSession.EncodeFrame(CoreVideo.CVImageBuffer,CoreMedia.CMTime,CoreMedia.CMTime,Foundation.NSDictionary,CoreVideo.CVImageBuffer,VideoToolbox.VTEncodeInfoFlags@) +M:VideoToolbox.VTCompressionSession.Dispose(System.Boolean) +M:VideoToolbox.VTDecompressionSession.Dispose(System.Boolean) M:VideoToolbox.VTFrameProcessor.EndSession M:VideoToolbox.VTFrameProcessor.Process(Metal.IMTLCommandBuffer,VideoToolbox.IVTFrameProcessorParameters) M:VideoToolbox.VTFrameProcessor.Process(VideoToolbox.IVTFrameProcessorParameters,Foundation.NSError@) +M:VideoToolbox.VTFrameProcessor.Process(VideoToolbox.IVTFrameProcessorParameters,VideoToolbox.VTFrameProcessorProcessFrameOutputHandler) M:VideoToolbox.VTFrameProcessor.Process(VideoToolbox.IVTFrameProcessorParameters,VideoToolbox.VTFrameProcessorProcessHandler) +M:VideoToolbox.VTFrameProcessor.ProcessAsync(VideoToolbox.IVTFrameProcessorParameters) M:VideoToolbox.VTFrameProcessor.StartSession(VideoToolbox.IVTFrameProcessorConfiguration,Foundation.NSError@) M:VideoToolbox.VTFrameProcessorFrame.#ctor(CoreVideo.CVPixelBuffer,CoreMedia.CMTime) M:VideoToolbox.VTFrameProcessorOpticalFlow.#ctor(CoreVideo.CVPixelBuffer,CoreVideo.CVPixelBuffer) M:VideoToolbox.VTFrameRateConversionConfiguration.#ctor(System.IntPtr,System.IntPtr,System.Boolean,VideoToolbox.VTFrameRateConversionConfigurationQualityPrioritization,VideoToolbox.VTFrameRateConversionConfigurationRevision) M:VideoToolbox.VTFrameRateConversionParameters.#ctor(VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorOpticalFlow,Foundation.NSNumber[],VideoToolbox.VTFrameRateConversionParametersSubmissionMode,VideoToolbox.VTFrameProcessorFrame[]) M:VideoToolbox.VTHdrPerFrameMetadataGenerationSession.#ctor(ObjCRuntime.NativeHandle,System.Boolean) +M:VideoToolbox.VTLowLatencyFrameInterpolationParameters.#ctor(VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame,System.Single[],VideoToolbox.VTFrameProcessorFrame[]) +M:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.#ctor(System.IntPtr,System.IntPtr,System.Single) +M:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.GetSupportedScaleFactors(System.IntPtr,System.IntPtr) +M:VideoToolbox.VTLowLatencySuperResolutionScalerParameters.#ctor(VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame) M:VideoToolbox.VTMotionBlurConfiguration.#ctor(System.IntPtr,System.IntPtr,System.Boolean,VideoToolbox.VTMotionBlurConfigurationQualityPrioritization,VideoToolbox.VTMotionBlurConfigurationRevision) M:VideoToolbox.VTMotionBlurParameters.#ctor(VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorOpticalFlow,VideoToolbox.VTFrameProcessorOpticalFlow,System.IntPtr,VideoToolbox.VTMotionBlurParametersSubmissionMode,VideoToolbox.VTFrameProcessorFrame) +M:VideoToolbox.VTMotionEstimationSession.Dispose(System.Boolean) M:VideoToolbox.VTOpticalFlowConfiguration.#ctor(System.IntPtr,System.IntPtr,VideoToolbox.VTOpticalFlowConfigurationQualityPrioritization,VideoToolbox.VTOpticalFlowConfigurationRevision) M:VideoToolbox.VTOpticalFlowParameters.#ctor(VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTOpticalFlowParametersSubmissionMode,VideoToolbox.VTFrameProcessorOpticalFlow) M:VideoToolbox.VTPixelRotationSession.Create @@ -18177,7 +18216,13 @@ M:VideoToolbox.VTPixelTransferSession.TransferImage(CoreVideo.CVPixelBuffer,Core M:VideoToolbox.VTProfessionalVideoWorkflow.RegisterVideoDecoders M:VideoToolbox.VTProfessionalVideoWorkflow.RegisterVideoEncoders M:VideoToolbox.VTRawProcessingSession.#ctor(ObjCRuntime.NativeHandle,System.Boolean) +M:VideoToolbox.VTSuperResolutionScalerConfiguration.#ctor(System.IntPtr,System.IntPtr,System.IntPtr,VideoToolbox.VTSuperResolutionScalerConfigurationInputType,System.Boolean,VideoToolbox.VTSuperResolutionScalerConfigurationQualityPrioritization,VideoToolbox.VTSuperResolutionScalerConfigurationRevision) +M:VideoToolbox.VTSuperResolutionScalerConfiguration.DownloadConfigurationModel(VideoToolbox.VTSuperResolutionScalerConfigurationDownloadConfigurationModelCallback) +M:VideoToolbox.VTSuperResolutionScalerConfiguration.DownloadConfigurationModelAsync +M:VideoToolbox.VTSuperResolutionScalerParameters.#ctor(VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorOpticalFlow,VideoToolbox.VTSuperResolutionScalerParametersSubmissionMode,VideoToolbox.VTFrameProcessorFrame) M:VideoToolbox.VTSupportedEncoderProperties.#ctor +M:VideoToolbox.VTTemporalNoiseFilterConfiguration.#ctor(System.IntPtr,System.IntPtr,CoreMedia.CMPixelFormat) +M:VideoToolbox.VTTemporalNoiseFilterParameters.#ctor(VideoToolbox.VTFrameProcessorFrame,VideoToolbox.VTFrameProcessorFrame[],VideoToolbox.VTFrameProcessorFrame[],VideoToolbox.VTFrameProcessorFrame,System.Single,System.Byte) M:VideoToolbox.VTUtilities.RegisterSupplementalVideoDecoder(CoreMedia.CMVideoCodecType) M:Vision.VNDetectBarcodesRequest.GetSupportedSymbologies(Foundation.NSError@) M:Vision.VNDetectContoursRequest.Dispose(System.Boolean) @@ -25758,10 +25803,17 @@ P:VideoToolbox.IVTFrameProcessorConfiguration.PreviousFrameCount P:VideoToolbox.IVTFrameProcessorConfiguration.WeakDestinationPixelBufferAttributes P:VideoToolbox.IVTFrameProcessorConfiguration.WeakFrameSupportedPixelFormats P:VideoToolbox.IVTFrameProcessorConfiguration.WeakSourcePixelBufferAttributes +P:VideoToolbox.IVTFrameProcessorParameters.DestinationFrame +P:VideoToolbox.IVTFrameProcessorParameters.DestinationFrames P:VideoToolbox.IVTFrameProcessorParameters.SourceFrame +P:VideoToolbox.VTCompressionPreset.Balanced +P:VideoToolbox.VTCompressionPreset.HighQuality +P:VideoToolbox.VTCompressionPreset.HighSpeed +P:VideoToolbox.VTCompressionPreset.VideoConferencing P:VideoToolbox.VTCompressionProperties.AlphaChannelMode P:VideoToolbox.VTCompressionProperties.BaseLayerBitRateFraction P:VideoToolbox.VTCompressionProperties.CalculateMeanSquaredError +P:VideoToolbox.VTCompressionProperties.CameraCalibrationDataLensCollection P:VideoToolbox.VTCompressionProperties.ConstantBitRate P:VideoToolbox.VTCompressionProperties.EnableLowLatencyRateControl P:VideoToolbox.VTCompressionProperties.EnableLtr @@ -25789,10 +25841,31 @@ P:VideoToolbox.VTCompressionProperties.ReferenceBufferCount P:VideoToolbox.VTCompressionProperties.SpatialAdaptiveQPLevel P:VideoToolbox.VTCompressionProperties.StereoCameraBaseline P:VideoToolbox.VTCompressionProperties.SuggestedLookAheadFrameCount +P:VideoToolbox.VTCompressionProperties.SupportedPresetDictionaries P:VideoToolbox.VTCompressionProperties.SupportsBaseFrameQP P:VideoToolbox.VTCompressionProperties.TargetQualityForAlpha P:VideoToolbox.VTCompressionProperties.UsingGpuRegistryId +P:VideoToolbox.VTCompressionProperties.VariableBitRate +P:VideoToolbox.VTCompressionProperties.VbvBufferDuration +P:VideoToolbox.VTCompressionProperties.VbvInitialDelayPercentage +P:VideoToolbox.VTCompressionProperties.VbvMaxBitRate P:VideoToolbox.VTCompressionProperties.ViewPackingKind +P:VideoToolbox.VTCompressionProperties.VTHeroEye +P:VideoToolbox.VTCompressionPropertyCameraCalibration.ExtrinsicOrientationQuaternion +P:VideoToolbox.VTCompressionPropertyCameraCalibration.ExtrinsicOriginSource +P:VideoToolbox.VTCompressionPropertyCameraCalibration.IntrinsicMatrix +P:VideoToolbox.VTCompressionPropertyCameraCalibration.IntrinsicMatrixProjectionOffset +P:VideoToolbox.VTCompressionPropertyCameraCalibration.IntrinsicMatrixReferenceDimensions +P:VideoToolbox.VTCompressionPropertyCameraCalibration.LensAlgorithmKind +P:VideoToolbox.VTCompressionPropertyCameraCalibration.LensDistortions +P:VideoToolbox.VTCompressionPropertyCameraCalibration.LensDomain +P:VideoToolbox.VTCompressionPropertyCameraCalibration.LensFrameAdjustmentsPolynomialX +P:VideoToolbox.VTCompressionPropertyCameraCalibration.LensFrameAdjustmentsPolynomialY +P:VideoToolbox.VTCompressionPropertyCameraCalibration.LensIdentifier +P:VideoToolbox.VTCompressionPropertyCameraCalibration.LensRole +P:VideoToolbox.VTCompressionPropertyCameraCalibration.RadialAngleLimit +P:VideoToolbox.VTDecodeFrameOptions.ContentAnalyzerCropRectangle +P:VideoToolbox.VTDecodeFrameOptions.ContentAnalyzerRotation P:VideoToolbox.VTDecoderExtensionProperties.CodecName P:VideoToolbox.VTDecoderExtensionProperties.ContainingBundleName P:VideoToolbox.VTDecoderExtensionProperties.ContainingBundleUrl @@ -25823,12 +25896,14 @@ P:VideoToolbox.VTFrameRateConversionConfiguration.ProcessorSupported P:VideoToolbox.VTFrameRateConversionConfiguration.QualityPrioritization P:VideoToolbox.VTFrameRateConversionConfiguration.Revision P:VideoToolbox.VTFrameRateConversionConfiguration.SourcePixelBufferAttributes +P:VideoToolbox.VTFrameRateConversionConfiguration.Supported P:VideoToolbox.VTFrameRateConversionConfiguration.SupportedRevisions P:VideoToolbox.VTFrameRateConversionConfiguration.UsePrecomputedFlow P:VideoToolbox.VTFrameRateConversionConfiguration.WeakDestinationPixelBufferAttributes P:VideoToolbox.VTFrameRateConversionConfiguration.WeakFrameSupportedPixelFormats P:VideoToolbox.VTFrameRateConversionConfiguration.WeakSourcePixelBufferAttributes P:VideoToolbox.VTFrameRateConversionConfiguration.WeakSupportedRevisions +P:VideoToolbox.VTFrameRateConversionParameters.DestinationFrame P:VideoToolbox.VTFrameRateConversionParameters.DestinationFrames P:VideoToolbox.VTFrameRateConversionParameters.InterpolationPhase P:VideoToolbox.VTFrameRateConversionParameters.NextFrame @@ -25836,6 +25911,45 @@ P:VideoToolbox.VTFrameRateConversionParameters.OpticalFlow P:VideoToolbox.VTFrameRateConversionParameters.SourceFrame P:VideoToolbox.VTFrameRateConversionParameters.SubmissionMode P:VideoToolbox.VTHdrPerFrameMetadataGenerationOptions.HdrFormats +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.DestinationPixelBufferAttributes +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.FrameHeight +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.FrameSupportedPixelFormats +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.FrameWidth +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.MaximumDimensions +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.MinimumDimensions +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.NextFrameCount +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.NumberOfInterpolatedFrames +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.PreviousFrameCount +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.ProcessorSupported +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.SourcePixelBufferAttributes +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.SpatialScaleFactor +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.Supported +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.WeakDestinationPixelBufferAttributes +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.WeakFrameSupportedPixelFormats +P:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration.WeakSourcePixelBufferAttributes +P:VideoToolbox.VTLowLatencyFrameInterpolationParameters.DestinationFrame +P:VideoToolbox.VTLowLatencyFrameInterpolationParameters.DestinationFrames +P:VideoToolbox.VTLowLatencyFrameInterpolationParameters.InterpolationPhase +P:VideoToolbox.VTLowLatencyFrameInterpolationParameters.PreviousFrame +P:VideoToolbox.VTLowLatencyFrameInterpolationParameters.SourceFrame +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.DestinationPixelBufferAttributes +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.FrameHeight +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.FrameSupportedPixelFormats +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.FrameWidth +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.MaximumDimensions +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.MinimumDimensions +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.NextFrameCount +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.PreviousFrameCount +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.ProcessorSupported +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.ScaleFactor +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.SourcePixelBufferAttributes +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.Supported +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.WeakDestinationPixelBufferAttributes +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.WeakFrameSupportedPixelFormats +P:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration.WeakSourcePixelBufferAttributes +P:VideoToolbox.VTLowLatencySuperResolutionScalerParameters.DestinationFrame +P:VideoToolbox.VTLowLatencySuperResolutionScalerParameters.DestinationFrames +P:VideoToolbox.VTLowLatencySuperResolutionScalerParameters.SourceFrame P:VideoToolbox.VTMotionBlurConfiguration.DefaultRevision P:VideoToolbox.VTMotionBlurConfiguration.DestinationPixelBufferAttributes P:VideoToolbox.VTMotionBlurConfiguration.FrameHeight @@ -25849,6 +25963,7 @@ P:VideoToolbox.VTMotionBlurConfiguration.ProcessorSupported P:VideoToolbox.VTMotionBlurConfiguration.QualityPrioritization P:VideoToolbox.VTMotionBlurConfiguration.Revision P:VideoToolbox.VTMotionBlurConfiguration.SourcePixelBufferAttributes +P:VideoToolbox.VTMotionBlurConfiguration.Supported P:VideoToolbox.VTMotionBlurConfiguration.SupportedRevisions P:VideoToolbox.VTMotionBlurConfiguration.UsePrecomputedFlow P:VideoToolbox.VTMotionBlurConfiguration.WeakDestinationPixelBufferAttributes @@ -25856,6 +25971,7 @@ P:VideoToolbox.VTMotionBlurConfiguration.WeakFrameSupportedPixelFormats P:VideoToolbox.VTMotionBlurConfiguration.WeakSourcePixelBufferAttributes P:VideoToolbox.VTMotionBlurConfiguration.WeakSupportedRevisions P:VideoToolbox.VTMotionBlurParameters.DestinationFrame +P:VideoToolbox.VTMotionBlurParameters.DestinationFrames P:VideoToolbox.VTMotionBlurParameters.MotionBlurStrength P:VideoToolbox.VTMotionBlurParameters.NextFrame P:VideoToolbox.VTMotionBlurParameters.NextOpticalFlow @@ -25863,6 +25979,9 @@ P:VideoToolbox.VTMotionBlurParameters.PreviousFrame P:VideoToolbox.VTMotionBlurParameters.PreviousOpticalFlow P:VideoToolbox.VTMotionBlurParameters.SourceFrame P:VideoToolbox.VTMotionBlurParameters.SubmissionMode +P:VideoToolbox.VTMotionEstimationSessionCreationOption.Label +P:VideoToolbox.VTMotionEstimationSessionCreationOption.MotionVectorSize +P:VideoToolbox.VTMotionEstimationSessionCreationOption.UseMultiPassSearch P:VideoToolbox.VTOpticalFlowConfiguration.DefaultRevision P:VideoToolbox.VTOpticalFlowConfiguration.DestinationPixelBufferAttributes P:VideoToolbox.VTOpticalFlowConfiguration.FrameHeight @@ -25876,11 +25995,14 @@ P:VideoToolbox.VTOpticalFlowConfiguration.ProcessorSupported P:VideoToolbox.VTOpticalFlowConfiguration.QualityPrioritization P:VideoToolbox.VTOpticalFlowConfiguration.Revision P:VideoToolbox.VTOpticalFlowConfiguration.SourcePixelBufferAttributes +P:VideoToolbox.VTOpticalFlowConfiguration.Supported P:VideoToolbox.VTOpticalFlowConfiguration.SupportedRevisions P:VideoToolbox.VTOpticalFlowConfiguration.WeakDestinationPixelBufferAttributes P:VideoToolbox.VTOpticalFlowConfiguration.WeakFrameSupportedPixelFormats P:VideoToolbox.VTOpticalFlowConfiguration.WeakSourcePixelBufferAttributes P:VideoToolbox.VTOpticalFlowConfiguration.WeakSupportedRevisions +P:VideoToolbox.VTOpticalFlowParameters.DestinationFrame +P:VideoToolbox.VTOpticalFlowParameters.DestinationFrames P:VideoToolbox.VTOpticalFlowParameters.DestinationOpticalFlow P:VideoToolbox.VTOpticalFlowParameters.NextFrame P:VideoToolbox.VTOpticalFlowParameters.SourceFrame @@ -25908,6 +26030,7 @@ P:VideoToolbox.VTRawProcessingParameterValueType.Float P:VideoToolbox.VTRawProcessingParameterValueType.Integer P:VideoToolbox.VTRawProcessingParameterValueType.List P:VideoToolbox.VTRawProcessingParameterValueType.SubGroup +P:VideoToolbox.VTRawProcessingProperty.MetadataForSidecarFile P:VideoToolbox.VTRawProcessingProperty.MetalDeviceRegistryId P:VideoToolbox.VTRawProcessingProperty.OutputColorAttachments P:VideoToolbox.VTSampleAttachmentQualityMetrics.ChromaBlueMeanSquaredError @@ -25915,6 +26038,59 @@ P:VideoToolbox.VTSampleAttachmentQualityMetrics.ChromaRedMeanSquaredError P:VideoToolbox.VTSampleAttachmentQualityMetrics.LumaMeanSquaredError P:VideoToolbox.VTSampleAttachments.QualityMetrics P:VideoToolbox.VTSampleAttachments.RequireLtrAcknowledgementToken +P:VideoToolbox.VTSuperResolutionScalerConfiguration.ConfigurationModelPercentageAvailable +P:VideoToolbox.VTSuperResolutionScalerConfiguration.ConfigurationModelStatus +P:VideoToolbox.VTSuperResolutionScalerConfiguration.DefaultRevision +P:VideoToolbox.VTSuperResolutionScalerConfiguration.DestinationPixelBufferAttributes +P:VideoToolbox.VTSuperResolutionScalerConfiguration.FrameHeight +P:VideoToolbox.VTSuperResolutionScalerConfiguration.FrameSupportedPixelFormats +P:VideoToolbox.VTSuperResolutionScalerConfiguration.FrameWidth +P:VideoToolbox.VTSuperResolutionScalerConfiguration.InputType +P:VideoToolbox.VTSuperResolutionScalerConfiguration.MaximumDimensions +P:VideoToolbox.VTSuperResolutionScalerConfiguration.MinimumDimensions +P:VideoToolbox.VTSuperResolutionScalerConfiguration.NextFrameCount +P:VideoToolbox.VTSuperResolutionScalerConfiguration.PrecomputedFlow +P:VideoToolbox.VTSuperResolutionScalerConfiguration.PreviousFrameCount +P:VideoToolbox.VTSuperResolutionScalerConfiguration.ProcessorSupported +P:VideoToolbox.VTSuperResolutionScalerConfiguration.QualityPrioritization +P:VideoToolbox.VTSuperResolutionScalerConfiguration.Revision +P:VideoToolbox.VTSuperResolutionScalerConfiguration.ScaleFactor +P:VideoToolbox.VTSuperResolutionScalerConfiguration.SourcePixelBufferAttributes +P:VideoToolbox.VTSuperResolutionScalerConfiguration.Supported +P:VideoToolbox.VTSuperResolutionScalerConfiguration.SupportedRevisions +P:VideoToolbox.VTSuperResolutionScalerConfiguration.SupportedScaleFactors +P:VideoToolbox.VTSuperResolutionScalerConfiguration.WeakDestinationPixelBufferAttributes +P:VideoToolbox.VTSuperResolutionScalerConfiguration.WeakFrameSupportedPixelFormats +P:VideoToolbox.VTSuperResolutionScalerConfiguration.WeakSourcePixelBufferAttributes +P:VideoToolbox.VTSuperResolutionScalerParameters.DestinationFrame +P:VideoToolbox.VTSuperResolutionScalerParameters.DestinationFrames +P:VideoToolbox.VTSuperResolutionScalerParameters.OpticalFlow +P:VideoToolbox.VTSuperResolutionScalerParameters.PreviousFrame +P:VideoToolbox.VTSuperResolutionScalerParameters.PreviousOutputFrame +P:VideoToolbox.VTSuperResolutionScalerParameters.SourceFrame +P:VideoToolbox.VTSuperResolutionScalerParameters.SubmissionMode +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.DestinationPixelBufferAttributes +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.FrameHeight +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.FrameSupportedPixelFormats +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.FrameWidth +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.MaximumDimensions +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.MinimumDimensions +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.NextFrameCount +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.PreviousFrameCount +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.ProcessorSupported +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.SourcePixelBufferAttributes +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.Supported +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.SupportedSourcePixelFormats +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.WeakDestinationPixelBufferAttributes +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.WeakFrameSupportedPixelFormats +P:VideoToolbox.VTTemporalNoiseFilterConfiguration.WeakSourcePixelBufferAttributes +P:VideoToolbox.VTTemporalNoiseFilterParameters.DestinationFrame +P:VideoToolbox.VTTemporalNoiseFilterParameters.DestinationFrames +P:VideoToolbox.VTTemporalNoiseFilterParameters.FilterStrength +P:VideoToolbox.VTTemporalNoiseFilterParameters.HasDiscontinuity +P:VideoToolbox.VTTemporalNoiseFilterParameters.NextFrames +P:VideoToolbox.VTTemporalNoiseFilterParameters.PreviousFrames +P:VideoToolbox.VTTemporalNoiseFilterParameters.SourceFrame P:VideoToolbox.VTVideoEncoder.GpuRegistryId P:VideoToolbox.VTVideoEncoder.IncludeStandardDefinitionDVEncoders P:VideoToolbox.VTVideoEncoder.InstanceLimit @@ -30077,12 +30253,23 @@ T:VideoSubscriberAccount.VSUserAccountQueryOptions T:VideoSubscriberAccount.VSUserAccountType T:VideoToolbox.HdrMetadataInsertionMode T:VideoToolbox.VTAlphaChannelMode +T:VideoToolbox.VTCameraCalibrationExtrinsicOriginSource +T:VideoToolbox.VTCameraCalibrationLensAlgorithmKind +T:VideoToolbox.VTCameraCalibrationLensDomain +T:VideoToolbox.VTCameraCalibrationLensRole +T:VideoToolbox.VTCompressionPreset +T:VideoToolbox.VTCompressionPresetKey +T:VideoToolbox.VTCompressionPropertyCameraCalibration +T:VideoToolbox.VTCompressionPropertyCameraCalibrationKey +T:VideoToolbox.VTDecodeFrameOptionKey +T:VideoToolbox.VTDecodeFrameOptions T:VideoToolbox.VTDecoderExtensionProperties T:VideoToolbox.VTExtensionPropertiesKey T:VideoToolbox.VTFrameProcessor T:VideoToolbox.VTFrameProcessorError T:VideoToolbox.VTFrameProcessorFrame T:VideoToolbox.VTFrameProcessorOpticalFlow +T:VideoToolbox.VTFrameProcessorProcessFrameOutputHandler T:VideoToolbox.VTFrameProcessorProcessHandler T:VideoToolbox.VTFrameRateConversionConfiguration T:VideoToolbox.VTFrameRateConversionConfigurationQualityPrioritization @@ -30092,11 +30279,20 @@ T:VideoToolbox.VTFrameRateConversionParametersSubmissionMode T:VideoToolbox.VTHdrPerFrameMetadataGenerationHdrFormatType T:VideoToolbox.VTHdrPerFrameMetadataGenerationOptions T:VideoToolbox.VTHdrPerFrameMetadataGenerationOptionsKey +T:VideoToolbox.VTHeroEye +T:VideoToolbox.VTLowLatencyFrameInterpolationConfiguration +T:VideoToolbox.VTLowLatencyFrameInterpolationParameters +T:VideoToolbox.VTLowLatencySuperResolutionScalerConfiguration +T:VideoToolbox.VTLowLatencySuperResolutionScalerParameters T:VideoToolbox.VTMotionBlurConfiguration T:VideoToolbox.VTMotionBlurConfigurationQualityPrioritization T:VideoToolbox.VTMotionBlurConfigurationRevision T:VideoToolbox.VTMotionBlurParameters T:VideoToolbox.VTMotionBlurParametersSubmissionMode +T:VideoToolbox.VTMotionEstimationFrameFlags +T:VideoToolbox.VTMotionEstimationInfoFlags +T:VideoToolbox.VTMotionEstimationSessionCreationOption +T:VideoToolbox.VTMotionEstimationSessionCreationOptionKey T:VideoToolbox.VTOpticalFlowConfiguration T:VideoToolbox.VTOpticalFlowConfigurationQualityPrioritization T:VideoToolbox.VTOpticalFlowConfigurationRevision @@ -30107,6 +30303,7 @@ T:VideoToolbox.VTPixelRotationPropertyKeys T:VideoToolbox.VTPixelRotationSession T:VideoToolbox.VTPixelTransferSession T:VideoToolbox.VTProfessionalVideoWorkflow +T:VideoToolbox.VTProjectionKind T:VideoToolbox.VTQPModulationLevel T:VideoToolbox.VTRawProcessingParameterKey T:VideoToolbox.VTRawProcessingParameterListElementKey @@ -30122,6 +30319,17 @@ T:VideoToolbox.VTSampleAttachmentKey T:VideoToolbox.VTSampleAttachmentQualityMetrics T:VideoToolbox.VTSampleAttachmentQualityMetricsKey T:VideoToolbox.VTSampleAttachments +T:VideoToolbox.VTSuperResolutionScalerConfiguration +T:VideoToolbox.VTSuperResolutionScalerConfigurationDownloadConfigurationModelCallback +T:VideoToolbox.VTSuperResolutionScalerConfigurationInputType +T:VideoToolbox.VTSuperResolutionScalerConfigurationModelStatus +T:VideoToolbox.VTSuperResolutionScalerConfigurationQualityPrioritization +T:VideoToolbox.VTSuperResolutionScalerConfigurationRevision +T:VideoToolbox.VTSuperResolutionScalerParameters +T:VideoToolbox.VTSuperResolutionScalerParametersSubmissionMode +T:VideoToolbox.VTTemporalNoiseFilterConfiguration +T:VideoToolbox.VTTemporalNoiseFilterParameters +T:VideoToolbox.VTViewPackingKind T:Vision.VNAnimalBodyPoseObservationJointName T:Vision.VNAnimalBodyPoseObservationJointsGroupName T:Vision.VNAnimalIdentifier diff --git a/tests/introspection/ApiCMAttachmentTest.cs b/tests/introspection/ApiCMAttachmentTest.cs index 0b685316812f..cd12f83c70d8 100644 --- a/tests/introspection/ApiCMAttachmentTest.cs +++ b/tests/introspection/ApiCMAttachmentTest.cs @@ -247,6 +247,7 @@ protected virtual bool Skip (string nativeName) return true; #endif return false; + case "VTMotionEstimationSession": case "MTLIOCompressionContext": case "CGRenderingBufferProvider": return true; diff --git a/tests/introspection/ApiProtocolTest.cs b/tests/introspection/ApiProtocolTest.cs index 7aa51ac5bab4..a966921bad0d 100644 --- a/tests/introspection/ApiProtocolTest.cs +++ b/tests/introspection/ApiProtocolTest.cs @@ -159,6 +159,20 @@ protected virtual bool Skip (Type type) case "MTLTensorExtents": case "MTLTensorReferenceType": case "MTLTextureViewDescriptor": + case "VTFrameRateConversionConfiguration": + case "VTFrameRateConversionParameters": + case "VTLowLatencyFrameInterpolationConfiguration": + case "VTLowLatencyFrameInterpolationParameters": + case "VTLowLatencySuperResolutionScalerConfiguration": + case "VTLowLatencySuperResolutionScalerParameters": + case "VTMotionBlurConfiguration": + case "VTMotionBlurParameters": + case "VTOpticalFlowConfiguration": + case "VTOpticalFlowParameters": + case "VTSuperResolutionScalerConfiguration": + case "VTSuperResolutionScalerParameters": + case "VTTemporalNoiseFilterConfiguration": + case "VTTemporalNoiseFilterParameters": if (TestRuntime.IsSimulator) return true; goto default; diff --git a/tests/introspection/ApiSelectorTest.cs b/tests/introspection/ApiSelectorTest.cs index 3a134074a02a..c6ce28740154 100644 --- a/tests/introspection/ApiSelectorTest.cs +++ b/tests/introspection/ApiSelectorTest.cs @@ -1238,7 +1238,73 @@ protected virtual bool Skip (Type type, string selectorName) break; } break; - + case "VTLowLatencyFrameInterpolationConfiguration": + switch (selectorName) { + case "isSupported": + if (TestRuntime.IsSimulator) + return true; + break; + } + break; + case "VTFrameRateConversionConfiguration": + switch (selectorName) { + case "defaultRevision": + case "isSupported": + case "supportedRevisions": + if (TestRuntime.IsSimulator) + return true; + break; + } + break; + case "VTLowLatencySuperResolutionScalerConfiguration": + switch (selectorName) { + case "supportedScaleFactorsForFrameWidth:frameHeight:": + case "isSupported": + if (TestRuntime.IsSimulator) + return true; + break; + } + break; + case "VTMotionBlurConfiguration": + switch (selectorName) { + case "defaultRevision": + case "isSupported": + case "supportedRevisions": + if (TestRuntime.IsSimulator) + return true; + break; + } + break; + case "VTOpticalFlowConfiguration": + switch (selectorName) { + case "defaultRevision": + case "isSupported": + case "supportedRevisions": + if (TestRuntime.IsSimulator) + return true; + break; + } + break; + case "VTSuperResolutionScalerConfiguration": + switch (selectorName) { + case "defaultRevision": + case "isSupported": + case "supportedRevisions": + case "supportedScaleFactors": + if (TestRuntime.IsSimulator) + return true; + break; + } + break; + case "VTTemporalNoiseFilterConfiguration": + switch (selectorName) { + case "isSupported": + case "supportedSourcePixelFormats": + if (TestRuntime.IsSimulator) + return true; + break; + } + break; } // old binding mistake diff --git a/tests/monotouch-test/CoreFoundation/DictionaryContainerTest.cs b/tests/monotouch-test/CoreFoundation/DictionaryContainerTest.cs new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/tests/monotouch-test/CoreMedia/CMFormatDescriptionTest.cs b/tests/monotouch-test/CoreMedia/CMFormatDescriptionTest.cs index 4346869f82a7..4fb670f642da 100644 --- a/tests/monotouch-test/CoreMedia/CMFormatDescriptionTest.cs +++ b/tests/monotouch-test/CoreMedia/CMFormatDescriptionTest.cs @@ -211,5 +211,57 @@ public void VideoFormatDescriptionConstructors () Assert.AreEqual (24, ext.BytesPerRow, "Extensions.BytesPerRow #3"); } } + + [Test] + public void TagCollections () + { + TestRuntime.AssertXcodeVersion (26, 0); + + using var assetUrl = NSBundle.MainBundle.GetUrlForResource ("hummingbird", "mov"); + using var asset = AVAsset.FromUrl (assetUrl); + var videoTracks = asset.TracksWithMediaType (AVMediaTypes.Video.GetConstant ()); + var videoTrack = videoTracks [0]; + var formatDescriptor = videoTrack.FormatDescriptions [0] as CMVideoFormatDescription; + + Assert.Multiple (() => { + { + var collections = formatDescriptor.TagCollections; + Assert.That (collections.Length, Is.EqualTo (2), "Tag Collections Length A"); + Assert.That (collections [0].Tags.Length, Is.EqualTo (2), "Tag Collections [0].Tags.Length A"); + Assert.That (collections [0].Tags [0].Category, Is.EqualTo (CMTagCategory.StereoView), "Tag Collections [0].Tags [0].Category A"); + Assert.That (collections [0].Tags [0].DataType, Is.EqualTo (CMTagDataType.Flags), "Tag Collections [0].Tags [0].DataType A"); + Assert.That (collections [0].Tags [0].Value, Is.EqualTo ((ulong) 1), "Tag Collections [0].Tags [0].Value A"); + Assert.That (collections [0].Tags [1].Category, Is.EqualTo (CMTagCategory.VideoLayerId), "Tag Collections [0].Tags [1].Category A"); + Assert.That (collections [0].Tags [1].DataType, Is.EqualTo (CMTagDataType.SInt64), "Tag Collections [0].Tags [1].DataType A"); + Assert.That (collections [0].Tags [1].Value, Is.EqualTo ((ulong) 0), "Tag Collections [0].Tags [1].Value A"); + Assert.That (collections [1].Tags.Length, Is.EqualTo (2), "Tag Collections [1].Length A"); + Assert.That (collections [1].Tags [0].Category, Is.EqualTo (CMTagCategory.StereoView), "Tag Collections [1].Tags [0].Category A"); + Assert.That (collections [1].Tags [0].DataType, Is.EqualTo (CMTagDataType.Flags), "Tag Collections [1].Tags [0].DataType A"); + Assert.That (collections [1].Tags [0].Value, Is.EqualTo ((ulong) 2), "Tag Collections [1].Tags [0].Value A"); + Assert.That (collections [1].Tags [1].Category, Is.EqualTo (CMTagCategory.VideoLayerId), "Tag Collections [1].Tags [1].Category A"); + Assert.That (collections [1].Tags [1].DataType, Is.EqualTo (CMTagDataType.SInt64), "Tag Collections [1].Tags [1].DataType A"); + Assert.That (collections [1].Tags [1].Value, Is.EqualTo ((ulong) 1), "Tag Collections [1].Tags [1].Value A"); + } + { + var rv = formatDescriptor.GetTagCollections (out var collections); + Assert.That (rv, Is.EqualTo (CMFormatDescriptionError.None), "Tag Collections Error B"); + Assert.That (collections.Length, Is.EqualTo (2), "Tag Collections Length B"); + Assert.That (collections [0].Tags.Length, Is.EqualTo (2), "Tag Collections [0].Tags.Length B"); + Assert.That (collections [0].Tags [0].Category, Is.EqualTo (CMTagCategory.StereoView), "Tag Collections [0].Tags [0].Category B"); + Assert.That (collections [0].Tags [0].DataType, Is.EqualTo (CMTagDataType.Flags), "Tag Collections [0].Tags [0].DataType B"); + Assert.That (collections [0].Tags [0].Value, Is.EqualTo ((ulong) 1), "Tag Collections [0].Tags [0].Value B"); + Assert.That (collections [0].Tags [1].Category, Is.EqualTo (CMTagCategory.VideoLayerId), "Tag Collections [0].Tags [1].Category B"); + Assert.That (collections [0].Tags [1].DataType, Is.EqualTo (CMTagDataType.SInt64), "Tag Collections [0].Tags [1].DataType B"); + Assert.That (collections [0].Tags [1].Value, Is.EqualTo ((ulong) 0), "Tag Collections [0].Tags [1].Value B"); + Assert.That (collections [1].Tags.Length, Is.EqualTo (2), "Tag Collections [1].Length B"); + Assert.That (collections [1].Tags [0].Category, Is.EqualTo (CMTagCategory.StereoView), "Tag Collections [1].Tags [0].Category B"); + Assert.That (collections [1].Tags [0].DataType, Is.EqualTo (CMTagDataType.Flags), "Tag Collections [1].Tags [0].DataType B"); + Assert.That (collections [1].Tags [0].Value, Is.EqualTo ((ulong) 2), "Tag Collections [1].Tags [0].Value B"); + Assert.That (collections [1].Tags [1].Category, Is.EqualTo (CMTagCategory.VideoLayerId), "Tag Collections [1].Tags [1].Category B"); + Assert.That (collections [1].Tags [1].DataType, Is.EqualTo (CMTagDataType.SInt64), "Tag Collections [1].Tags [1].DataType B"); + Assert.That (collections [1].Tags [1].Value, Is.EqualTo ((ulong) 1), "Tag Collections [1].Tags [1].Value B"); + } + }); + } } } diff --git a/tests/monotouch-test/Foundation/DictionaryContainerTest.cs b/tests/monotouch-test/Foundation/DictionaryContainerTest.cs index 9b7cb4a0213f..40e290b1ea2d 100644 --- a/tests/monotouch-test/Foundation/DictionaryContainerTest.cs +++ b/tests/monotouch-test/Foundation/DictionaryContainerTest.cs @@ -15,6 +15,8 @@ using CoreMedia; using Foundation; using ObjCRuntime; +using VideoToolbox; + using NUnit.Framework; #if HAS_UIKIT @@ -624,5 +626,43 @@ public void WrappedNSDictionary () #endif // HAS_UIKIT }); } + + [Test] + public void Matrix () + { + TestRuntime.AssertXcodeVersion (26, 0); + + Assert.Multiple (() => { + var dict = new VTCompressionPropertyCameraCalibration (); + + Assert.IsNull (dict.IntrinsicMatrix, "IntrinsicMatrix"); + + var matrix = new NMatrix3 (1, 2, 3, 4, 5, 6, 7, 8, 9); + dict.IntrinsicMatrix = matrix; + Assert.AreEqual (matrix, dict.IntrinsicMatrix, "IntrinsicMatrix 2"); + + dict.IntrinsicMatrix = null; + Assert.IsNull (dict.IntrinsicMatrix, "IntrinsicMatrix 3"); + }); + } + + [Test] + public void FloatArray () + { + TestRuntime.AssertXcodeVersion (26, 0); + + Assert.Multiple (() => { + var dict = new VTCompressionPropertyCameraCalibration (); + + Assert.IsNull (dict.LensDistortions, "LensDistortions"); + + var array = new float [] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; + dict.LensDistortions = array; + Assert.AreEqual (array, dict.LensDistortions, "LensDistortions 2"); + + dict.LensDistortions = null; + Assert.IsNull (dict.LensDistortions, "LensDistortions 3"); + }); + } } } diff --git a/tests/monotouch-test/VideoToolbox/VTCompressionPropertyCameraCalibrationTest.cs b/tests/monotouch-test/VideoToolbox/VTCompressionPropertyCameraCalibrationTest.cs new file mode 100644 index 000000000000..4bfc0b15ca9e --- /dev/null +++ b/tests/monotouch-test/VideoToolbox/VTCompressionPropertyCameraCalibrationTest.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; + +using Foundation; +using CoreGraphics; +using ObjCRuntime; +using VideoToolbox; + +using NUnit.Framework; + +namespace MonoTouchFixtures.VideoToolbox; + +[TestFixture] +[Preserve (AllMembers = true)] +public class VTCompressionPropertyCameraCalibrationTest { + [Test] + public void DefaultValues () + { + TestRuntime.AssertXcodeVersion (26, 0); + + Assert.Multiple (() => { + var dict = new VTCompressionPropertyCameraCalibration (); + + Assert.IsNull (dict.LensAlgorithmKind, "LensAlgorithmKind"); + Assert.IsNull (dict.LensDomain, "LensDomain"); + Assert.IsNull (dict.LensIdentifier, "LensIdentifier"); + Assert.IsNull (dict.LensRole, "LensRole"); + Assert.IsNull (dict.LensDistortions, "LensDistortions"); + Assert.IsNull (dict.RadialAngleLimit, "RadialAngleLimit"); + Assert.IsNull (dict.LensFrameAdjustmentsPolynomialX, "LensFrameAdjustmentsPolynomialX"); + Assert.IsNull (dict.LensFrameAdjustmentsPolynomialY, "LensFrameAdjustmentsPolynomialY"); + Assert.IsNull (dict.IntrinsicMatrix, "IntrinsicMatrix"); + Assert.IsNull (dict.IntrinsicMatrixProjectionOffset, "IntrinsicMatrixProjectionOffset"); + Assert.IsNull (dict.IntrinsicMatrixReferenceDimensions, "IntrinsicMatrixReferenceDimensions"); + Assert.IsNull (dict.ExtrinsicOriginSource, "ExtrinsicOriginSource"); + Assert.IsNull (dict.ExtrinsicOrientationQuaternion, "ExtrinsicOrientationQuaternion"); + Assert.That (dict.ToString (), Is.EqualTo ("VideoToolbox.VTCompressionPropertyCameraCalibration"), "ToString"); + Assert.That (dict.Dictionary.ToString (), Is.EqualTo ("{\n}"), "ToString"); + }); + } +} diff --git a/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs b/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs index 02b8959538f7..fe8e2859c330 100644 --- a/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs +++ b/tests/monotouch-test/VideoToolbox/VTCompressionSessionTests.cs @@ -148,13 +148,37 @@ public void CompressionSessionGetSerializablePropertiesTest () } } - VTCompressionSession CreateSession () + VTCompressionSession CreateSession (int width = 1024, int height = 768) { - var session = VTCompressionSession.Create (1024, 768, CMVideoCodecType.H264, + var session = VTCompressionSession.Create (width, height, CMVideoCodecType.H264, (sourceFrame, status, flags, buffer) => { }); return session; } + + VTCompressionSession CreateSession2 (bool stronglyTyped, int width = 640, int height = 480, CMVideoCodecType codecType = CMVideoCodecType.H264, VTCompressionSession.VTCompressionOutputCallback? callback = null, CVPixelBufferAttributes? source_attributes = null) + { + VTCompressionSession rv; + if (stronglyTyped) { + rv = VTCompressionSession.Create ( + width, height, + codecType, + callback, + null, + source_attributes + ); + } else { + rv = VTCompressionSession.Create ( + width, height, + codecType, + callback, + null, + source_attributes?.Dictionary + ); + } + + return rv; + } [TestCase (true)] [TestCase (false)] public void TestCallback (bool stronglyTyped) @@ -178,53 +202,150 @@ public void TestCallback (bool stronglyTyped) public void TestCallbackBackground (bool stronglyTyped) { - var width = 640; - var height = 480; - var encoder_specification = new VTVideoEncoderSpecification (); - var source_attributes = new CVPixelBufferAttributes (CVPixelFormatType.CV420YpCbCr8BiPlanarFullRange, width, height); var duration = new CMTime (40, 1); VTStatus status; - using var frameProperties = new NSDictionary (); + var width = 120; + var height = 120; + const nint sourceFrameValue = 0x0ea1f00d; int callbackCounter = 0; var failures = new List (); var callback = new VTCompressionSession.VTCompressionOutputCallback ((IntPtr sourceFrame, VTStatus status, VTEncodeInfoFlags flags, CMSampleBuffer buffer) => { Interlocked.Increment (ref callbackCounter); if (status != VTStatus.Ok) - failures.Add ($"Callback #{callbackCounter} failed. Expected status = Ok, got status = {status}"); + failures.Add ($"Callback #{callbackCounter} failed: Expected status = Ok, got status = {status}"); + if (sourceFrame != sourceFrameValue) + failures.Add ($"Callback #{callbackCounter} failed: Expected sourceFrame = 0x{sourceFrameValue:x}, got sourceFrame = 0x{sourceFrame}"); }); - using var session = stronglyTyped - ? VTCompressionSession.Create ( - width, height, - CMVideoCodecType.H264, - callback, - encoder_specification, - source_attributes - ) - : VTCompressionSession.Create ( - width, height, - CMVideoCodecType.H264, - callback, - encoder_specification, - source_attributes.Dictionary - ); - - var frameCount = 20; + using var session = CreateSession2 (stronglyTyped, callback: callback); + + var frameCount = 3; for (var i = 0; i < frameCount; i++) { using var imageBuffer = new CVPixelBuffer (width, height, CVPixelFormatType.CV420YpCbCr8BiPlanarFullRange); var pts = new CMTime (40 * i, 1); - status = session.EncodeFrame (imageBuffer, pts, duration, null, imageBuffer, out var infoFlags); - Assert.AreEqual (status, VTStatus.Ok, $"status #{i}"); + status = session.EncodeFrame (imageBuffer, pts, duration, null, sourceFrameValue, out var infoFlags); + Assert.AreEqual (VTStatus.Ok, status, $"status #{i}"); // This looks weird, but it seems the video encoder can become overwhelmed otherwise, and it // will start failing (and taking a long time to do so, eventually timing out the test). Thread.Sleep (10); } status = session.CompleteFrames (new CMTime (40 * frameCount, 1)); - Assert.AreEqual (status, VTStatus.Ok, "status finished"); - Assert.AreEqual (callbackCounter, frameCount, "frame count"); + Assert.AreEqual (VTStatus.Ok, status, "status finished"); + Assert.AreEqual (frameCount, callbackCounter, "frame count"); Assert.That (failures, Is.Empty, "no callback failures"); } +#if !__TVOS__ + [TestCase (true, true)] + [TestCase (false, true)] + [TestCase (true, false)] + [TestCase (false, false)] + public void TestMultiImage (bool stronglyTyped, bool customCallback) + { + TestRuntime.AssertXcodeVersion (26, 0); + + if (!VTCompressionSession.IsStereoMvHevcEncodeSupported ()) + Assert.Ignore ("Stereo MV-HEVC encoding is not supported on the current system."); + + Exception ex = null; + var thread = new Thread (() => { + try { + TestMultiImageCallbackBackground (stronglyTyped, customCallback); + } catch (Exception e) { + ex = e; + } + }); + thread.IsBackground = true; + thread.Start (); + var completed = thread.Join (TimeSpan.FromSeconds (30)); + + if (ex is NUnit.Framework.Internal.NUnitException) + throw ex; + Assert.IsNull (ex); // We check for this before the completion assert, to show any other assertion failures that may occur in CI. + + if (!completed) + TestRuntime.IgnoreInCI ("This test fails occasionally in CI"); + Assert.IsTrue (completed, "timed out"); + } + + void TestMultiImageCallbackBackground (bool stronglyTyped, bool customCallback) + { + var duration = new CMTime (40, 1); + VTStatus status; + + const nint sourceFrameValue = 0x0ee1f00d; + int callbackCounter = 0; + int callbackCounter2 = 0; + var failures = new List (); + var callback = new VTCompressionSession.VTCompressionOutputCallback ((IntPtr sourceFrame, VTStatus status, VTEncodeInfoFlags flags, CMSampleBuffer buffer) => { + Interlocked.Increment (ref callbackCounter); + if (status != VTStatus.Ok) + failures.Add ($"Output callback #{callbackCounter} failed: Expected status = Ok, got status = {status} = 0x{(int) status:x}"); + if (sourceFrame != sourceFrameValue) + failures.Add ($"Output callback #{callbackCounter} failed: Expected sourceFrame = 0x{sourceFrameValue:x}, got sourceFrame = 0x{sourceFrame:x}"); + }); + var callback2 = new VTCompressionSession.VTCompressionOutputHandler ((VTStatus status, VTEncodeInfoFlags flags, CMSampleBuffer buffer) => { + Interlocked.Increment (ref callbackCounter2); + if (status != VTStatus.Ok) + failures.Add ($"Output handler #{callbackCounter2} failed B. Expected status = Ok, got status = {status} = 0x{(int) status:x}"); + }); + + var width = 120; + var height = 120; + var codecType = CMVideoCodecType.Hevc; + var pixelFormat = CVPixelFormatType.CV420YpCbCr8BiPlanarVideoRange; + using var session = CreateSession2 (stronglyTyped, width: width, height: height, codecType: codecType, callback: customCallback ? null : callback); + + var IDs = new [] { new NSNumber (0), new NSNumber (1) }; + var compressionProperties = new VTCompressionProperties { + MvHevcVideoLayerIds = IDs, + MvHevcViewIds = IDs, + MvHevcLeftAndRightViewIds = IDs, + HasLeftStereoEyeView = true, + HasRightStereoEyeView = true, + }; + session.SetCompressionProperties (compressionProperties); + + var frameCount = 3; + var chunks = 2; + for (var i = 0; i < frameCount; i++) { + var buffers = new List (); + var tagCollections = new List (); + buffers.Add (new CVPixelBuffer (width, height, pixelFormat)); + tagCollections.Add (CMTagCollection.Create (CMTag.CreateWithFlagsValue (CMTagCategory.StereoView, 1), CMTag.CreateWithSInt64Value (CMTagCategory.VideoLayerId, 0))); + buffers.Add (new CVPixelBuffer (width, height, pixelFormat)); + tagCollections.Add (CMTagCollection.Create (CMTag.CreateWithFlagsValue (CMTagCategory.StereoView, 2), CMTag.CreateWithSInt64Value (CMTagCategory.VideoLayerId, 1))); + + using var taggedBufferGroup = CMTaggedBufferGroup.Create (tagCollections.ToArray (), buffers.ToArray (), out var taggedBufferGroupStatus); + Assert.That (taggedBufferGroup, Is.Not.Null, $"TaggedBuff1erGroup #{i}"); + Assert.That (taggedBufferGroupStatus, Is.EqualTo (CMTaggedBufferGroupError.Success), $"TaggedBufferGroup #{i} Ok"); + + var pts = new CMTime (40 * i, 1); + var infoFlags = default (VTEncodeInfoFlags); + if (customCallback) { + status = session.EncodeMultiImageFrame (taggedBufferGroup, pts, duration, null, out infoFlags, callback2); + } else { + status = session.EncodeMultiImageFrame (taggedBufferGroup, pts, duration, null, sourceFrameValue, out infoFlags); + } + Assert.AreEqual (VTStatus.Ok, status, $"status #{i}"); + Assert.That (infoFlags, Is.EqualTo (VTEncodeInfoFlags.Asynchronous), $"infoFlags #{i}"); + + foreach (var img in buffers) + img.Dispose (); + } + status = session.CompleteFrames (new CMTime (40 * frameCount * chunks, 1)); + GC.KeepAlive (session); + Assert.AreEqual (VTStatus.Ok, status, "status finished"); + if (customCallback) { + Assert.AreEqual (0, callbackCounter, "frame count A"); + Assert.AreEqual (frameCount, callbackCounter2, "frame count A2"); + } else { + Assert.AreEqual (frameCount, callbackCounter, "frame count B"); + Assert.AreEqual (0, callbackCounter2, "frame count B2"); + } + Assert.That (failures, Is.Empty, "no callback failures"); + } +#endif // __TVOS__ } } diff --git a/tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs b/tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs index 7b665f97d006..595266a5c38b 100644 --- a/tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs +++ b/tests/monotouch-test/VideoToolbox/VTDecompressionSessionTests.cs @@ -9,10 +9,15 @@ // using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; using Foundation; using VideoToolbox; using CoreMedia; +using CoreVideo; using AVFoundation; using CoreFoundation; using ObjCRuntime; @@ -97,18 +102,228 @@ public void DecompressionSessionGetSupportedPropertiesTest () Assert.That (supportedProps.Count, Is.GreaterThan ((nuint) 0), "GetSupportedProperties should be more than zero"); } } - VTDecompressionSession CreateSession (AVAsset asset) { var videoTracks = asset.TracksWithMediaType (AVMediaTypes.Video.GetConstant ()); var track = videoTracks [0]; var formatDescriptor = track.FormatDescriptions [0] as CMVideoFormatDescription; + return CreateSession (formatDescriptor); + } + + VTDecompressionSession CreateSession (CMVideoFormatDescription formatDescriptor) + { + return CreateSession (formatDescriptor, (sourceFrame, status, flags, buffer, presentationTimeStamp, presentationDuration) => { }); + } + + VTDecompressionSession CreateSession (CMVideoFormatDescription formatDescriptor, VTDecompressionSession.VTDecompressionOutputCallback? callback) + { + return VTDecompressionSession.Create (callback, formatDescriptor); + } + + class SampleBufferEnumerator { + public CMVideoFormatDescription FormatDescription; + AVAssetTrack? videoTrack; + AVAsset? asset; + + public SampleBufferEnumerator (NSUrl url, AVMediaCharacteristics characteristic = AVMediaCharacteristics.Visual) + { + asset = AVAsset.FromUrl (url); + Assert.That (asset, Is.Not.Null, "Asset"); + + var loaded = new TaskCompletionSource (); + + asset.LoadTrackWithMediaCharacteristics (characteristic.GetConstant (), (tracks, error) => { + try { + Assert.Null (error, "Failed to load track"); + + videoTrack = (AVAssetTrack) tracks.ToArray ().First (); + + var format = (CMVideoFormatDescription) videoTrack.FormatDescriptions [0]; + loaded.SetResult (format); + } catch (Exception e) { + loaded.SetException (e); + } + }); + + Assert.IsTrue (loaded.Task.Wait (TimeSpan.FromSeconds (15)), "Timed out waiting for track to load"); + FormatDescription = loaded.Task.Result; + } + + public void Enumerate (Action iterator) + { + using var cursor = videoTrack.MakeSampleCursorAtFirstSampleInDecodeOrder (); + using var sampleBufferGenerator = new AVSampleBufferGenerator (asset, null); + using var request = new AVSampleBufferRequest (cursor); + var sampleCount = 0L; + + do { + using var buffer = sampleBufferGenerator.CreateSampleBuffer (request, out var sampleBufferError); + Assert.NotNull (buffer, "Sample Buffer"); + Assert.Null (sampleBufferError, "Sample Buffer Error"); + + iterator (buffer); + + sampleCount = cursor.StepInDecodeOrder (1); + } while (sampleCount == 1); + } + } + + [Test] + public void DecodeFrameTest () + { + TestRuntime.AssertXcodeVersion (26, 0); + + using var url = NSBundle.MainBundle.GetUrlForResource ("xamvideotest", "mp4"); + Assert.That (url, Is.Not.Null, "Url"); + + var failures = new List (); + + var bufferEnumerator = new SampleBufferEnumerator (url); + + var frameCallbackCounter = 0; + const nint sourceFrameValue = 0x0ee1f00d; + using var session = CreateSession (bufferEnumerator.FormatDescription, + (sourceFrame, status, flags, buffer, presentationTimeStamp, presentationDuration) => { + frameCallbackCounter++; + if (status != VTStatus.Ok) + failures.Add ($"Output callback #{frameCallbackCounter} failed. Expected status = Ok, got status = {status}"); + if (sourceFrame != sourceFrameValue) + failures.Add ($"Output callback #{frameCallbackCounter} failed: Expected sourceFrame = 0x{sourceFrameValue:x}, got sourceFrame = 0x{sourceFrame:x}"); + }); + + bufferEnumerator.Enumerate ((buffer) => { + var status = session.DecodeFrame (buffer, VTDecodeFrameFlags.EnableAsynchronousDecompression, sourceFrameValue, out var infoFlags); + Assert.That (status, Is.EqualTo (VTStatus.Ok), "DecodeFrame"); + }); + + Assert.That (session.FinishDelayedFrames (), Is.EqualTo (VTStatus.Ok), "FinishDelayedFrames"); + Assert.That (frameCallbackCounter, Is.GreaterThan (0), "Frame callback counter"); + Assert.That (failures, Is.Empty, "Failures"); + } + +#if !__TVOS__ + [Test] + public void DecodeFrameMultiImageCallbackTest () + { + TestRuntime.AssertXcodeVersion (26, 0); + + if (!VTDecompressionSession.IsStereoMvHevcDecodeSupported ()) + Assert.Ignore ("Stereo MV-HEVC decoding is not supported on the current system."); + + TestRuntime.AssertXcodeVersion (16, 0); + + using var url = NSBundle.MainBundle.GetUrlForResource ("hummingbird", "mov"); + Assert.That (url, Is.Not.Null, "Url"); + + var failures = new List (); + + var bufferEnumerator = new SampleBufferEnumerator (url, characteristic: AVMediaCharacteristics.ContainsStereoMultiviewVideo); + + var frameCallbackCounter = 0; + + using var session = CreateSession (bufferEnumerator.FormatDescription, null); + + bufferEnumerator.Enumerate ((buffer) => { + var status = session.DecodeFrame (buffer, VTDecodeFrameFlags.EnableAsynchronousDecompression, out var infoFlags, + (status, infoFlags, imageBuffer, taggedBufferGroup, presentationTimeStamp, presentationDuration) => { + frameCallbackCounter++; + if (status != VTStatus.Ok) + failures.Add ($"DecodeFrameMultiImageCallbackTest #{frameCallbackCounter} failed. Expected status = Ok, got status = {status}"); + }); + Assert.That (status, Is.EqualTo (VTStatus.Ok), "DecodeFrame"); + }); + + Assert.That (session.FinishDelayedFrames (), Is.EqualTo (VTStatus.Ok), "FinishDelayedFrames"); + Assert.That (frameCallbackCounter, Is.GreaterThan (0), "Frame callback counter 2"); + Assert.That (failures, Is.Empty, "Failures"); + } + + [Test] + public void DecodeFrameSetMultiImageCallbackTest () + { + TestRuntime.AssertXcodeVersion (26, 0); + + if (!VTDecompressionSession.IsStereoMvHevcDecodeSupported ()) + Assert.Ignore ("Stereo MV-HEVC decoding is not supported on the current system."); + + TestRuntime.AssertXcodeVersion (16, 0); + + using var url = NSBundle.MainBundle.GetUrlForResource ("hummingbird", "mov"); + Assert.That (url, Is.Not.Null, "Url"); + + var failures = new List (); + + var bufferEnumerator = new SampleBufferEnumerator (url, characteristic: AVMediaCharacteristics.ContainsStereoMultiviewVideo); + + var frameCallbackCounter = 0; + var multiFrameCallbackCounter = 0; + + const nint sourceFrameValue = 0x0a1efeab; + const nint multiSourceFrameValue = 0x0ea1f00d; + + using var session = CreateSession (bufferEnumerator.FormatDescription, + (sourceFrame, status, flags, buffer, presentationTimeStamp, presentationDuration) => { + frameCallbackCounter++; + if (status != VTStatus.Ok) + failures.Add ($"Output callback #{frameCallbackCounter} failed. Expected status = Ok, got status = {status}"); + if (sourceFrame != sourceFrameValue) + failures.Add ($"Output callback #{frameCallbackCounter} failed: Expected sourceFrame = 0x{sourceFrameValue:x}, got sourceFrame = 0x{sourceFrame:x}"); + }); + + var st = session.SetMultiImageCallback ((outputMultiImageReference, sourceFrameReference, status, infoFlags, taggedBufferGroup, presentationTimeStamp, presentationDuration) => { + if (sourceFrameReference != sourceFrameValue) + failures.Add ($"Multi output callback #{multiFrameCallbackCounter} failed: Expected sourceFrame = 0x{sourceFrameValue:x}, got sourceFrame = 0x{sourceFrameReference:x}"); + if (outputMultiImageReference != multiSourceFrameValue) + failures.Add ($"Multi output callback #{multiFrameCallbackCounter} failed: Expected outputMultiImageReference = 0x{multiSourceFrameValue:x}, got outputMultiImageReference = 0x{outputMultiImageReference:x}"); + multiFrameCallbackCounter++; + }, multiSourceFrameValue); + + bufferEnumerator.Enumerate ((buffer) => { + var status = session.DecodeFrame (buffer, VTDecodeFrameFlags.EnableAsynchronousDecompression, sourceFrameValue, out var infoFlags); + Assert.That (status, Is.EqualTo (VTStatus.Ok), "DecodeFrame"); + }); + + Assert.That (session.FinishDelayedFrames (), Is.EqualTo (VTStatus.Ok), "FinishDelayedFrames"); + Assert.That (frameCallbackCounter, Is.GreaterThan (0), "Frame callback counter 2"); + Assert.That (failures, Is.Empty, "Failures"); + } + + [Test] + public void DecodeFrameCallbackTest () + { + TestRuntime.AssertXcodeVersion (16, 0); + + using var url = NSBundle.MainBundle.GetUrlForResource ("hummingbird", "mov"); + Assert.That (url, Is.Not.Null, "Url"); + + var failures = new List (); + + var bufferEnumerator = new SampleBufferEnumerator (url); + + var frameCallbackCounter = 0; + var inlineCallback = 0; + using var session = CreateSession (bufferEnumerator.FormatDescription, null); + + const nint sourceFrameValue = 0x0a1efeab; + var st = session.SetMultiImageCallback ((outputMultiImageReference, sourceFrameReference, status, infoFlags, taggedBufferGroup, presentationTimeStamp, presentationDuration) => { + if (sourceFrameReference != sourceFrameValue) + failures.Add ($"Output callback #{frameCallbackCounter} failed: Expected sourceFrame = 0x{sourceFrameValue:x}, got sourceFrame = 0x{sourceFrameReference:x}"); + frameCallbackCounter++; + }, sourceFrameValue); - var session = VTDecompressionSession.Create ( - (sourceFrame, status, flags, buffer, presentationTimeStamp, presentationDuration) => { }, - formatDescriptor); + bufferEnumerator.Enumerate ((buffer) => { + var status = session.DecodeFrame (buffer, VTDecodeFrameFlags.EnableAsynchronousDecompression, (NSDictionary?) null, out var infoFlags, + (status, flags, buffer, presentationTimeStamp, presentationDuration) => { + inlineCallback++; + }); + Assert.That (status, Is.EqualTo (VTStatus.Ok), "DecodeFrame"); + }); + Assert.That (session.FinishDelayedFrames (), Is.EqualTo (VTStatus.Ok), "FinishDelayedFrames"); - return session; + Assert.That (frameCallbackCounter, Is.EqualTo (0), "Frame callback counter 3"); + Assert.That (inlineCallback, Is.GreaterThan (0), "Frame callback counter 4"); + Assert.That (failures, Is.Empty, "Failures"); } +#endif // !__TVOS__ } } diff --git a/tests/monotouch-test/VideoToolbox/VTLowLatencyFrameInterpolationConfigurationTest.cs b/tests/monotouch-test/VideoToolbox/VTLowLatencyFrameInterpolationConfigurationTest.cs new file mode 100644 index 000000000000..bbbeb0536057 --- /dev/null +++ b/tests/monotouch-test/VideoToolbox/VTLowLatencyFrameInterpolationConfigurationTest.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +using Foundation; +using VideoToolbox; + +using NUnit.Framework; + +using Xamarin.Utils; + +namespace MonoTouchFixtures.VideoToolbox; + +[TestFixture] +[Preserve (AllMembers = true)] +public class VTLowLatencyFrameInterpolationConfigurationTest { + [Test] + public void NumberOfInterpolatedFramesCtor () + { + TestRuntime.AssertXcodeVersion (26, 0); + TestRuntime.AssertNotSimulator (); // VTLowLatencyFrameInterpolationConfiguration is not available in the simulator + + if (!VTLowLatencyFrameInterpolationConfiguration.Supported) + Assert.Ignore ($"VTLowLatencyFrameInterpolationConfiguration is not supported on this processor"); + + Assert.Multiple (() => { + using var obj = VTLowLatencyFrameInterpolationConfiguration.CreateWithNumberOfInterpolatedFrames (120, 240, 2); + Assert.That (obj, Is.Not.Null, "obj"); + Assert.That (obj.FrameWidth, Is.EqualTo ((nint) 120), "FrameWidth"); + Assert.That (obj.FrameHeight, Is.EqualTo ((nint) 240), "FrameHeight"); + Assert.That (obj.SpatialScaleFactor, Is.EqualTo ((nint) 1), "SpatialScaleFactor"); + Assert.That (obj.NumberOfInterpolatedFrames, Is.EqualTo ((nint) 0 /* this doesn't make sense, should be 2, but I confirmed the same behavior in Xcode */), "NumberOfInterpolatedFrames"); + }); + } + + [Test] + public void WithSpatialScaleFactorCtor () + { + TestRuntime.AssertXcodeVersion (26, 0); + TestRuntime.AssertNotSimulator (); // VTLowLatencyFrameInterpolationConfiguration is not available in the simulator + + if (!VTLowLatencyFrameInterpolationConfiguration.Supported) + Assert.Ignore ($"VTLowLatencyFrameInterpolationConfiguration is not supported on this processor"); + + Assert.Multiple (() => { + using var obj = VTLowLatencyFrameInterpolationConfiguration.CreateWithSpatialScaleFactor (120, 240, 2); + Assert.That (obj, Is.Not.Null, "obj"); + Assert.That (obj.FrameWidth, Is.EqualTo ((nint) 120), "FrameWidth"); + Assert.That (obj.FrameHeight, Is.EqualTo ((nint) 240), "FrameHeight"); + Assert.That (obj.SpatialScaleFactor, Is.EqualTo ((nint) 2), "SpatialScaleFactor"); + Assert.That (obj.NumberOfInterpolatedFrames, Is.EqualTo ((nint) 0), "NumberOfInterpolatedFrames"); + }); + } +} diff --git a/tests/monotouch-test/VideoToolbox/VTMotionBlurConfigurationTest.cs b/tests/monotouch-test/VideoToolbox/VTMotionBlurConfigurationTest.cs index 8d204bc70717..94386c6124ec 100644 --- a/tests/monotouch-test/VideoToolbox/VTMotionBlurConfigurationTest.cs +++ b/tests/monotouch-test/VideoToolbox/VTMotionBlurConfigurationTest.cs @@ -21,7 +21,7 @@ namespace MonoTouchFixtures.VideoToolbox { [TestFixture] [Preserve (AllMembers = true)] - public class VTMotionBlurConfigurationTEst { + public class VTMotionBlurConfigurationTest { [Test] public void Properties () { diff --git a/tests/monotouch-test/VideoToolbox/VTMotionEstimationSessionTest.cs b/tests/monotouch-test/VideoToolbox/VTMotionEstimationSessionTest.cs new file mode 100644 index 000000000000..6295817fbbe3 --- /dev/null +++ b/tests/monotouch-test/VideoToolbox/VTMotionEstimationSessionTest.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; + +using CoreVideo; +using Foundation; +using VideoToolbox; + +using NUnit.Framework; + +using Xamarin.Utils; + +namespace MonoTouchFixtures.VideoToolbox; + +[TestFixture] +[Preserve (AllMembers = true)] +public class VTMotionEstimationSessionTest { + [Test] + public void CreateTest () + { + TestRuntime.AssertXcodeVersion (26, 0); + // VTMotionEstimationSessionCreate just returns in the simulator (a single 'ret' instruction), + // which means it returns with status=VTStatus.Ok, but no session actually created. So ignore + // this test in the simulator. + TestRuntime.AssertNotSimulator (); + + var width = 120; + var height = 120; + using var session = VTMotionEstimationSession.Create ((NSDictionary?) null, (uint) width, (uint) height, out var status); + + /* Creation fail sometimes with -19350 on the bots. This error code is unfortunately not documented by Apple. + * Hoping it's "kVTMotionEstimationNotSupportedErr", which Apple mentions in their documentation, but whose + * value isn't defined in any headers (oversight?). */ + if ((int) status == -19350) + Assert.Ignore ("Unknown error code -19350"); + + Assert.That (status, Is.EqualTo (VTStatus.Ok), "Create status"); + Assert.That (session, Is.Not.Null, "Create"); + + DoTest (session, width, height); + } + + [Test] + public void CreateStronglyTypedTest () + { + TestRuntime.AssertXcodeVersion (26, 0); + // VTMotionEstimationSessionCreate just returns in the simulator (a single 'ret' instruction), + // which means it returns with status=VTStatus.Ok, but no session actually created. So ignore + // this test in the simulator. + TestRuntime.AssertNotSimulator (); + + var width = 120; + var height = 120; + var options = new VTMotionEstimationSessionCreationOption () { + Label = "Test session", + }; + using var session = VTMotionEstimationSession.Create (options, (uint) width, (uint) height, out var status); + + /* Creation fail sometimes with -19350 on the bots. This error code is unfortunately not documented by Apple. + * Hoping it's "kVTMotionEstimationNotSupportedErr", which Apple mentions in their documentation, but whose + * value isn't defined in any headers (oversight?). */ + if ((int) status == -19350) + Assert.Ignore ("Unknown error code -19350"); + + Assert.That (status, Is.EqualTo (VTStatus.Ok), "Create status"); + Assert.That (session, Is.Not.Null, "Create"); + + DoTest (session, width, height); + } + + void DoTest (VTMotionEstimationSession session, int width, int height) + { + Assert.That (session.TryGetSourcePixelBufferAttributes (out var pixelBufferAttributesDictionary, out var status), Is.EqualTo (true), "TryGetSourcePixelBufferAttributes"); + Assert.That (status, Is.EqualTo (VTStatus.Ok), "TryGetSourcePixelBufferAttributes: status"); + Assert.That (pixelBufferAttributesDictionary, Is.Not.Null, "TryGetSourcePixelBufferAttributes: pixel buffers"); + + var pixelBufferAttributes = session.SourcePixelBufferAttributes; + Assert.That (pixelBufferAttributes, Is.Not.Null, "SourcePixelBufferAttributes: pixel buffers"); + + var tcs = new TaskCompletionSource (); + + var pixelFormatType = pixelBufferAttributes.PixelFormatTypes [0]; + + using var referenceImage = new CVPixelBuffer (width, height, pixelFormatType); + using var currentImage = new CVPixelBuffer (width, height, pixelFormatType); + var estimatedAnything = false; + status = session.EstimateMotionVectors (referenceImage, currentImage, VTMotionEstimationFrameFlags.None, null, (VTStatus status2, VTMotionEstimationInfoFlags infoFlags, NSDictionary? additionalInfo, CVPixelBuffer? motionVectors) => { + try { + estimatedAnything = true; + } catch (Exception e) { + tcs.TrySetException (e); + } finally { + tcs.TrySetResult (true); + } + }); + Assert.That (status, Is.EqualTo (VTStatus.Ok), "EstimateMotionVectors: status"); + + status = session.CompleteFrames (); + Assert.That (status, Is.EqualTo (VTStatus.Ok), "CompleteFrames: status"); + + Assert.That (estimatedAnything, Is.EqualTo (true), "Estimated anything"); + } + + [Test] + public void GetTypeId () + { + TestRuntime.AssertXcodeVersion (26, 0); + + Assert.AreNotEqual (0, VTMotionEstimationSession.GetTypeId (), "GetTypeId"); + } +} diff --git a/tests/monotouch-test/dotnet/shared.csproj b/tests/monotouch-test/dotnet/shared.csproj index 7cc756c7c049..ea47c987c1cc 100644 --- a/tests/monotouch-test/dotnet/shared.csproj +++ b/tests/monotouch-test/dotnet/shared.csproj @@ -195,6 +195,9 @@ xamvideotest.mp4 + + hummingbird.mov + CoreImage\xamarinmonkey.heic diff --git a/tests/monotouch-test/hummingbird.mov b/tests/monotouch-test/hummingbird.mov new file mode 100644 index 000000000000..b3d8f604d172 Binary files /dev/null and b/tests/monotouch-test/hummingbird.mov differ diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-VideoToolbox.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-VideoToolbox.ignore deleted file mode 100644 index 90a661dd849a..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-VideoToolbox.ignore +++ /dev/null @@ -1,9 +0,0 @@ -### API not marked with unavailable (but without availability for tvOS/iOS/Catalyst) -!missing-field! kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID not bound -!missing-field! kVTVideoDecoderSpecification_RequiredDecoderGPURegistryID not bound - -## Requires binding CMTaggedBuffer from CoreMedia first -!missing-pinvoke! VTCompressionSessionEncodeMultiImageFrame is not bound -!missing-pinvoke! VTCompressionSessionEncodeMultiImageFrameWithOutputHandler is not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithMultiImageCapableOutputHandler is not bound -!missing-pinvoke! VTDecompressionSessionSetMultiImageCallback is not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-VideoToolbox.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-VideoToolbox.todo deleted file mode 100644 index 3b521996341a..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-VideoToolbox.todo +++ /dev/null @@ -1,226 +0,0 @@ -!missing-enum! VTMotionEstimationFrameFlags not bound -!missing-enum! VTMotionEstimationInfoFlags not bound -!missing-enum! VTSuperResolutionScalerConfigurationInputType not bound -!missing-enum! VTSuperResolutionScalerConfigurationModelStatus not bound -!missing-enum! VTSuperResolutionScalerConfigurationQualityPrioritization not bound -!missing-enum! VTSuperResolutionScalerConfigurationRevision not bound -!missing-enum! VTSuperResolutionScalerParametersSubmissionMode not bound -!missing-enum-value! VTDecodeInfoFlags native value kVTDecodeInfo_FrameInterrupted = 16 not bound -!missing-enum-value! VTFrameProcessorError native value VTFrameProcessorAssetDownloadFailed = -19743 not bound -!missing-field! kVTCameraCalibrationExtrinsicOriginSource_StereoCameraSystemBaseline not bound -!missing-field! kVTCameraCalibrationLensAlgorithmKind_ParametricLens not bound -!missing-field! kVTCameraCalibrationLensDomain_Color not bound -!missing-field! kVTCameraCalibrationLensRole_Left not bound -!missing-field! kVTCameraCalibrationLensRole_Mono not bound -!missing-field! kVTCameraCalibrationLensRole_Right not bound -!missing-field! kVTCompressionPreset_Balanced not bound -!missing-field! kVTCompressionPreset_HighQuality not bound -!missing-field! kVTCompressionPreset_HighSpeed not bound -!missing-field! kVTCompressionPreset_VideoConferencing not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOrientationQuaternion not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOriginSource not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrix not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixProjectionOffset not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixReferenceDimensions not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensAlgorithmKind not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensDistortions not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensDomain not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialX not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialY not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensIdentifier not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensRole not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_RadialAngleLimit not bound -!missing-field! kVTCompressionPropertyKey_CameraCalibrationDataLensCollection not bound -!missing-field! kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumDuration not bound -!missing-field! kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumFrameCount not bound -!missing-field! kVTCompressionPropertyKey_SupportedPresetDictionaries not bound -!missing-field! kVTCompressionPropertyKey_VariableBitRate not bound -!missing-field! kVTCompressionPropertyKey_VBVBufferDuration not bound -!missing-field! kVTCompressionPropertyKey_VBVInitialDelayPercentage not bound -!missing-field! kVTCompressionPropertyKey_VBVMaxBitRate not bound -!missing-field! kVTHDRMetadataInsertionMode_RequestSDRRangePreservation not bound -!missing-field! kVTHeroEye_Left not bound -!missing-field! kVTHeroEye_Right not bound -!missing-field! kVTMotionEstimationSessionCreationOption_Label not bound -!missing-field! kVTMotionEstimationSessionCreationOption_MotionVectorSize not bound -!missing-field! kVTMotionEstimationSessionCreationOption_UseMultiPassSearch not bound -!missing-field! kVTProjectionKind_Equirectangular not bound -!missing-field! kVTProjectionKind_HalfEquirectangular not bound -!missing-field! kVTProjectionKind_ParametricImmersive not bound -!missing-field! kVTProjectionKind_Rectilinear not bound -!missing-field! kVTViewPackingKind_OverUnder not bound -!missing-field! kVTViewPackingKind_SideBySide not bound -!missing-field! VTFrameProcessorErrorDomain not bound -!missing-pinvoke! VTMotionEstimationSessionCompleteFrames is not bound -!missing-pinvoke! VTMotionEstimationSessionCopySourcePixelBufferAttributes is not bound -!missing-pinvoke! VTMotionEstimationSessionCreate is not bound -!missing-pinvoke! VTMotionEstimationSessionEstimateMotionVectors is not bound -!missing-pinvoke! VTMotionEstimationSessionGetTypeID is not bound -!missing-pinvoke! VTMotionEstimationSessionInvalidate is not bound -!missing-protocol! VTFrameProcessorConfiguration not bound -!missing-protocol! VTFrameProcessorParameters not bound -!missing-selector! +VTFrameRateConversionConfiguration::defaultRevision not bound -!missing-selector! +VTFrameRateConversionConfiguration::isSupported not bound -!missing-selector! +VTFrameRateConversionConfiguration::supportedRevisions not bound -!missing-selector! +VTLowLatencyFrameInterpolationConfiguration::isSupported not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::isSupported not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::maximumDimensions not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::minimumDimensions not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::supportedScaleFactorsForFrameWidth:frameHeight: not bound -!missing-selector! +VTMotionBlurConfiguration::defaultRevision not bound -!missing-selector! +VTMotionBlurConfiguration::isSupported not bound -!missing-selector! +VTMotionBlurConfiguration::supportedRevisions not bound -!missing-selector! +VTOpticalFlowConfiguration::defaultRevision not bound -!missing-selector! +VTOpticalFlowConfiguration::isSupported not bound -!missing-selector! +VTOpticalFlowConfiguration::supportedRevisions not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::defaultRevision not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::isSupported not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::supportedRevisions not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::supportedScaleFactors not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::isSupported not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::maximumDimensions not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::minimumDimensions not bound -!missing-selector! VTFrameProcessor::endSession not bound -!missing-selector! VTFrameProcessor::init not bound -!missing-selector! VTFrameProcessor::processWithCommandBuffer:parameters: not bound -!missing-selector! VTFrameProcessor::processWithParameters:completionHandler: not bound -!missing-selector! VTFrameProcessor::processWithParameters:error: not bound -!missing-selector! VTFrameProcessor::processWithParameters:frameOutputHandler: not bound -!missing-selector! VTFrameProcessor::startSessionWithConfiguration:error: not bound -!missing-selector! VTFrameProcessorFrame::buffer not bound -!missing-selector! VTFrameProcessorFrame::initWithBuffer:presentationTimeStamp: not bound -!missing-selector! VTFrameProcessorFrame::presentationTimeStamp not bound -!missing-selector! VTFrameProcessorOpticalFlow::backwardFlow not bound -!missing-selector! VTFrameProcessorOpticalFlow::forwardFlow not bound -!missing-selector! VTFrameProcessorOpticalFlow::initWithForwardFlow:backwardFlow: not bound -!missing-selector! VTFrameRateConversionConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTFrameRateConversionConfiguration::frameHeight not bound -!missing-selector! VTFrameRateConversionConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTFrameRateConversionConfiguration::frameWidth not bound -!missing-selector! VTFrameRateConversionConfiguration::initWithFrameWidth:frameHeight:usePrecomputedFlow:qualityPrioritization:revision: not bound -!missing-selector! VTFrameRateConversionConfiguration::qualityPrioritization not bound -!missing-selector! VTFrameRateConversionConfiguration::revision not bound -!missing-selector! VTFrameRateConversionConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTFrameRateConversionConfiguration::usePrecomputedFlow not bound -!missing-selector! VTFrameRateConversionParameters::destinationFrames not bound -!missing-selector! VTFrameRateConversionParameters::initWithSourceFrame:nextFrame:opticalFlow:interpolationPhase:submissionMode:destinationFrames: not bound -!missing-selector! VTFrameRateConversionParameters::interpolationPhase not bound -!missing-selector! VTFrameRateConversionParameters::nextFrame not bound -!missing-selector! VTFrameRateConversionParameters::opticalFlow not bound -!missing-selector! VTFrameRateConversionParameters::sourceFrame not bound -!missing-selector! VTFrameRateConversionParameters::submissionMode not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameHeight not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameWidth not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::initWithFrameWidth:frameHeight:numberOfInterpolatedFrames: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::initWithFrameWidth:frameHeight:spatialScaleFactor: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::numberOfInterpolatedFrames not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::spatialScaleFactor not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::destinationFrames not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::initWithSourceFrame:previousFrame:interpolationPhase:destinationFrames: not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::interpolationPhase not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::previousFrame not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::sourceFrame not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameHeight not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameWidth not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::initWithFrameWidth:frameHeight:scaleFactor: not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::scaleFactor not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::destinationFrame not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::initWithSourceFrame:destinationFrame: not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::sourceFrame not bound -!missing-selector! VTMotionBlurConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTMotionBlurConfiguration::frameHeight not bound -!missing-selector! VTMotionBlurConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTMotionBlurConfiguration::frameWidth not bound -!missing-selector! VTMotionBlurConfiguration::initWithFrameWidth:frameHeight:usePrecomputedFlow:qualityPrioritization:revision: not bound -!missing-selector! VTMotionBlurConfiguration::qualityPrioritization not bound -!missing-selector! VTMotionBlurConfiguration::revision not bound -!missing-selector! VTMotionBlurConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTMotionBlurConfiguration::usePrecomputedFlow not bound -!missing-selector! VTMotionBlurParameters::destinationFrame not bound -!missing-selector! VTMotionBlurParameters::initWithSourceFrame:nextFrame:previousFrame:nextOpticalFlow:previousOpticalFlow:motionBlurStrength:submissionMode:destinationFrame: not bound -!missing-selector! VTMotionBlurParameters::motionBlurStrength not bound -!missing-selector! VTMotionBlurParameters::nextFrame not bound -!missing-selector! VTMotionBlurParameters::nextOpticalFlow not bound -!missing-selector! VTMotionBlurParameters::previousFrame not bound -!missing-selector! VTMotionBlurParameters::previousOpticalFlow not bound -!missing-selector! VTMotionBlurParameters::sourceFrame not bound -!missing-selector! VTMotionBlurParameters::submissionMode not bound -!missing-selector! VTOpticalFlowConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTOpticalFlowConfiguration::frameHeight not bound -!missing-selector! VTOpticalFlowConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTOpticalFlowConfiguration::frameWidth not bound -!missing-selector! VTOpticalFlowConfiguration::initWithFrameWidth:frameHeight:qualityPrioritization:revision: not bound -!missing-selector! VTOpticalFlowConfiguration::qualityPrioritization not bound -!missing-selector! VTOpticalFlowConfiguration::revision not bound -!missing-selector! VTOpticalFlowConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTOpticalFlowParameters::destinationOpticalFlow not bound -!missing-selector! VTOpticalFlowParameters::initWithSourceFrame:nextFrame:submissionMode:destinationOpticalFlow: not bound -!missing-selector! VTOpticalFlowParameters::nextFrame not bound -!missing-selector! VTOpticalFlowParameters::sourceFrame not bound -!missing-selector! VTOpticalFlowParameters::submissionMode not bound -!missing-selector! VTSuperResolutionScalerConfiguration::configurationModelPercentageAvailable not bound -!missing-selector! VTSuperResolutionScalerConfiguration::configurationModelStatus not bound -!missing-selector! VTSuperResolutionScalerConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTSuperResolutionScalerConfiguration::downloadConfigurationModelWithCompletionHandler: not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameHeight not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameWidth not bound -!missing-selector! VTSuperResolutionScalerConfiguration::initWithFrameWidth:frameHeight:scaleFactor:inputType:usePrecomputedFlow:qualityPrioritization:revision: not bound -!missing-selector! VTSuperResolutionScalerConfiguration::inputType not bound -!missing-selector! VTSuperResolutionScalerConfiguration::qualityPrioritization not bound -!missing-selector! VTSuperResolutionScalerConfiguration::revision not bound -!missing-selector! VTSuperResolutionScalerConfiguration::scaleFactor not bound -!missing-selector! VTSuperResolutionScalerConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTSuperResolutionScalerConfiguration::usesPrecomputedFlow not bound -!missing-selector! VTSuperResolutionScalerParameters::destinationFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::initWithSourceFrame:previousFrame:previousOutputFrame:opticalFlow:submissionMode:destinationFrame: not bound -!missing-selector! VTSuperResolutionScalerParameters::opticalFlow not bound -!missing-selector! VTSuperResolutionScalerParameters::previousFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::previousOutputFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::sourceFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::submissionMode not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameHeight not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameWidth not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::nextFrameCount not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::previousFrameCount not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTTemporalNoiseFilterParameters::destinationFrame not bound -!missing-selector! VTTemporalNoiseFilterParameters::filterStrength not bound -!missing-selector! VTTemporalNoiseFilterParameters::nextFrames not bound -!missing-selector! VTTemporalNoiseFilterParameters::previousFrames not bound -!missing-selector! VTTemporalNoiseFilterParameters::setFilterStrength: not bound -!missing-selector! VTTemporalNoiseFilterParameters::sourceFrame not bound -!missing-type! VTFrameProcessor not bound -!missing-type! VTFrameProcessorFrame not bound -!missing-type! VTFrameProcessorOpticalFlow not bound -!missing-type! VTFrameRateConversionConfiguration not bound -!missing-type! VTFrameRateConversionParameters not bound -!missing-type! VTLowLatencyFrameInterpolationConfiguration not bound -!missing-type! VTLowLatencyFrameInterpolationParameters not bound -!missing-type! VTLowLatencySuperResolutionScalerConfiguration not bound -!missing-type! VTLowLatencySuperResolutionScalerParameters not bound -!missing-type! VTMotionBlurConfiguration not bound -!missing-type! VTMotionBlurParameters not bound -!missing-type! VTOpticalFlowConfiguration not bound -!missing-type! VTOpticalFlowParameters not bound -!missing-type! VTSuperResolutionScalerConfiguration not bound -!missing-type! VTSuperResolutionScalerParameters not bound -!missing-type! VTTemporalNoiseFilterConfiguration not bound -!missing-type! VTTemporalNoiseFilterParameters not bound -!missing-field! kVTDecodeFrameOptionKey_ContentAnalyzerCropRectangle not bound -!missing-field! kVTDecodeFrameOptionKey_ContentAnalyzerRotation not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOptions is not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOptionsAndOutputHandler is not bound -!missing-selector! VTTemporalNoiseFilterParameters::hasDiscontinuity not bound -!missing-selector! VTTemporalNoiseFilterParameters::initWithSourceFrame:nextFrames:previousFrames:destinationFrame:filterStrength:hasDiscontinuity: not bound -!missing-selector! VTTemporalNoiseFilterParameters::setHasDiscontinuity: not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::supportedSourcePixelFormats not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::initWithFrameWidth:frameHeight:sourcePixelFormat: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-CoreMedia.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-CoreMedia.ignore index a72fa0818ad8..7a63769f1f97 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-CoreMedia.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-CoreMedia.ignore @@ -167,7 +167,6 @@ !missing-pinvoke! CMBufferQueueGetMinPresentationTimeStamp is not bound !missing-pinvoke! CMBufferQueueGetTypeID is not bound !missing-pinvoke! CMBufferQueueCopyHead is not bound -!missing-pinvoke! CMVideoFormatDescriptionCopyTagCollectionArray is not bound !missing-field! kCMMetadataDataType_QuickTimeMetadataMilliLux not bound !missing-field! kCMMetadataDataType_QuickTimeMetadataUUID not bound !missing-field! kCMMetadataIdentifier_QuickTimeMetadataSceneIlluminance not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/common-VideoToolbox.ignore b/tests/xtro-sharpie/api-annotations-dotnet/common-VideoToolbox.ignore index 1684b287aa3a..94e16055d3ff 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/common-VideoToolbox.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/common-VideoToolbox.ignore @@ -1,5 +1,4 @@ !missing-pinvoke! VTCompressionSessionEncodeFrameWithOutputHandler is not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOutputHandler is not bound !missing-pinvoke! VTFrameSiloCallBlockForEachSampleBuffer is not bound ## *GetTypeID are generally not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-VideoToolbox.ignore b/tests/xtro-sharpie/api-annotations-dotnet/iOS-VideoToolbox.ignore deleted file mode 100644 index 4e30f4958f91..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-VideoToolbox.ignore +++ /dev/null @@ -1,9 +0,0 @@ -### API not marked with unavailable (but without availability for tvOS/iOS) -!missing-field! kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID not bound -!missing-field! kVTVideoDecoderSpecification_RequiredDecoderGPURegistryID not bound - -## Requires binding CMTaggedBuffer from CoreMedia first -!missing-pinvoke! VTCompressionSessionEncodeMultiImageFrame is not bound -!missing-pinvoke! VTCompressionSessionEncodeMultiImageFrameWithOutputHandler is not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithMultiImageCapableOutputHandler is not bound -!missing-pinvoke! VTDecompressionSessionSetMultiImageCallback is not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-VideoToolbox.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-VideoToolbox.todo deleted file mode 100644 index f84396299862..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-VideoToolbox.todo +++ /dev/null @@ -1,235 +0,0 @@ -!missing-enum! VTFrameProcessorError not bound -!missing-enum! VTFrameRateConversionConfigurationQualityPrioritization not bound -!missing-enum! VTFrameRateConversionConfigurationRevision not bound -!missing-enum! VTFrameRateConversionParametersSubmissionMode not bound -!missing-enum! VTMotionBlurConfigurationQualityPrioritization not bound -!missing-enum! VTMotionBlurConfigurationRevision not bound -!missing-enum! VTMotionBlurParametersSubmissionMode not bound -!missing-enum! VTMotionEstimationFrameFlags not bound -!missing-enum! VTMotionEstimationInfoFlags not bound -!missing-enum! VTOpticalFlowConfigurationQualityPrioritization not bound -!missing-enum! VTOpticalFlowConfigurationRevision not bound -!missing-enum! VTOpticalFlowParametersSubmissionMode not bound -!missing-enum! VTSuperResolutionScalerConfigurationInputType not bound -!missing-enum! VTSuperResolutionScalerConfigurationModelStatus not bound -!missing-enum! VTSuperResolutionScalerConfigurationQualityPrioritization not bound -!missing-enum! VTSuperResolutionScalerConfigurationRevision not bound -!missing-enum! VTSuperResolutionScalerParametersSubmissionMode not bound -!missing-enum-value! VTDecodeInfoFlags native value kVTDecodeInfo_FrameInterrupted = 16 not bound -!missing-field! kVTCameraCalibrationExtrinsicOriginSource_StereoCameraSystemBaseline not bound -!missing-field! kVTCameraCalibrationLensAlgorithmKind_ParametricLens not bound -!missing-field! kVTCameraCalibrationLensDomain_Color not bound -!missing-field! kVTCameraCalibrationLensRole_Left not bound -!missing-field! kVTCameraCalibrationLensRole_Mono not bound -!missing-field! kVTCameraCalibrationLensRole_Right not bound -!missing-field! kVTCompressionPreset_Balanced not bound -!missing-field! kVTCompressionPreset_HighQuality not bound -!missing-field! kVTCompressionPreset_HighSpeed not bound -!missing-field! kVTCompressionPreset_VideoConferencing not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOrientationQuaternion not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOriginSource not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrix not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixProjectionOffset not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixReferenceDimensions not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensAlgorithmKind not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensDistortions not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensDomain not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialX not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialY not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensIdentifier not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensRole not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_RadialAngleLimit not bound -!missing-field! kVTCompressionPropertyKey_CameraCalibrationDataLensCollection not bound -!missing-field! kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumDuration not bound -!missing-field! kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumFrameCount not bound -!missing-field! kVTCompressionPropertyKey_SupportedPresetDictionaries not bound -!missing-field! kVTCompressionPropertyKey_VariableBitRate not bound -!missing-field! kVTCompressionPropertyKey_VBVBufferDuration not bound -!missing-field! kVTCompressionPropertyKey_VBVInitialDelayPercentage not bound -!missing-field! kVTCompressionPropertyKey_VBVMaxBitRate not bound -!missing-field! kVTHDRMetadataInsertionMode_RequestSDRRangePreservation not bound -!missing-field! kVTHeroEye_Left not bound -!missing-field! kVTHeroEye_Right not bound -!missing-field! kVTMotionEstimationSessionCreationOption_Label not bound -!missing-field! kVTMotionEstimationSessionCreationOption_MotionVectorSize not bound -!missing-field! kVTMotionEstimationSessionCreationOption_UseMultiPassSearch not bound -!missing-field! kVTProjectionKind_Equirectangular not bound -!missing-field! kVTProjectionKind_HalfEquirectangular not bound -!missing-field! kVTProjectionKind_ParametricImmersive not bound -!missing-field! kVTProjectionKind_Rectilinear not bound -!missing-field! kVTViewPackingKind_OverUnder not bound -!missing-field! kVTViewPackingKind_SideBySide not bound -!missing-field! VTFrameProcessorErrorDomain not bound -!missing-pinvoke! VTMotionEstimationSessionCompleteFrames is not bound -!missing-pinvoke! VTMotionEstimationSessionCopySourcePixelBufferAttributes is not bound -!missing-pinvoke! VTMotionEstimationSessionCreate is not bound -!missing-pinvoke! VTMotionEstimationSessionEstimateMotionVectors is not bound -!missing-pinvoke! VTMotionEstimationSessionGetTypeID is not bound -!missing-pinvoke! VTMotionEstimationSessionInvalidate is not bound -!missing-protocol! VTFrameProcessorConfiguration not bound -!missing-protocol! VTFrameProcessorParameters not bound -!missing-selector! +VTFrameRateConversionConfiguration::defaultRevision not bound -!missing-selector! +VTFrameRateConversionConfiguration::isSupported not bound -!missing-selector! +VTFrameRateConversionConfiguration::supportedRevisions not bound -!missing-selector! +VTLowLatencyFrameInterpolationConfiguration::isSupported not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::isSupported not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::maximumDimensions not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::minimumDimensions not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::supportedScaleFactorsForFrameWidth:frameHeight: not bound -!missing-selector! +VTMotionBlurConfiguration::defaultRevision not bound -!missing-selector! +VTMotionBlurConfiguration::isSupported not bound -!missing-selector! +VTMotionBlurConfiguration::supportedRevisions not bound -!missing-selector! +VTOpticalFlowConfiguration::defaultRevision not bound -!missing-selector! +VTOpticalFlowConfiguration::isSupported not bound -!missing-selector! +VTOpticalFlowConfiguration::supportedRevisions not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::defaultRevision not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::isSupported not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::supportedRevisions not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::supportedScaleFactors not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::isSupported not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::maximumDimensions not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::minimumDimensions not bound -!missing-selector! VTFrameProcessor::endSession not bound -!missing-selector! VTFrameProcessor::init not bound -!missing-selector! VTFrameProcessor::processWithCommandBuffer:parameters: not bound -!missing-selector! VTFrameProcessor::processWithParameters:completionHandler: not bound -!missing-selector! VTFrameProcessor::processWithParameters:error: not bound -!missing-selector! VTFrameProcessor::processWithParameters:frameOutputHandler: not bound -!missing-selector! VTFrameProcessor::startSessionWithConfiguration:error: not bound -!missing-selector! VTFrameProcessorFrame::buffer not bound -!missing-selector! VTFrameProcessorFrame::initWithBuffer:presentationTimeStamp: not bound -!missing-selector! VTFrameProcessorFrame::presentationTimeStamp not bound -!missing-selector! VTFrameProcessorOpticalFlow::backwardFlow not bound -!missing-selector! VTFrameProcessorOpticalFlow::forwardFlow not bound -!missing-selector! VTFrameProcessorOpticalFlow::initWithForwardFlow:backwardFlow: not bound -!missing-selector! VTFrameRateConversionConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTFrameRateConversionConfiguration::frameHeight not bound -!missing-selector! VTFrameRateConversionConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTFrameRateConversionConfiguration::frameWidth not bound -!missing-selector! VTFrameRateConversionConfiguration::initWithFrameWidth:frameHeight:usePrecomputedFlow:qualityPrioritization:revision: not bound -!missing-selector! VTFrameRateConversionConfiguration::qualityPrioritization not bound -!missing-selector! VTFrameRateConversionConfiguration::revision not bound -!missing-selector! VTFrameRateConversionConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTFrameRateConversionConfiguration::usePrecomputedFlow not bound -!missing-selector! VTFrameRateConversionParameters::destinationFrames not bound -!missing-selector! VTFrameRateConversionParameters::initWithSourceFrame:nextFrame:opticalFlow:interpolationPhase:submissionMode:destinationFrames: not bound -!missing-selector! VTFrameRateConversionParameters::interpolationPhase not bound -!missing-selector! VTFrameRateConversionParameters::nextFrame not bound -!missing-selector! VTFrameRateConversionParameters::opticalFlow not bound -!missing-selector! VTFrameRateConversionParameters::sourceFrame not bound -!missing-selector! VTFrameRateConversionParameters::submissionMode not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameHeight not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameWidth not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::initWithFrameWidth:frameHeight:numberOfInterpolatedFrames: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::initWithFrameWidth:frameHeight:spatialScaleFactor: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::numberOfInterpolatedFrames not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::spatialScaleFactor not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::destinationFrames not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::initWithSourceFrame:previousFrame:interpolationPhase:destinationFrames: not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::interpolationPhase not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::previousFrame not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::sourceFrame not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameHeight not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameWidth not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::initWithFrameWidth:frameHeight:scaleFactor: not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::scaleFactor not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::destinationFrame not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::initWithSourceFrame:destinationFrame: not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::sourceFrame not bound -!missing-selector! VTMotionBlurConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTMotionBlurConfiguration::frameHeight not bound -!missing-selector! VTMotionBlurConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTMotionBlurConfiguration::frameWidth not bound -!missing-selector! VTMotionBlurConfiguration::initWithFrameWidth:frameHeight:usePrecomputedFlow:qualityPrioritization:revision: not bound -!missing-selector! VTMotionBlurConfiguration::qualityPrioritization not bound -!missing-selector! VTMotionBlurConfiguration::revision not bound -!missing-selector! VTMotionBlurConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTMotionBlurConfiguration::usePrecomputedFlow not bound -!missing-selector! VTMotionBlurParameters::destinationFrame not bound -!missing-selector! VTMotionBlurParameters::initWithSourceFrame:nextFrame:previousFrame:nextOpticalFlow:previousOpticalFlow:motionBlurStrength:submissionMode:destinationFrame: not bound -!missing-selector! VTMotionBlurParameters::motionBlurStrength not bound -!missing-selector! VTMotionBlurParameters::nextFrame not bound -!missing-selector! VTMotionBlurParameters::nextOpticalFlow not bound -!missing-selector! VTMotionBlurParameters::previousFrame not bound -!missing-selector! VTMotionBlurParameters::previousOpticalFlow not bound -!missing-selector! VTMotionBlurParameters::sourceFrame not bound -!missing-selector! VTMotionBlurParameters::submissionMode not bound -!missing-selector! VTOpticalFlowConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTOpticalFlowConfiguration::frameHeight not bound -!missing-selector! VTOpticalFlowConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTOpticalFlowConfiguration::frameWidth not bound -!missing-selector! VTOpticalFlowConfiguration::initWithFrameWidth:frameHeight:qualityPrioritization:revision: not bound -!missing-selector! VTOpticalFlowConfiguration::qualityPrioritization not bound -!missing-selector! VTOpticalFlowConfiguration::revision not bound -!missing-selector! VTOpticalFlowConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTOpticalFlowParameters::destinationOpticalFlow not bound -!missing-selector! VTOpticalFlowParameters::initWithSourceFrame:nextFrame:submissionMode:destinationOpticalFlow: not bound -!missing-selector! VTOpticalFlowParameters::nextFrame not bound -!missing-selector! VTOpticalFlowParameters::sourceFrame not bound -!missing-selector! VTOpticalFlowParameters::submissionMode not bound -!missing-selector! VTSuperResolutionScalerConfiguration::configurationModelPercentageAvailable not bound -!missing-selector! VTSuperResolutionScalerConfiguration::configurationModelStatus not bound -!missing-selector! VTSuperResolutionScalerConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTSuperResolutionScalerConfiguration::downloadConfigurationModelWithCompletionHandler: not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameHeight not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameWidth not bound -!missing-selector! VTSuperResolutionScalerConfiguration::initWithFrameWidth:frameHeight:scaleFactor:inputType:usePrecomputedFlow:qualityPrioritization:revision: not bound -!missing-selector! VTSuperResolutionScalerConfiguration::inputType not bound -!missing-selector! VTSuperResolutionScalerConfiguration::qualityPrioritization not bound -!missing-selector! VTSuperResolutionScalerConfiguration::revision not bound -!missing-selector! VTSuperResolutionScalerConfiguration::scaleFactor not bound -!missing-selector! VTSuperResolutionScalerConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTSuperResolutionScalerConfiguration::usesPrecomputedFlow not bound -!missing-selector! VTSuperResolutionScalerParameters::destinationFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::initWithSourceFrame:previousFrame:previousOutputFrame:opticalFlow:submissionMode:destinationFrame: not bound -!missing-selector! VTSuperResolutionScalerParameters::opticalFlow not bound -!missing-selector! VTSuperResolutionScalerParameters::previousFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::previousOutputFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::sourceFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::submissionMode not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameHeight not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameWidth not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::nextFrameCount not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::previousFrameCount not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTTemporalNoiseFilterParameters::destinationFrame not bound -!missing-selector! VTTemporalNoiseFilterParameters::filterStrength not bound -!missing-selector! VTTemporalNoiseFilterParameters::nextFrames not bound -!missing-selector! VTTemporalNoiseFilterParameters::previousFrames not bound -!missing-selector! VTTemporalNoiseFilterParameters::setFilterStrength: not bound -!missing-selector! VTTemporalNoiseFilterParameters::sourceFrame not bound -!missing-type! VTFrameProcessor not bound -!missing-type! VTFrameProcessorFrame not bound -!missing-type! VTFrameProcessorOpticalFlow not bound -!missing-type! VTFrameRateConversionConfiguration not bound -!missing-type! VTFrameRateConversionParameters not bound -!missing-type! VTLowLatencyFrameInterpolationConfiguration not bound -!missing-type! VTLowLatencyFrameInterpolationParameters not bound -!missing-type! VTLowLatencySuperResolutionScalerConfiguration not bound -!missing-type! VTLowLatencySuperResolutionScalerParameters not bound -!missing-type! VTMotionBlurConfiguration not bound -!missing-type! VTMotionBlurParameters not bound -!missing-type! VTOpticalFlowConfiguration not bound -!missing-type! VTOpticalFlowParameters not bound -!missing-type! VTSuperResolutionScalerConfiguration not bound -!missing-type! VTSuperResolutionScalerParameters not bound -!missing-type! VTTemporalNoiseFilterConfiguration not bound -!missing-type! VTTemporalNoiseFilterParameters not bound -!missing-field! kVTDecodeFrameOptionKey_ContentAnalyzerCropRectangle not bound -!missing-field! kVTDecodeFrameOptionKey_ContentAnalyzerRotation not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOptions is not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOptionsAndOutputHandler is not bound -!missing-selector! VTTemporalNoiseFilterParameters::hasDiscontinuity not bound -!missing-selector! VTTemporalNoiseFilterParameters::initWithSourceFrame:nextFrames:previousFrames:destinationFrame:filterStrength:hasDiscontinuity: not bound -!missing-selector! VTTemporalNoiseFilterParameters::setHasDiscontinuity: not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::supportedSourcePixelFormats not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::initWithFrameWidth:frameHeight:sourcePixelFormat: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-VideoToolbox.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-VideoToolbox.ignore index 381fc2ee44a7..af6f6e58b3f1 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-VideoToolbox.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-VideoToolbox.ignore @@ -1,5 +1,2 @@ -## Requires binding CMTaggedBuffer from CoreMedia first -!missing-pinvoke! VTCompressionSessionEncodeMultiImageFrame is not bound -!missing-pinvoke! VTCompressionSessionEncodeMultiImageFrameWithOutputHandler is not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithMultiImageCapableOutputHandler is not bound -!missing-pinvoke! VTDecompressionSessionSetMultiImageCallback is not bound +# Removed in XAMCORE_5_0 +!extra-protocol-member! unexpected selector VTFrameProcessorConfiguration::+processorSupported found diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-VideoToolbox.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-VideoToolbox.todo deleted file mode 100644 index 437d37b89e9b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-VideoToolbox.todo +++ /dev/null @@ -1,153 +0,0 @@ -!extra-protocol-member! unexpected selector VTFrameProcessorConfiguration::+processorSupported found -!missing-enum! VTMotionEstimationFrameFlags not bound -!missing-enum! VTMotionEstimationInfoFlags not bound -!missing-enum! VTSuperResolutionScalerConfigurationInputType not bound -!missing-enum! VTSuperResolutionScalerConfigurationModelStatus not bound -!missing-enum! VTSuperResolutionScalerConfigurationQualityPrioritization not bound -!missing-enum! VTSuperResolutionScalerConfigurationRevision not bound -!missing-enum! VTSuperResolutionScalerParametersSubmissionMode not bound -!missing-enum-value! VTDecodeInfoFlags native value kVTDecodeInfo_FrameInterrupted = 16 not bound -!missing-enum-value! VTFrameProcessorError native value VTFrameProcessorAssetDownloadFailed = -19743 not bound -!missing-field! kVTCameraCalibrationExtrinsicOriginSource_StereoCameraSystemBaseline not bound -!missing-field! kVTCameraCalibrationLensAlgorithmKind_ParametricLens not bound -!missing-field! kVTCameraCalibrationLensDomain_Color not bound -!missing-field! kVTCameraCalibrationLensRole_Left not bound -!missing-field! kVTCameraCalibrationLensRole_Mono not bound -!missing-field! kVTCameraCalibrationLensRole_Right not bound -!missing-field! kVTCompressionPreset_Balanced not bound -!missing-field! kVTCompressionPreset_HighQuality not bound -!missing-field! kVTCompressionPreset_HighSpeed not bound -!missing-field! kVTCompressionPreset_VideoConferencing not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOrientationQuaternion not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOriginSource not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrix not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixProjectionOffset not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixReferenceDimensions not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensAlgorithmKind not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensDistortions not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensDomain not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialX not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialY not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensIdentifier not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensRole not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_RadialAngleLimit not bound -!missing-field! kVTCompressionPropertyKey_CameraCalibrationDataLensCollection not bound -!missing-field! kVTCompressionPropertyKey_SupportedPresetDictionaries not bound -!missing-field! kVTCompressionPropertyKey_VariableBitRate not bound -!missing-field! kVTCompressionPropertyKey_VBVBufferDuration not bound -!missing-field! kVTCompressionPropertyKey_VBVInitialDelayPercentage not bound -!missing-field! kVTCompressionPropertyKey_VBVMaxBitRate not bound -!missing-field! kVTHDRMetadataInsertionMode_RequestSDRRangePreservation not bound -!missing-field! kVTHeroEye_Left not bound -!missing-field! kVTHeroEye_Right not bound -!missing-field! kVTMotionEstimationSessionCreationOption_Label not bound -!missing-field! kVTMotionEstimationSessionCreationOption_MotionVectorSize not bound -!missing-field! kVTMotionEstimationSessionCreationOption_UseMultiPassSearch not bound -!missing-field! kVTProjectionKind_Equirectangular not bound -!missing-field! kVTProjectionKind_HalfEquirectangular not bound -!missing-field! kVTProjectionKind_ParametricImmersive not bound -!missing-field! kVTProjectionKind_Rectilinear not bound -!missing-field! kVTRAWProcessingPropertyKey_MetadataForSidecarFile not bound -!missing-field! kVTViewPackingKind_OverUnder not bound -!missing-field! kVTViewPackingKind_SideBySide not bound -!missing-pinvoke! VTMotionEstimationSessionCompleteFrames is not bound -!missing-pinvoke! VTMotionEstimationSessionCopySourcePixelBufferAttributes is not bound -!missing-pinvoke! VTMotionEstimationSessionCreate is not bound -!missing-pinvoke! VTMotionEstimationSessionEstimateMotionVectors is not bound -!missing-pinvoke! VTMotionEstimationSessionGetTypeID is not bound -!missing-pinvoke! VTMotionEstimationSessionInvalidate is not bound -!missing-protocol-member! VTFrameProcessorParameters::destinationFrame not found -!missing-protocol-member! VTFrameProcessorParameters::destinationFrames not found -!missing-selector! +VTFrameRateConversionConfiguration::isSupported not bound -!missing-selector! +VTLowLatencyFrameInterpolationConfiguration::isSupported not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::isSupported not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::maximumDimensions not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::minimumDimensions not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::supportedScaleFactorsForFrameWidth:frameHeight: not bound -!missing-selector! +VTMotionBlurConfiguration::isSupported not bound -!missing-selector! +VTOpticalFlowConfiguration::isSupported not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::defaultRevision not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::isSupported not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::supportedRevisions not bound -!missing-selector! +VTSuperResolutionScalerConfiguration::supportedScaleFactors not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::isSupported not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::maximumDimensions not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::minimumDimensions not bound -!missing-selector! VTFrameProcessor::processWithParameters:frameOutputHandler: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameHeight not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameWidth not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::initWithFrameWidth:frameHeight:numberOfInterpolatedFrames: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::initWithFrameWidth:frameHeight:spatialScaleFactor: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::numberOfInterpolatedFrames not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::spatialScaleFactor not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::destinationFrames not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::initWithSourceFrame:previousFrame:interpolationPhase:destinationFrames: not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::interpolationPhase not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::previousFrame not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::sourceFrame not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameHeight not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameWidth not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::initWithFrameWidth:frameHeight:scaleFactor: not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::scaleFactor not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::destinationFrame not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::initWithSourceFrame:destinationFrame: not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::sourceFrame not bound -!missing-selector! VTSuperResolutionScalerConfiguration::configurationModelPercentageAvailable not bound -!missing-selector! VTSuperResolutionScalerConfiguration::configurationModelStatus not bound -!missing-selector! VTSuperResolutionScalerConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTSuperResolutionScalerConfiguration::downloadConfigurationModelWithCompletionHandler: not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameHeight not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTSuperResolutionScalerConfiguration::frameWidth not bound -!missing-selector! VTSuperResolutionScalerConfiguration::initWithFrameWidth:frameHeight:scaleFactor:inputType:usePrecomputedFlow:qualityPrioritization:revision: not bound -!missing-selector! VTSuperResolutionScalerConfiguration::inputType not bound -!missing-selector! VTSuperResolutionScalerConfiguration::qualityPrioritization not bound -!missing-selector! VTSuperResolutionScalerConfiguration::revision not bound -!missing-selector! VTSuperResolutionScalerConfiguration::scaleFactor not bound -!missing-selector! VTSuperResolutionScalerConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTSuperResolutionScalerConfiguration::usesPrecomputedFlow not bound -!missing-selector! VTSuperResolutionScalerParameters::destinationFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::initWithSourceFrame:previousFrame:previousOutputFrame:opticalFlow:submissionMode:destinationFrame: not bound -!missing-selector! VTSuperResolutionScalerParameters::opticalFlow not bound -!missing-selector! VTSuperResolutionScalerParameters::previousFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::previousOutputFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::sourceFrame not bound -!missing-selector! VTSuperResolutionScalerParameters::submissionMode not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameHeight not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::frameWidth not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::nextFrameCount not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::previousFrameCount not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTTemporalNoiseFilterParameters::destinationFrame not bound -!missing-selector! VTTemporalNoiseFilterParameters::filterStrength not bound -!missing-selector! VTTemporalNoiseFilterParameters::nextFrames not bound -!missing-selector! VTTemporalNoiseFilterParameters::previousFrames not bound -!missing-selector! VTTemporalNoiseFilterParameters::setFilterStrength: not bound -!missing-selector! VTTemporalNoiseFilterParameters::sourceFrame not bound -!missing-type! VTLowLatencyFrameInterpolationConfiguration not bound -!missing-type! VTLowLatencyFrameInterpolationParameters not bound -!missing-type! VTLowLatencySuperResolutionScalerConfiguration not bound -!missing-type! VTLowLatencySuperResolutionScalerParameters not bound -!missing-type! VTSuperResolutionScalerConfiguration not bound -!missing-type! VTSuperResolutionScalerParameters not bound -!missing-type! VTTemporalNoiseFilterConfiguration not bound -!missing-type! VTTemporalNoiseFilterParameters not bound -!missing-field! kVTDecodeFrameOptionKey_ContentAnalyzerCropRectangle not bound -!missing-field! kVTDecodeFrameOptionKey_ContentAnalyzerRotation not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOptions is not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOptionsAndOutputHandler is not bound -!missing-selector! VTTemporalNoiseFilterParameters::hasDiscontinuity not bound -!missing-selector! VTTemporalNoiseFilterParameters::initWithSourceFrame:nextFrames:previousFrames:destinationFrame:filterStrength:hasDiscontinuity: not bound -!missing-selector! VTTemporalNoiseFilterParameters::setHasDiscontinuity: not bound -!deprecated-attribute-missing! VTRAWProcessingSessionSetParameterChangedHander missing a [Deprecated] attribute -!missing-pinvoke! VTRAWProcessingSessionSetParameterChangedHandler is not bound -!missing-selector! +VTTemporalNoiseFilterConfiguration::supportedSourcePixelFormats not bound -!missing-selector! VTTemporalNoiseFilterConfiguration::initWithFrameWidth:frameHeight:sourcePixelFormat: not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-VideoToolbox.ignore b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-VideoToolbox.ignore index 6be06ae37e08..c48750dd36ac 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-VideoToolbox.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-VideoToolbox.ignore @@ -1,6 +1,11 @@ -### API not marked with unavailable (but without availability for tvOS/iOS) -!missing-field! kVTVideoDecoderSpecification_PreferredDecoderGPURegistryID not bound -!missing-field! kVTVideoDecoderSpecification_RequiredDecoderGPURegistryID not bound +# The headers are quite clear that these enums aren't available on tvOS; so not adding them to tvOS for now +!missing-enum! VTFrameRateConversionConfigurationQualityPrioritization not bound +!missing-enum! VTFrameRateConversionConfigurationRevision not bound +!missing-enum! VTFrameRateConversionParametersSubmissionMode not bound +!missing-enum! VTMotionBlurConfigurationQualityPrioritization not bound +!missing-enum! VTMotionBlurConfigurationRevision not bound +!missing-enum! VTMotionBlurParametersSubmissionMode not bound +!missing-enum! VTOpticalFlowConfigurationQualityPrioritization not bound +!missing-enum! VTOpticalFlowConfigurationRevision not bound +!missing-enum! VTOpticalFlowParametersSubmissionMode not bound -## availability macro says iOS 8.0 but constants are under a #if !TARGET_OS_IPHONE define. -## introspection does not report them as missing... diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-VideoToolbox.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-VideoToolbox.todo deleted file mode 100644 index 3cebf9235208..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-VideoToolbox.todo +++ /dev/null @@ -1,115 +0,0 @@ -!missing-enum! VTFrameProcessorError not bound -!missing-enum! VTFrameRateConversionConfigurationQualityPrioritization not bound -!missing-enum! VTFrameRateConversionConfigurationRevision not bound -!missing-enum! VTFrameRateConversionParametersSubmissionMode not bound -!missing-enum! VTMotionBlurConfigurationQualityPrioritization not bound -!missing-enum! VTMotionBlurConfigurationRevision not bound -!missing-enum! VTMotionBlurParametersSubmissionMode not bound -!missing-enum! VTMotionEstimationFrameFlags not bound -!missing-enum! VTMotionEstimationInfoFlags not bound -!missing-enum! VTOpticalFlowConfigurationQualityPrioritization not bound -!missing-enum! VTOpticalFlowConfigurationRevision not bound -!missing-enum! VTOpticalFlowParametersSubmissionMode not bound -!missing-enum! VTSuperResolutionScalerConfigurationInputType not bound -!missing-enum! VTSuperResolutionScalerConfigurationModelStatus not bound -!missing-enum! VTSuperResolutionScalerConfigurationQualityPrioritization not bound -!missing-enum! VTSuperResolutionScalerConfigurationRevision not bound -!missing-enum! VTSuperResolutionScalerParametersSubmissionMode not bound -!missing-enum-value! VTDecodeInfoFlags native value kVTDecodeInfo_FrameInterrupted = 16 not bound -!missing-field! kVTCameraCalibrationExtrinsicOriginSource_StereoCameraSystemBaseline not bound -!missing-field! kVTCameraCalibrationLensAlgorithmKind_ParametricLens not bound -!missing-field! kVTCameraCalibrationLensDomain_Color not bound -!missing-field! kVTCameraCalibrationLensRole_Left not bound -!missing-field! kVTCameraCalibrationLensRole_Mono not bound -!missing-field! kVTCameraCalibrationLensRole_Right not bound -!missing-field! kVTCompressionPreset_Balanced not bound -!missing-field! kVTCompressionPreset_HighQuality not bound -!missing-field! kVTCompressionPreset_HighSpeed not bound -!missing-field! kVTCompressionPreset_VideoConferencing not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOrientationQuaternion not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_ExtrinsicOriginSource not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrix not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixProjectionOffset not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_IntrinsicMatrixReferenceDimensions not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensAlgorithmKind not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensDistortions not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensDomain not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialX not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensFrameAdjustmentsPolynomialY not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensIdentifier not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_LensRole not bound -!missing-field! kVTCompressionPropertyCameraCalibrationKey_RadialAngleLimit not bound -!missing-field! kVTCompressionPropertyKey_CameraCalibrationDataLensCollection not bound -!missing-field! kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumDuration not bound -!missing-field! kVTCompressionPropertyKey_RecommendedParallelizedSubdivisionMinimumFrameCount not bound -!missing-field! kVTCompressionPropertyKey_SupportedPresetDictionaries not bound -!missing-field! kVTCompressionPropertyKey_VariableBitRate not bound -!missing-field! kVTCompressionPropertyKey_VBVBufferDuration not bound -!missing-field! kVTCompressionPropertyKey_VBVInitialDelayPercentage not bound -!missing-field! kVTCompressionPropertyKey_VBVMaxBitRate not bound -!missing-field! kVTHDRMetadataInsertionMode_RequestSDRRangePreservation not bound -!missing-field! kVTMotionEstimationSessionCreationOption_Label not bound -!missing-field! kVTMotionEstimationSessionCreationOption_MotionVectorSize not bound -!missing-field! kVTMotionEstimationSessionCreationOption_UseMultiPassSearch not bound -!missing-field! VTFrameProcessorErrorDomain not bound -!missing-pinvoke! VTMotionEstimationSessionCompleteFrames is not bound -!missing-pinvoke! VTMotionEstimationSessionCopySourcePixelBufferAttributes is not bound -!missing-pinvoke! VTMotionEstimationSessionCreate is not bound -!missing-pinvoke! VTMotionEstimationSessionEstimateMotionVectors is not bound -!missing-pinvoke! VTMotionEstimationSessionGetTypeID is not bound -!missing-pinvoke! VTMotionEstimationSessionInvalidate is not bound -!missing-protocol! VTFrameProcessorConfiguration not bound -!missing-protocol! VTFrameProcessorParameters not bound -!missing-selector! +VTLowLatencyFrameInterpolationConfiguration::isSupported not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::isSupported not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::maximumDimensions not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::minimumDimensions not bound -!missing-selector! +VTLowLatencySuperResolutionScalerConfiguration::supportedScaleFactorsForFrameWidth:frameHeight: not bound -!missing-selector! VTFrameProcessor::endSession not bound -!missing-selector! VTFrameProcessor::init not bound -!missing-selector! VTFrameProcessor::processWithCommandBuffer:parameters: not bound -!missing-selector! VTFrameProcessor::processWithParameters:completionHandler: not bound -!missing-selector! VTFrameProcessor::processWithParameters:error: not bound -!missing-selector! VTFrameProcessor::processWithParameters:frameOutputHandler: not bound -!missing-selector! VTFrameProcessor::startSessionWithConfiguration:error: not bound -!missing-selector! VTFrameProcessorFrame::buffer not bound -!missing-selector! VTFrameProcessorFrame::initWithBuffer:presentationTimeStamp: not bound -!missing-selector! VTFrameProcessorFrame::presentationTimeStamp not bound -!missing-selector! VTFrameProcessorOpticalFlow::backwardFlow not bound -!missing-selector! VTFrameProcessorOpticalFlow::forwardFlow not bound -!missing-selector! VTFrameProcessorOpticalFlow::initWithForwardFlow:backwardFlow: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameHeight not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::frameWidth not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::initWithFrameWidth:frameHeight:numberOfInterpolatedFrames: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::initWithFrameWidth:frameHeight:spatialScaleFactor: not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::numberOfInterpolatedFrames not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTLowLatencyFrameInterpolationConfiguration::spatialScaleFactor not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::destinationFrames not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::initWithSourceFrame:previousFrame:interpolationPhase:destinationFrames: not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::interpolationPhase not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::previousFrame not bound -!missing-selector! VTLowLatencyFrameInterpolationParameters::sourceFrame not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::destinationPixelBufferAttributes not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameHeight not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameSupportedPixelFormats not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::frameWidth not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::initWithFrameWidth:frameHeight:scaleFactor: not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::scaleFactor not bound -!missing-selector! VTLowLatencySuperResolutionScalerConfiguration::sourcePixelBufferAttributes not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::destinationFrame not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::initWithSourceFrame:destinationFrame: not bound -!missing-selector! VTLowLatencySuperResolutionScalerParameters::sourceFrame not bound -!missing-type! VTFrameProcessor not bound -!missing-type! VTFrameProcessorFrame not bound -!missing-type! VTFrameProcessorOpticalFlow not bound -!missing-type! VTLowLatencyFrameInterpolationConfiguration not bound -!missing-type! VTLowLatencyFrameInterpolationParameters not bound -!missing-type! VTLowLatencySuperResolutionScalerConfiguration not bound -!missing-type! VTLowLatencySuperResolutionScalerParameters not bound -!missing-field! kVTDecodeFrameOptionKey_ContentAnalyzerCropRectangle not bound -!missing-field! kVTDecodeFrameOptionKey_ContentAnalyzerRotation not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOptions is not bound -!missing-pinvoke! VTDecompressionSessionDecodeFrameWithOptionsAndOutputHandler is not bound