Function

CMFormatDescriptionGetMediaSubType

Returns the media subtype of a CMFormatDescription.

Declaration

FourCharCode CMFormatDescriptionGetMediaSubType(CMFormatDescriptionRef desc);

Parameters

desc

CMFormatDescription being interrogated

Return Value

Four-character code identifying the media subtype of the CMFormatDescription.

Discussion

The media subtype is defined in a media-specific way. For audio streams, the media subtype is the asbd.mFormatID. For video streams, the media subtype is the video codec type. For muxed streams, it is the format of the muxed stream.

For example, 'aac ' is returned for a description of an AAC audio stream, 'avc1' is returned for a description of an H.264 video stream, and 'mp2t' is returned for a description of an MPEG-2 transport (muxed) stream. If a particular type of media stream does not have subtypes, this API may return 0.

See Also

Common Functions

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.

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.

CMFormatDescriptionGetMediaType

Returns the media type of a CMFormatDescription.

CMFormatDescriptionGetTypeID

Returns the CFTypeID of CMFormatDescription objects.