pub type VTCompressionOutputCallback = Option<unsafe extern "C-unwind" fn(*mut c_void, *mut c_void, i32, VTEncodeInfoFlags, *mut CMSampleBuffer)>;VTCompressionSession and VTErrors and objc2-core-media only.Expand description
Prototype for callback invoked when frame compression is complete.
When you create a compression session, you pass in a callback function to be called for compressed frames. This function will be called in decode order (which is not necessarily the same as display order).
Parameter outputCallbackRefCon: The callback’s reference value.
Parameter sourceFrameRefCon: The frame’s reference value, copied from the sourceFrameRefCon argument to
VTCompressionSessionEncodeFrame.
Parameter status: noErr if compression was successful; an error code if compression was not successful.
Parameter infoFlags: Contains information about the encode operation.
The kVTEncodeInfo_Asynchronous bit may be set if the encode ran asynchronously.
The kVTEncodeInfo_FrameDropped bit may be set if the frame was dropped.
Parameter sampleBuffer: Contains the compressed frame, if compression was successful and the frame was not dropped;
otherwise, NULL.
See also Apple’s documentation
Aliased Type§
pub enum VTCompressionOutputCallback {
None,
Some(unsafe extern "C-unwind" fn(*mut c_void, *mut c_void, i32, VTEncodeInfoFlags, *mut CMSampleBuffer)),
}