Function VTCompressionSessionGetPixelBufferPool

Source
pub unsafe extern "C-unwind" fn VTCompressionSessionGetPixelBufferPool(
    session: &VTCompressionSession,
) -> Option<CFRetained<CVPixelBufferPool>>
Available on crate features VTCompressionSession and objc2-core-video only.
Expand description

Returns a pool that can provide ideal source pixel buffers for a compression session.

The compression session creates this pixel buffer pool based on the compressor’s pixel buffer attributes and any pixel buffer attributes passed in to VTCompressionSessionCreate. If the source pixel buffer attributes and the compressor pixel buffer attributes cannot be reconciled, the pool is based on the source pixel buffer attributes and the Video Toolbox converts each CVImageBuffer internally. <BR

While clients can call VTCompressionSessionGetPixelBufferPool once and retain the resulting pool, the call is cheap enough that it’s OK to call it once per frame. If a change of session properties causes the compressor’s pixel buffer attributes to change, it’s possible that VTCompressionSessionGetPixelBufferPool might return a different pool.