Function

VTCompressionSessionPrepareToEncodeFrames(_:)

Enables the encoder to perform any necessary resource allocation before the encoder begins encoding frames (optional).

Declaration

func VTCompressionSessionPrepareToEncodeFrames(_ session: VTCompressionSession) -> OSStatus

Parameters

session

The compression session.

Discussion

If this function isn't called, any necessary resources are allocated on the first VTCompressionSessionEncodeFrame(_:imageBuffer:presentationTimeStamp:duration:frameProperties:sourceFrameRefcon:infoFlagsOut:) call.

Subsequent calls to this function have no effect.