Contents

CMMetadataFormatDescriptionGetKeyWithLocalID(_:localKeyID:)

Returns the key for the local identifier.

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

Working with Metadata Descriptions