---
title: "VTDecompressionSessionCreate(allocator:formatDescription:decoderSpecification:imageBufferAttributes:outputCallback:decompressionSessionOut:)"
framework: videotoolbox
role: symbol
role_heading: Function
path: "videotoolbox/vtdecompressionsessioncreate(allocator:formatdescription:decoderspecification:imagebufferattributes:outputcallback:decompressionsessionout:)"
---

# VTDecompressionSessionCreate(allocator:formatDescription:decoderSpecification:imageBufferAttributes:outputCallback:decompressionSessionOut:)

Creates a session for decompressing video frames.

## Declaration

```swift
func VTDecompressionSessionCreate(allocator: CFAllocator?, formatDescription videoFormatDescription: CMVideoFormatDescription, decoderSpecification videoDecoderSpecification: CFDictionary?, imageBufferAttributes destinationImageBufferAttributes: CFDictionary?, outputCallback: UnsafePointer<VTDecompressionOutputCallbackRecord>?, decompressionSessionOut: UnsafeMutablePointer<VTDecompressionSession?>) -> OSStatus
```

## Parameters

- `allocator`: An allocator for the session. Pass NULL to use the default allocator.
- `videoFormatDescription`: The description of the source video frames.
- `videoDecoderSpecification`: The particular video decoder that must be used. Pass NULL to let VideoToolbox choose a decoder.
- `destinationImageBufferAttributes`: Requirements for the emitted pixel buffers. Pass NULL to set no requirements.
- `outputCallback`: The callback to be called with decompressed frames. Pass NULL only if you’ll be calling doc://com.apple.videotoolbox/documentation/VideoToolbox/VTDecompressionSessionDecodeFrame(_:sampleBuffer:flags:infoFlagsOut:outputHandler:) for decoding frames.
- `decompressionSessionOut`: A pointer to a variable to receive the new decompression session.

## Discussion

Discussion Decompressed frames are emitted through calls to outputCallback.

## See Also

### Creating a Session

- [VTDecompressionSessionCreate(allocator:formatDescription:decoderSpecification:imageBufferAttributes:decompressionSessionOut:)](videotoolbox/vtdecompressionsessioncreate(allocator:formatdescription:decoderspecification:imagebufferattributes:decompressionsessionout:).md)
