Function

CMFormatDescriptionCreate

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

OSStatus CMFormatDescriptionCreate(CFAllocatorRef allocator, CMMediaType mediaType, FourCharCode mediaSubType, CFDictionaryRef extensions, CMFormatDescriptionRef  _Nullable *formatDescriptionOut);

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

CMFormatDescriptionEqual

Compares two CMFormatDescription objects for equality.

CMFormatDescriptionEqualIgnoringExtensionKeys

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

CMFormatDescriptionGetExtension

Returns the specified extension of a CMFormatDescription.

CMFormatDescriptionGetExtensions

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

CMFormatDescriptionGetMediaSubType

Returns the media subtype of a CMFormatDescription.

CMFormatDescriptionGetMediaType

Returns the media type of a CMFormatDescription.

CMFormatDescriptionGetTypeID

Returns the CFTypeID of CMFormatDescription objects.