SetMediaHandler
The SetMediaHandler function allows you to assign a specific media handler to a track. The Movie Toolbox closes the track's previous media handler and then opens the new one. It is your responsibility to ensure that the media handler you specify can handle the data in the track.
pascal OSErr SetMediaHandler (Media theMedia,
MediaHandlerComponent mH);
theMedia
- Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as
NewMovieTrack and GetMovieTrack (described on page 2-136 and page 2-188, respectively).
mH
- Contains a reference to a media handler component. You obtain this reference from the
GetMediaHandler function, which is described in the previous section.
- Note
- Your application should not need to call the
SetMediaHandler function. The Movie Toolbox assigns a media handler to each track when you load a movie.
ERROR CODES
| invalidHandler | -2013 | This handler is invalid |