Contents

VTDecompressionOutputHandler

The prototype for the block invoked when frame decompression is complete.

Declaration

typealias VTDecompressionOutputHandler = @Sendable (OSStatus, VTDecodeInfoFlags, CVImageBuffer?, CMTime, CMTime) -> Void

Parameters

  • status:

    noErr if decompression was successful; an error code if decompression was not successful.

  • infoFlags:

    Information about the decode operation.

    The Asynchronous bit may be set if the decode ran asynchronously.

    The Framedropped bit may be set if the frame was dropped.

    If the Imagebuffermodifiable bit is set, it is safe for the client to modify the imageBuffer.

  • imageBuffer:

    The decompressed frame, if decompression was successful; otherwise, NULL.

  • presentationTimeStamp:

    The frame’s presentation timestamp; otherwise, kCMTimeInvalid if the timestamp is not available.

  • presentationDuration:

    The frame’s presentation duration; kCMTimeInvalid if the timestamp is not available.

Discussion

When you decode a frame, you pass in a callback block to be called for that decompressed frame. This block is not necessarily called in display order.

See Also

Data Types