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 CFStringRef, 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 Identifier Services

CMMetadataCreateIdentifierForKeyAndKeySpace

Creates a URL-like string identifier that represents a key/keyspace tuple.

CMMetadataCreateKeyFromIdentifier

Creates a copy of the key encoded in the identifier as a CFType.

CMMetadataCreateKeyFromIdentifierAsCFData

Creates a copy of the key value that was encoded in the identifier as CFData.

CMMetadataCreateKeySpaceFromIdentifier

Creates a copy of the keyspace that was encoded in the identifier.

Metadata Data Type Registry

CMMetadataDataTypeRegistryRegisterDataType

Register a data type with the data type registry.

CMMetadataDataTypeRegistryDataTypeIsRegistered

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

CMMetadataDataTypeRegistryGetDataTypeDescription

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

CMMetadataDataTypeRegistryGetConformingDataTypes

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

CMMetadataDataTypeRegistryDataTypeConformsToDataType

Checks to see if a data type conforms to another data type.

CMMetadataDataTypeRegistryGetBaseDataTypes

Returns an array of base data type identifiers.

CMMetadataDataTypeRegistryDataTypeIsBaseDataType

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

CMMetadataDataTypeRegistryGetBaseDataTypeForConformingDataType

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.

kCMMetadataIdentifierError_RequiredParameterMissing

NULL or 0 was passed for a required parameter.

kCMMetadataIdentifierError_BadKey

An invalid key was passed.

kCMMetadataIdentifierError_BadKeyLength

A key was passed that had an invalid length.

kCMMetadataIdentifierError_BadKeyType

A bad type was passed for a key.

kCMMetadataIdentifierError_BadNumberKey

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

kCMMetadataIdentifierError_BadKeySpace

The keyspace passed in was invalid.

kCMMetadataIdentifierError_BadIdentifier

The identifier passed in was invalid.

kCMMetadataIdentifierError_NoKeyValueAvailable

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

kCMMetadataDataTypeRegistryError_RequiredParameterMissing

NULL or 0 was passed for a required parameter.

kCMMetadataDataTypeRegistryError_RequiresConformingBaseType

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

kCMMetadataDataTypeRegistryError_MultipleConformingBaseTypes

Data type passed specified more than one base data type.