VTDecompressionSessionCreate(allocator:formatDescription:decoderSpecification:imageBufferAttributes:outputCallback:decompressionSessionOut:)
Creates a session for decompressing video frames.
Declaration
func VTDecompressionSessionCreate(allocator: CFAllocator?, formatDescription videoFormatDescription: CMVideoFormatDescription, decoderSpecification videoDecoderSpecification: CFDictionary?, imageBufferAttributes destinationImageBufferAttributes: CFDictionary?, outputCallback: UnsafePointer<VTDecompressionOutputCallbackRecord>?, decompressionSessionOut: UnsafeMutablePointer<VTDecompressionSession?>) -> OSStatusParameters
- allocator:
An allocator for the session. Pass
NULLto use the default allocator. - videoFormatDescription:
The description of the source video frames.
- videoDecoderSpecification:
The particular video decoder that must be used. Pass
NULLto let VideoToolbox choose a decoder. - destinationImageBufferAttributes:
Requirements for the emitted pixel buffers. Pass
NULLto set no requirements. - outputCallback:
The callback to be called with decompressed frames. Pass
NULLonly if you’ll be calling Vtdecompressionsessiondecodeframe(_:samplebuffer:flags:infoflagsout:outputhandler:) for decoding frames. - decompressionSessionOut:
A pointer to a variable to receive the new decompression session.
Discussion
Decompressed frames are emitted through calls to outputCallback.