Contents

CMSampleBufferMakeDataReady(_:)

Makes the sample buffer’s data ready for use by invoking its callback to load the data.

Declaration

func CMSampleBufferMakeDataReady(_ sbuf: CMSampleBuffer) -> OSStatus

Parameters

  • sbuf:

    The sample buffer being modified.

Return Value

A result code. See Sample Buffer Error Codes.

Discussion

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

See Also

Determining Readiness