Function

CMFormatDescriptionCreate(allocator:mediaType:mediaSubType:extensions:formatDescriptionOut:)

Creates a generic CMFormatDescription object. You should not call this method for the media types that has specific create functions such as audio, video, text, muxed, metaData and timeCode.

Declaration

func CMFormatDescriptionCreate(allocator: CFAllocator?, mediaType: CMMediaType, mediaSubType: FourCharCode, extensions: CFDictionary?, formatDescriptionOut: UnsafeMutablePointer<CMFormatDescription?>) -> OSStatus

Parameters

allocator

Allocator to use when creating the CMFormatDescription. If NULL, the default allocator will be used.

mediaType

Four character code identifying the type of media associated with the CMFormatDescription.

mediaSubtype

Four character code identifying the sub-type of media.

extensions

Dictionary of extensions to be attached to the CMFormatDescription. May be NULL.

descOut

Receives the newly-created CMFormatDescription.

Return Value

A result code. See “Result Codes”.

Discussion

Use this call to create any CMFormatDescription that is composed solely of extensions, and for which CFEqual() of a the extensions dictionaries is a valid test for Format Description equality.

See Also

Common Functions

func CMFormatDescriptionEqualIgnoringExtensionKeys(CMFormatDescription?, otherFormatDescription: CMFormatDescription?, extensionKeysToIgnore: CFTypeRef?, sampleDescriptionExtensionAtomKeysToIgnore: CFTypeRef?) -> Bool

Compares two CMFormatDescription objects for equality, ignoring differences in the specified lists of format description extension keys and sample description extension keys.

func CMFormatDescriptionGetExtensions(CMFormatDescription) -> CFDictionary?

Returns an immutable dictionary containing all the extensions of a CMFormatDescription.

func CMFormatDescriptionGetMediaSubType(CMFormatDescription) -> FourCharCode

Returns the media subtype of a CMFormatDescription.

func CMFormatDescriptionGetMediaType(CMFormatDescription) -> CMMediaType

Returns the media type of a CMFormatDescription.

func CMFormatDescriptionGetTypeID() -> CFTypeID

Returns the CFTypeID of CMFormatDescription objects.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software