About Media Handlers

The Movie Toolbox does not contain direct support for manipulating specific media types. This work is performed by media handler components. Media handlers are components that are responsible for interpreting and manipulating a media’s sample data.

Each media type has its own media handler, which deals with the specific characterisics of that media type. Apple provides media handlers for video, sound, text, sprites, timecodes, tweens, and QuickTime music. Because media handlers are implemented as components, new media handlers can be created to support new media types, or to add new features to the handling of existing media.

Applications do not normally interact with media handlers directly; applications make calls to the Movie Toolbox, which calls media handlers as needed.

Selecting Media Handlers

Media handler components are responsible for interpreting and manipulating a media’s sample data. Each type of media has its own media handler, which deals with the specific characteristics of the media data. The Movie Toolbox provides a set of functions that allow you to gather information about a media handler and assign a particular media handler to a media. This section discusses those functions.

Each media handler has an associated data handler for each data reference. The data handler is responsible for fetching, storing, and caching the data that the media handler uses. The Movie Toolbox provides functions that allow you to get information about data handlers and to assign a particular data handler to a media.

Media Selection Functions

Media handler selection uses the following functions:

  • The GetMediaHandler and GetMediaHandlerDescription functions allow you to retrieve information about a media handler.

  • You can use the SetMediaHandler function to assign a media handler to a media.

  • The GetMediaDataHandler and GetMediaDataHandlerDescription functions enable you to retrieve information about a data handler. Use the SetMediaDataHandler function to assign a data handler to a media.

Media Property Functions

QuickTime provides two functions, GetMediaPropertyAtom and SetMediaPropertyAtom, for setting and retrieving the property atom container of a media handler. This allows you to get and set the properties of a track associated with the specified media handler.