One Logo Pool Ball
CoreMedia · IOS API REFERENCE

CMBufferQueue.Handlers

struct · iOS 13.0+ · SDK 27.1

struct Handlers

Handlers provided to `CMBufferQueue` initializers, for use by the queue in interrogating the buffers that it will see.

Members (11)

init · iOS 13.0+

init

TypeScript
static init(body: ((arg0: CMBufferQueue_Handlers_Builder) => void)): CMBufferQueue_Handlers
Swift declaration
init(withHandlers body: (inout CMBufferQueue.Handlers.Builder) -> Void)

Creates a `Handlers` using a `Builder`

method · iOS 13.0+

withHandlers

TypeScript
withHandlers(body: ((arg0: CMBufferQueue_Handlers_Builder) => void)): CMBufferQueue_Handlers
Swift declaration
func withHandlers(_ body: (inout CMBufferQueue.Handlers.Builder) -> Void) -> CMBufferQueue.Handlers

Creates a `Handlers` using a `Builder`, using `self` as default values

get · iOS 13.0+

getDuration

TypeScript
get getDuration(): ((arg0: unknown) => Promise<CMTime>)
Swift declaration
let getDuration: CMBufferGetTimeHandler

This handler is called (once) during enqueue and dequeue operations to update the total duration of the queue.

get · iOS 13.0+

isDataReady

TypeScript
get isDataReady(): (((arg0: unknown) => Promise<boolean>)) | null
Swift declaration
let isDataReady: CMBufferGetBooleanHandler?

This handler is called from `dequeueIfDataReady()`, to ask if the buffer that is about to be dequeued is ready. Can be `nil` (data will be assumed to be ready).

get · iOS 13.0+

getDecodeTimeStamp

TypeScript
get getDecodeTimeStamp(): (((arg0: unknown) => Promise<CMTime>)) | null
Swift declaration
let getDecodeTimeStamp: CMBufferGetTimeHandler?

This handler is called from `firstDecodeTimeStamp` (once), and from `minDecodeTimeStamp` (multiple times). It should return the decode timestamp of the buffer. If there are multiple samples in the buffer, this handler should return the minimum decode timestamp in the buffer. Can be `nil` (`firstDecodeTimeStamp` and `minDecodeTimeStamp` will return `CMTime.invalid`).

get · iOS 13.0+

unsortedSampleBuffers

TypeScript
static get unsortedSampleBuffers(): CMBufferQueue_Handlers
Swift declaration
static let unsortedSampleBuffers: CMBufferQueue.Handlers

Callbacks for unsorted `CMSampleBuffer`s, provided as a convenience.

get · iOS 13.0+

getPresentationTimeStamp

TypeScript
get getPresentationTimeStamp(): (((arg0: unknown) => Promise<CMTime>)) | null
Swift declaration
let getPresentationTimeStamp: CMBufferGetTimeHandler?

This handler is called from `firstPresentationTimeStamp` (once) and from `minPresentationTimeStamp` (multiple times). It should return the presentation timestamp of the buffer. If there are multiple samples in the buffer, this handler should return the minimum presentation timestamp in the buffer. Can be `nil` (`firstPresentationTimeStamp` and `minPresentationTimeStamp` will return `CMTime.invalid`).

get · iOS 13.0+

dataBecameReadyNotification

TypeScript
get dataBecameReadyNotification(): (string) | null
Swift declaration
let dataBecameReadyNotification: String?

If triggers of type `.whenDataBecomesReady` are installed, the queue will listen for this notification on the head buffer. Can be `nil` (then the queue won't listen for it).

get · iOS 13.0+

outputPTSSortedSampleBuffers

TypeScript
static get outputPTSSortedSampleBuffers(): CMBufferQueue_Handlers
Swift declaration
static let outputPTSSortedSampleBuffers: CMBufferQueue.Handlers

Callbacks for `CMSampleBuffer`s sorted by output presentation timestamp, provided as a convenience.

get · iOS 13.0+

compare

TypeScript
get compare(): (((arg0: unknown, arg1: unknown) => Promise<_CoreFoundation_CFComparisonResult>)) | null
Swift declaration
let compare: CMBufferCompareHandler?

This handler is called (multiple times) from `enqueue()`, to perform an insertion sort. Can be `nil` (queue will be FIFO).

get · iOS 13.0+

getSize

TypeScript
get getSize(): (((arg0: unknown) => Promise<number>)) | null
Swift declaration
let getSize: CMBufferGetSizeHandler?

This handler is called (once) during enqueue and dequeue operation to update the total size of the queue. Can be `nil`.

Skipped declarations

No declarations were skipped in this snapshot.

All CoreMedia types →