Function

CMSampleBufferMakeDataReady

Makes a CMSampleBuffer data ready, by calling the client's CMSampleBufferMakeDataReadyCallback.

Declaration

OSStatus CMSampleBufferMakeDataReady(CMSampleBufferRef sbuf);

Parameters

sbuf

The sample buffer being modified.

Return Value

A result code. See Result Codes

Discussion

The CMSampleBufferMakeDataReadyCallback is passed in by the client during creation. It must return 0 if successful, and in that case, CMSampleBufferMakeDataReady will set the data readiness of the CMSampleBuffer to true. If the sample buffer is not ready, and there is no CMSampleBufferMakeDataReadyCallback to call, kCMSampleBufferError_BufferNotReady will be returned. Similarly, if the CMSampleBuffer is not ready, and the CMSampleBufferMakeDataReadyCallback fails and returns an error, CMSampleBuffer will be returned.

See Also

Modifying Sample Buffers

CMSampleBufferCallBlockForEachSample

Calls a block for every individual sample in a sample buffer.

CMSampleBufferSetDataFailed

Marks a sample buffer's data as "failed", to indicate that the data will not become ready.

CMSampleBufferSetInvalidateHandler

Sets the sample buffer's invalidation handler block, which is called during CMSampleBufferInvalidate.

CMSampleBufferCallForEachSample

Calls a function for every individual sample in a sample buffer.

CMSampleBufferCopySampleBufferForRange

Creates a CMSampleBuffer containing a range of samples from an existing CMSampleBuffer.

CMSampleBufferInvalidate

Makes the sample buffer invalid, calling any installed invalidation callback.

CMSampleBufferSetDataBuffer

Associates a CMSampleBuffer with its CMBlockBuffer of media data.

CMSampleBufferSetDataReady

Marks a CMSampleBuffer's data as "ready".

CMSampleBufferSetInvalidateCallback

Sets the CMSampleBuffer’s invalidation callback, which is called during CMSampleBufferInvalidate.

CMSampleBufferSetOutputPresentationTimeStamp

Sets an output presentation timestamp to be used in place of a calculated value.

CMSampleBufferTrackDataReadiness

Associates a CMSampleBuffer's data readiness with another CMSampleBuffer's data readiness.