Contents

CMBufferValidationCallback

A type alias for a callback that tests whether a buffer is in a valid state to add to a queue.

Declaration

typealias CMBufferValidationCallback = (CMBufferQueue, CMBuffer, UnsafeMutableRawPointer?) -> OSStatus

Discussion

CMBufferQueueEnqueue(_:buffer:) will call this function to validate buffers.

Return noErr if the buffer is in a valid state to add.

Return a nonzero error code if the buffer should be rejected; CMBufferQueueEnqueue(_:buffer:) will return this error to the caller. If you do not have a more descriptive error code, use kCMBufferQueueError_InvalidBuffer.

Callback Parameters

buf

The buffer about to be added.

queue

The queue requesting validation.

validationRefCon

Contextual data.

See Also

Validating a Queue