MediaSetMatrix
TheMediaSetMatrixfunction allows the Movie Toolbox to tell your media handler about changes to either the movie matrix or the track matrix.
pascal ComponentResult MediaSetMatrix (ComponentInstance ci, const MatrixRecord *trackMovieMatrix);
ci- Identifies the Movie Toolbox's connection to your derived media handler.
trackMovieMatrix
Contains a pointer to the matrix that transforms your media's pixels into the movie's coordinate system. The Movie Toolbox obtains this matrix by concatenating the track matrix and the movie matrix. You should use this matrix whenever you are displaying graphical data from your media.DESCRIPTION
The Movie Toolbox calls your derived media handler'sMediaSetMatrixfunction whenever either the movie matrix or track matrix changes. The toolbox provides you with a matrix that concatenates the transformations defined by both the movie and track matrices. You can use this matrix to map your media's display representation into the movie's coordinate system. For example, by applying this matrix to the track rectangle, you can determine the display boundaries of your media (the track rectangle is defined by thewidthandheightfields in the movie parameter structure that you obtain when the toolbox calls yourMediaInitializefunction).You obtain the initial matrix from the
trackMovieMatrixfield of the movie parameter structure that the Movie Toolbox provides to yourMediaInitializefunction.Your derived media handler should support this function if you draw during playback.
The Movie Toolbox calls this function only if you have set the
handlerHasSpatialflag to 1 in theflagsparameter of theMediaSetHandlerCapabilitiesfunction (described on page 10-36).SPECIAL CONSIDERATIONS
Before you try to use this matrix, you should make sure that your media handler can accommodate its transformations. You can use the Movie Toolbox'sGetMatrixTypefunction to learn about the matrix. If the matrix includes transformations that are beyond the capabilities of your media handler, you can direct the base media handler to do display processing on your behalf. Call theMediaSetHandlerCapabilitiesfunction and set thehandlerNeedsBufferflag to 1 in theflagsparameter. This forces the base media handler to draw your media into an offscreen buffer.RESULT CODES
Any Component Manager result codeSEE ALSO
The Movie Toolbox uses theMediaSetDimensionsfunction to tell your media handler about changes to the rectangle that surrounds the graphical representation of your media; this function is described in the previous section. In addition, your media handler'sMediaSetClipfunction allows you to learn about changes to your media's clipping region. This function is discussed next.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help