Contents

CMSampleBufferGetImageBuffer(_:)

Returns an image buffer that contains the media data.

Declaration

func CMSampleBufferGetImageBuffer(_ sbuf: CMSampleBuffer) -> CVImageBuffer?

Parameters

  • sbuf:

    The CMSampleBuffer being interrogated.

Return Value

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

Discussion

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

See Also

Modifying Sample Buffers