VTDecompressionOutputCallback

Type Alias VTDecompressionOutputCallback 

Source
pub type VTDecompressionOutputCallback = Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void, i32, VTDecodeInfoFlags, *mut CVImageBuffer, CMTime, CMTime)>;
Available on crate features VTDecompressionSession and VTErrors and objc2-core-media and objc2-core-video only.
Expand description

Prototype for callback invoked when frame decompression is complete.

When you create a decompression session, you pass in a callback function to be called for decompressed frames. This function will not necessarily be called in display order.

Parameter decompressionOutputRefCon: The callback’s reference value, copied from the decompressionOutputRefCon field of the VTDecompressionOutputCallbackRecord structure.

Parameter sourceFrameRefCon: The frame’s reference value, copied from the sourceFrameRefCon argument to VTDecompressionSessionDecodeFrame.

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; 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 presentationTimeStamp: The frame’s presentation timestamp, which will be determined by calling CMSampleBufferGetOutputPresentationTimeStamp; kCMTimeInvalid if not available.

Parameter presentationDuration: The frame’s presentation duration, which will be determined by calling CMSampleBufferGetOutputDuration; kCMTimeInvalid if not available.

See also Apple’s documentation

Aliased Type§

pub enum VTDecompressionOutputCallback {
    None,
    Some(unsafe extern "C-unwind" fn(*mut c_void, *mut c_void, i32, VTDecodeInfoFlags, *mut CVBuffer, CMTime, CMTime)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C-unwind" fn(*mut c_void, *mut c_void, i32, VTDecodeInfoFlags, *mut CVBuffer, CMTime, CMTime))

Some value of type T.