Function

CMMuxedFormatDescriptionCreate

Creates a format description for a muxed media stream.

Declaration

OSStatus CMMuxedFormatDescriptionCreate(CFAllocatorRef allocator, CMMuxedStreamType muxType, CFDictionaryRef extensions, CMMuxedFormatDescriptionRef  _Nullable *formatDescriptionOut);

Parameters

allocator

CFAllocator to be used. Pass NULL or kCFAllocatorDefault to use the default allocator.

muxType

Type of the muxed stream (e.g. kCMMuxedStreamType_MPEG2Transport for MPEG-2 transport stream). This is the media subtype, and will be returned if you subsequently call CMFormatDescriptionGetMediaSubType (or CMMuxedFormatDescriptionGetStreamType).

extensions

Dictionary of extension key/value pairs. Keys are always of type CFString. Values are always property list objects (i.e.. CFData, CFString, CFArray, CFDictionary, CFDate, CFBoolean, or CFNumber). Can be NULL.

outDesc

On output, returns newly created muxed CMFormatDescription

Return Value

A result code. Returns noErr if successful.

Discussion

A muxed format description does not know the formats of the sub-streams within the muxed stream. That information will only be discoverable by the demuxer software (or other software which understands the details of the muxed bitstream) which will need to produce separate format descriptions for each of its output streams. The caller owns the returned CMFormatDescription, and must release it when done with it. All input parameters are copied (the extensions are deep-copied). The caller can deallocate them or re-use them after making this call.