Function

CMFormatDescriptionGetMediaSubType(_:)

Returns the media subtype of a CMFormatDescription.

Declaration

func CMFormatDescriptionGetMediaSubType(_ desc: CMFormatDescription) -> FourCharCode

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

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

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.

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 CMFormatDescriptionGetMediaType(CMFormatDescription) -> CMMediaType

Returns the media type of a CMFormatDescription.

func CMFormatDescriptionGetTypeID() -> CFTypeID

Returns the CFTypeID of CMFormatDescription objects.