Instance Property

readyForMoreMediaData

A Boolean value that indicates the readiness of the layer to accept more sample buffers.

Declaration

@property(readonly, getter=isReadyForMoreMediaData) BOOL readyForMoreMediaData;

Discussion

AVSampleBufferDisplayLayer keeps track of the occupancy levels of its internal queues for the benefit of clients that enqueue sample buffers from non-real-time sources — that is, clients that can supply sample buffers faster than they are consumed and need to decide when to hold back buffers.

Clients enqueueing sample buffers from non-real-time sources may hold off from generating or obtaining more sample buffers to enqueue when the value of readyForMoreMediaData is NO.

It is safe to call enqueueSampleBuffer: when readyForMoreMediaData is NO, but enqueing more sample buffers than are required for timely rendering by the receiver is highly discouraged.

To help with control of the non-real-time supply of sample buffers, such clients should use requestMediaDataWhenReadyOnQueue:usingBlock: in order to specify a block that the layer should invoke whenever it’s ready for sample buffers to be appended.

The value of readyForMoreMediaData will often change from NO to YES asynchronously, as previously supplied sample buffers are decoded and displayed.

See Also

Initiating Media Data Requests

- requestMediaDataWhenReadyOnQueue:usingBlock:

Instructs the target to invoke a client-supplied block repeatedly, at its convenience, in order to gather sample buffers for display.

- stopRequestingMediaData

Cancels any current media data request.