Sends a sample buffer for display.
SDKs
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 10.2+
Framework
- AVFoundation
Declaration
func enqueue(_ sampleBuffer: CMSample Buffer)
Parameters
sampleBuffer
The sample buffer to display.
Discussion
If sample
has the k
attachment set to k
, the frame will be decoded but not displayed.
If sample
has the k
attachment set to k
, the decoded image will be displayed as soon as possible, replacing all previously enqueued images regardless of their timestamps.
Otherwise, the decoded image will be displayed at the sample
output presentation timestamp, as interpreted by the control
property (or the mach
timeline if there is no control timebase).
To schedule the removal of previous images at a specific timestamp, enqueue a marker sample buffer containing no samples, with the k
attachment set to k
.
Important
Attachments with the k
prefix must be set via CMSample
and CFDictionary
. Attachments with the k
prefix must be set via CMSet
.