VTFrameSiloCallBlockForEachSampleBuffer(_:in:handler:)
Retrieves sample buffers from a frame silo object.
Declaration
func VTFrameSiloCallBlockForEachSampleBuffer(_ silo: VTFrameSilo, in timeRange: CMTimeRange, handler: (CMSampleBuffer) -> OSStatus) -> OSStatusParameters
- silo:
The frame silo object.
- timeRange:
The decode time range of sample buffers to retrieve. Pass
kCMTimeRangeInvalidto retrieve all sample buffers from theVTFrameSilo. - handler:
A block to be called, in decode order, with each sample buffer that was added. To abort iteration early, return a nonzero status. The
VTFrameSiloobject may write sample buffers and data to the backing file between addition and retrieval; do not expect to get identical object pointers back.
Return Value
kVTFrameSiloInvalidTimeRangeErr if any time ranges are non-numeric, overlap, or are not in ascending order. Returns any nonzero status returned by the handler block.
Discussion
You call this function to retrieve sample buffers at the end of a multipass compression session.