CMFormatDescriptionGetMediaSubType(_:)
Returns the media subtype of a format description.
Declaration
func CMFormatDescriptionGetMediaSubType(_ desc: CMFormatDescription) -> FourCharCodeParameters
- desc:
The
CMFormatDescriptionto examine.
Return Value
A media type that identifies the subtype of the CMFormatDescription.
Discussion
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’s the format of the muxed stream.
For example, the function returns aac for a description of an AAC audio stream, avc1 for a description of an H.264 video stream, and mp2t for a description of an MPEG-2 transport (muxed) stream. If a media stream doesn’t have subtypes, this API may return 0.