Function

CMVideoFormatDescriptionCopyAsBigEndianImageDescriptionBlockBuffer(allocator:videoFormatDescription:stringEncoding:flavor:blockBufferOut:)

Copies the contents of a CMVideoFormatDescription to a CMBlockBuffer in big-endian byte ordering.

Declaration

func CMVideoFormatDescriptionCopyAsBigEndianImageDescriptionBlockBuffer(allocator: CFAllocator?, videoFormatDescription: CMVideoFormatDescription, stringEncoding: CFStringEncoding, flavor: CMImageDescriptionFlavor?, blockBufferOut: UnsafeMutablePointer<CMBlockBuffer?>) -> OSStatus

Parameters

allocator

Allocator to use for allocating the CMBlockBuffer object. May be NULL.

videoFormatDescription

The CMVideoFormatDescription to be copied.

imageDescriptionStringEncoding

Pass CFStringGetSystemEncoding() or GetApplicationTextEncoding().

imageDescriptionFlavor

kCMImageDescriptionFlavor constant or NULL for QuickTimeMovie flavor.

imageDescriptionBlockBufferOut

Receives a new CMBlockBuffer containing ImageDescription data structure in big-endian byte ordering.

Discussion

On return, the caller owns the returned CMBlockBuffer, and must release it when done with it.

See Also

Video-Specific Functions

func CMVideoFormatDescriptionGetExtensionKeysCommonWithImageBuffers() -> CFArray

Returns an array of the keys that are used both as CMVideoFormatDescription extensions and CVImageBuffer attachments and attributes.

func CMVideoFormatDescriptionGetPresentationDimensions(CMVideoFormatDescription, usePixelAspectRatio: Bool, useCleanAperture: Bool) -> CGSize

Returns the dimensions, adjusted to take pixel aspect ratio and/or clean aperture into account.

func CMSwapBigEndianImageDescriptionToHost(UnsafeMutablePointer<UInt8>, Int) -> OSStatus

Converts an ImageDescription data structure from big-endian to host-endian in place.

func CMSwapHostEndianImageDescriptionToBig(UnsafeMutablePointer<UInt8>, Int) -> OSStatus

Converts an ImageDescription data structure from host-endian to big-endian in place.