Function

CMTimeCodeFormatDescriptionCreate

Creates a format description for a timecode media.

Declaration

OSStatus CMTimeCodeFormatDescriptionCreate(CFAllocatorRef allocator, CMTimeCodeFormatType timeCodeFormatType, CMTime frameDuration, uint32_t frameQuanta, uint32_t flags, CFDictionaryRef extensions, CMTimeCodeFormatDescriptionRef  _Nullable *formatDescriptionOut);

Parameters

allocator

Allocator to be used for creating the CMFormatDescription object.

timeCodeFormatType
frameDuration

Duration of each frame (e.g. 100/2997).

frameQuanta

Frames/sec for timecode (e.g. 30) OR frames/tick for counter mode.

tcFlags

kCMTimeCodeFlag_DropFrame, kCMTimeCodeFlag_24HourMax, kCMTimeCodeFlag_NegTimesOK. For possible values, see Time Code Flags.

extensions

Keys are always CFStrings. Values are always property list objects (i.e. CFData). May be NULL.

descOut

Receives the newly-created CMFormatDescription.

Return Value

A result code. Returns noErr if successful.

Discussion

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.

See Also

TimeCode-Specific Functions

CMTimeCodeFormatDescriptionGetFrameDuration

Returns the duration of each frame (for example 100/2997).

CMTimeCodeFormatDescriptionGetFrameQuanta

Returns the frames/sec for timecode (for example, 30) or frames/tick for counter mode.

CMTimeCodeFormatDescriptionGetTimeCodeFlags

Returns the flags for kCMTimeCodeFlag_DropFrame, kCMTimeCodeFlag_24HourMax, kCMTimeCodeFlag_NegTimesOK

CMTimeCodeFormatDescriptionCopyAsBigEndianTimeCodeDescriptionBlockBuffer

Copies the contents of a CMTimeCodeFormatDescription to a CMBlockBuffer in big-endian byte ordering.

CMTimeCodeFormatDescriptionCreateFromBigEndianTimeCodeDescriptionBlockBuffer

Creates a CMTimeCodeFormatDescription from a big-endian TimeCodeDescription data structure in a CMBlockBuffer.

CMTimeCodeFormatDescriptionCreateFromBigEndianTimeCodeDescriptionData

Creates a CMTimeCodeFormatDescription from a big-endian TimeCodeDescription data structure.

CMSwapBigEndianTimeCodeDescriptionToHost

Converts a TimeCodeDescription data structure from big-endian to host-endian in place.

CMSwapHostEndianTimeCodeDescriptionToBig

Converts a TimeCodeDescription data structure from host-endian to big-endian in place.