Function VTFrameSiloCallBlockForEachSampleBuffer

Source
pub unsafe extern "C-unwind" fn VTFrameSiloCallBlockForEachSampleBuffer(
    silo: &VTFrameSilo,
    time_range: CMTimeRange,
    handler: &Block<dyn Fn(NonNull<CMSampleBuffer>) -> i32>,
) -> i32
Available on crate features block2 and objc2-core-media and VTFrameSilo only.
Expand description

Retrieves sample buffers from a VTFrameSilo object.

You call this function to retrieve sample buffers at the end of a multi-pass compression session.

Parameter timeRange: The decode time range of sample buffers to retrieve. Pass kCMTimeRangeInvalid to retrieve all sample buffers from the VTFrameSilo.

Parameter 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 VTFrameSilo may write sample buffers and data to the backing file between addition and retrieval; do not expect to get identical object pointers back.

Returns: Returns kVTFrameSiloInvalidTimeRangeErr if any time ranges are non-numeric, overlap or are not in ascending order. Returns any nonzero status returned by the handler block.