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?>) -> OSStatusParameters
- allocator:
The allocator to use for allocating the
CMSampleBufferobject. PasskCFAllocatorDefaultto 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 thesbuf.`` - sampleBufferOut:
On output, points to the newly created
CMSampleBuffer.
Return Value
A result code. See Sample Buffer Error Codes.