CMMetadata

The APIs for working with the framework's Metadata Identifier Services and Metadata Data Type Registry.

Overview

The Core Media framework provides two services: Metadata Identifier Services, and the Metadata Data Type Registry.

Metadata Identifier Services provide a means of encoding the metadata identifying tuple (four byte key namespace and n-byte key value) into CFString, and back again.

The Metadata Data Type Registry allows a process to register metadata data types that conform to a base data type and (optionally) other registered data types. The registry simplifies the process of creating format descriptions for non-trivial metadata values, as well as allowing clients to indicate how metadata can be interpreted.

Topics

Metadata Data Type Registry

func CMMetadataDataTypeRegistryDataTypeIsRegistered(CFString) -> Bool

Tests a data type identifier to see if it has been registered.

func CMMetadataDataTypeRegistryGetDataTypeDescription(CFString) -> CFString

Returns the data type's description (if any was provided when it was registered).

func CMMetadataDataTypeRegistryGetConformingDataTypes(CFString) -> CFArray

Returns the data type's conforming data types (if any were provided when it was registered).

func CMMetadataDataTypeRegistryGetBaseDataTypes() -> CFArray?

Returns an array of base data type identifiers.

func CMMetadataDataTypeRegistryDataTypeIsBaseDataType(CFString) -> Bool

Tests a data type identifier to see if it represents a base data type.

func CMMetadataDataTypeRegistryGetBaseDataTypeForConformingDataType(CFString) -> CFString

Returns the base data type identifier that the given data type conforms to.

Constants

Metadata Identifier Keyspaces

Keyspaces to be used with the functions listed in Metadata Identifier Services.

Metadata Identifiers

Identifiers to be used with the functions listed in Metadata Identifier Services.

Metadata Base Data Types

Basic data types to which all data types registered (with the functions listed in Metadata Data Type Registry) must directly or recursively conform.

Metadata Data Types

Data types for use with the functions listed in Metadata Data Type Registry.

Result Codes

These result codes are used with the functions listed in Metadata Identifier Services and Metadata Data Type Registry.

var kCMMetadataIdentifierError_RequiredParameterMissing: OSStatus

NULL or 0 was passed for a required parameter.

var kCMMetadataIdentifierError_BadKeyLength: OSStatus

A key was passed that had an invalid length.

var kCMMetadataIdentifierError_BadNumberKey: OSStatus

The number passed for a key was not valid (not in the range 0-0xFFFFFFFF).

var kCMMetadataIdentifierError_BadKeySpace: OSStatus

The keyspace passed in was invalid.

var kCMMetadataIdentifierError_BadIdentifier: OSStatus

The identifier passed in was invalid.

var kCMMetadataIdentifierError_NoKeyValueAvailable: OSStatus

A key value was requested for the anonymous keyspace ('anon').

var kCMMetadataDataTypeRegistryError_RequiresConformingBaseType: OSStatus

Data type passed in requires a conforming data type that resolves to a base data type.

var kCMMetadataDataTypeRegistryError_MultipleConformingBaseTypes: OSStatus

Data type passed specified more than one base data type.