---
title: VTDecompressionOutputHandler
framework: videotoolbox
role: symbol
role_heading: Type Alias
path: videotoolbox/vtdecompressionoutputhandler
---

# VTDecompressionOutputHandler

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

## Declaration

```swift
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 doc://com.apple.videotoolbox/documentation/VideoToolbox/VTDecodeInfoFlags/asynchronous bit may be set if the decode ran asynchronously. The doc://com.apple.videotoolbox/documentation/VideoToolbox/VTDecodeInfoFlags/frameDropped bit may be set if the frame was dropped. If the doc://com.apple.videotoolbox/documentation/VideoToolbox/VTDecodeInfoFlags/imageBufferModifiable bit is set, it is safe for the client to modify the imageBuffer.
- `imageBuffer`: The decompressed frame, if decompression was successful; otherwise, NULL. important: The video decompressor may still be referencing the imageBuffer returned in this callback if the doc://com.apple.videotoolbox/documentation/VideoToolbox/VTDecodeInfoFlags/imageBufferModifiable flag is not set. Unless this flag is set, it is not safe to modify the returned imageBuffer.
- `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

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

- [VTDecompressionSession](videotoolbox/vtdecompressionsession.md)
- [VTDecodeFrameFlags](videotoolbox/vtdecodeframeflags.md)
- [VTDecodeInfoFlags](videotoolbox/vtdecodeinfoflags.md)
- [VTDecompressionOutputCallback](videotoolbox/vtdecompressionoutputcallback.md)
- [VTDecompressionOutputCallbackRecord](videotoolbox/vtdecompressionoutputcallbackrecord.md)
