Contents

CMSampleBufferGetDataBuffer(_:)

Returns a block buffer that contains the media data.

Declaration

func CMSampleBufferGetDataBuffer(_ sbuf: CMSampleBuffer) -> CMBlockBuffer?

Parameters

  • sbuf:

    The CMSampleBuffer being interrogated.

Return Value

CMBlockBuffer of media data. The result will be NULL if the CMSampleBuffer does not contain a CMBlockBuffer, if the CMSampleBuffer contains a CVImageBuffer, or if there is some other error.

Discussion

The caller doesn’t own the returned dataBuffer, and must retain it explicitly if the caller needs to maintain a reference to it.

See Also

Modifying Sample Buffers