Function

CMMetadataFormatDescriptionGetKeyWithLocalID(_:localKeyID:)

Returns the key associated with the metadata for the given local id.

Declaration

func CMMetadataFormatDescriptionGetKeyWithLocalID(_ desc: CMMetadataFormatDescription, localKeyID: OSType) -> CFDictionary?

Parameters

desc

Format description being interrogated.

localKeyID

Local Id identifying the key associated with the metadata description.

Return Value

A new dictionary containing the key specified by the localKeyID, or NULL if there is no key corresponding to the localKeyID.

Discussion

When writing a metadata track to a QuickTime movie, you can store many different kinds of metadata in one track. The format description for the track describes all of the kinds of metadata that might be present in that track. And each kind of metadata has an id assigned to it which is unique from the others in the group. So when individual samples of metadata are written (or read back later), they don't contain their full description, instead they just contain the unique id (called the local id) that was assigned to them. For instance, GPS might be local id 1, and face data might be local id 2. When someone pulls such a sample from a movie and wants to do a reverse lookup, they can call CMMetadataFormatDescriptionGetKeyWithLocalID, using the local id they've got, to get the Key associated with this metadata.

See Also

Metadata-Specific Functions

func CMSwapBigEndianMetadataDescriptionToHost(UnsafeMutablePointer<UInt8>, Int) -> OSStatus

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

func CMSwapHostEndianMetadataDescriptionToBig(UnsafeMutablePointer<UInt8>, Int) -> OSStatus

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

func CMMetadataFormatDescriptionGetIdentifiers(CMMetadataFormatDescription) -> CFArray?

Gets an array of metadata identifiers from a metadata format description.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software