VTDecompressionMultiImageCapableOutputHandler

Type Alias VTDecompressionMultiImageCapableOutputHandler 

Source
pub type VTDecompressionMultiImageCapableOutputHandler = *mut DynBlock<dyn Fn(i32, VTDecodeInfoFlags, *mut CVImageBuffer, *mut CMTaggedBufferGroup, CMTime, CMTime)>;
Available on crate features VTDecompressionSession and VTErrors and block2 and objc2-core-media and objc2-core-video only.
Expand description

Prototype for block invoked when frame decompression is complete.

When you decode a frame, you pass in a callback block to be called for that decompressed frame. This block will not necessarily be called in display order. If the VTDecompressionSessionDecodeFrameWithOutputHandler call returns an error, the block will not be called.

Parameter status: noErr if decompression was successful; an error code if decompression was not successful.

Parameter infoFlags: Contains information about the decode operation. The kVTDecodeInfo_Asynchronous bit may be set if the decode ran asynchronously. The kVTDecodeInfo_FrameDropped bit may be set if the frame was dropped. If the kVTDecodeInfo_ImageBufferModifiable bit is set, it is safe for the client to modify the imageBuffer.

Parameter imageBuffer: Contains the decompressed frame, if decompression was successful and the CMSampleBuffer contained a single image frame; otherwise, NULL. IMPORTANT: The video decompressor may still be referencing the imageBuffer returned in this callback if the kVTDecodeInfo_ImageBufferModifiable flag is not set. Unless this flag is set, it is not safe to modify the returned imageBuffer.

Parameter taggedBufferGroup: Contains the decompressed frame’s multiple images, if decompression was successful and the CMSampleBuffer contained a multi-image frame; otherwise, NULL. IMPORTANT: The video decompressor may still be referencing the pixelBuffers returned in this callback if the kVTDecodeInfo_ImageBufferModifiable flag is not set. Unless this flag is set, it is not safe to modify the returned pixelBuffers.

Parameter presentationTimeStamp: The frame’s presentation timestamp; kCMTimeInvalid if not available.

Parameter presentationDuration: The frame’s presentation duration; kCMTimeInvalid if not available.

See also Apple’s documentation