CMBufferQueueDequeueIfDataReady(_:)
Dequeues a buffer from a queue, if it’s ready.
Declaration
func CMBufferQueueDequeueIfDataReady(_ queue: CMBufferQueue) -> CMBuffer?Parameters
- queue:
The
CMBufferQueuefrom which to dequeue a buffer (if the buffer is ready).
Return Value
The dequeued buffer. Will be NULL if the queue is empty, or if the buffer to be dequeued is not yet ready.
Discussion
The buffer is released by the queue, but it is also retained for the client. Buffer ownership is thereby transferred from queue to client. The client need not retain the buffer, but is responsible to release it when done with it.