Contents

CMSampleBufferCopySampleBufferForRange(allocator:sampleBuffer:sampleRange:sampleBufferOut:)

Creates a sample buffer that contains a range of samples from an existing sample buffer.

Declaration

func CMSampleBufferCopySampleBufferForRange(allocator: CFAllocator?, sampleBuffer sbuf: CMSampleBuffer, sampleRange: CFRange, sampleBufferOut: UnsafeMutablePointer<CMSampleBuffer?>) -> OSStatus

Parameters

  • allocator:

    The allocator to use for allocating the CMSampleBuffer object. Pass kCFAllocatorDefault to use the default allocator.

  • sbuf:

    The sample buffer containing the original samples.

  • sampleRange:

    The range of samples to copy from sbuf, where sample 0 is the first sample in the sbuf.``

  • sampleBufferOut:

    On output, points to the newly created CMSampleBuffer.

Return Value

A result code. See Sample Buffer Error Codes.

Discussion

See Also

Copying Sample Buffers