enqueue(_:)
Sends a sample buffer to the queue for rendering.
Declaration
func enqueue(_ sampleBuffer: CMSampleBuffer)Parameters
- sampleBuffer:
The sample buffer to be enqueued.
Discussion
For video data, the sample buffer is processed according to the attachments it contains. If it has a true value for its kCMSampleAttachmentKey_DoNotDisplay attachment, the frame is decoded but not displayed. If it has a true value for its kCMSampleAttachmentKey_DisplayImmediately attachment, the frame is displayed as soon as possible, regardless of its presentation timestamp. Otherwise, the frame is displayed according to its presentation timestamp, relative to the timebase.
To schedule the removal of previous images at a specific timestamp, enqueue a marker sample buffer that doesn’t contain any samples, with the kCMSampleBufferAttachmentKey_EmptyMedia attachment set to kCFBooleanTrue.