Contents

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?>) -> 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 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.

See Also

Creating a Session