#[repr(C)]pub struct CMBufferHandlers {
pub version: usize,
pub getDecodeTimeStamp: CMBufferGetTimeHandler,
pub getPresentationTimeStamp: CMBufferGetTimeHandler,
pub getDuration: CMBufferGetTimeHandler,
pub isDataReady: CMBufferGetBooleanHandler,
pub compare: CMBufferCompareHandler,
pub dataBecameReadyNotification: *const CFString,
pub getSize: CMBufferGetSizeHandler,
}CMBufferQueue and CMTime and block2 only.Expand description
Fields§
§version: usizeMust be 1.
getDecodeTimeStamp: CMBufferGetTimeHandlerThis block is called from CMBufferQueueGetFirstDecodeTimeStamp (once), and from CMBufferQueueGetMinDecodeTimeStamp (multiple times). It should return the decode timestamp of the buffer. If there are multiple samples in the buffer, this block should return the minimum decode timestamp in the buffer. Can be NULL (CMBufferQueueGetFirstDecodeTimeStamp and CMBufferQueueGetMinDecodeTimeStamp will return kCMTimeInvalid).
getPresentationTimeStamp: CMBufferGetTimeHandlerThis block is called from CMBufferQueueGetFirstPresentationTimeStamp (once) and from CMBufferQueueGetMinPresentationTimeStamp (multiple times). It should return the presentation timestamp of the buffer. If there are multiple samples in the buffer, this block should return the minimum presentation timestamp in the buffer. Can be NULL (CMBufferQueueGetFirstPresentationTimeStamp and CMBufferQueueGetMinPresentationTimeStamp will return kCMTimeInvalid).
getDuration: CMBufferGetTimeHandlerThis block is called (once) during enqueue and dequeue operations to update the total duration of the queue. Must not be NULL.
isDataReady: CMBufferGetBooleanHandlerThis block is called from CMBufferQueueDequeueIfDataReadyAndRetain, to ask if the buffer that is about to be dequeued is ready. Can be NULL (data will be assumed to be ready).
compare: CMBufferCompareHandlerThis block is called (multiple times) from CMBufferQueueEnqueue, to perform an insertion sort. Can be NULL (queue will be FIFO).
dataBecameReadyNotification: *const CFStringIf triggers of type kCMBufferQueueTrigger_WhenDataBecomesReady are installed, the queue will listen for this notification on the head buffer. Can be NULL (then the queue won’t listen for it).
getSize: CMBufferGetSizeHandlerThis block is called (once) during enqueue and dequeue operation to update the total size of the queue. Can be NULL.
Trait Implementations§
Source§impl Clone for CMBufferHandlers
impl Clone for CMBufferHandlers
Source§fn clone(&self) -> CMBufferHandlers
fn clone(&self) -> CMBufferHandlers
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CMBufferHandlers
impl Debug for CMBufferHandlers
Source§impl Encode for CMBufferHandlers
Available on crate feature objc2 only.
impl Encode for CMBufferHandlers
objc2 only.Source§impl PartialEq for CMBufferHandlers
impl PartialEq for CMBufferHandlers
Source§impl RefEncode for CMBufferHandlers
Available on crate feature objc2 only.
impl RefEncode for CMBufferHandlers
objc2 only.