MediaSetDimensions
TheMediaSetDimensionsfunction allows the Movie Toolbox to inform your media handler when its media's spatial dimensions change.
pascal ComponentResult MediaSetDimensions (ComponentInstance ci, Fixed width, Fixed height);
ci- Identifies the Movie Toolbox's connection to your derived media handler.
width- Indicates the width, in pixels, of the track rectangle. This field, along with the
heightfield, specifies a rectangle that surrounds the image that is displayed when the current media is played. This value corresponds to the x coordinate of the lower-right corner of the rectangle and is expressed as a fixed-point number.height- Indicates the height, in pixels, of the track rectangle. This value corresponds to the y coordinate of the lower-right corner of the rectangle and is expressed as a fixed-point number.
DESCRIPTION
The Movie Toolbox calls your derived media handler'sMediaSetDimensionsfunction whenever the spatial dimensions of your media's track change. The toolbox provides you with the dimensions of the rectangle that encloses your media's graphical image. Changes to this rectangle may affect the way in which you display your media's data.You obtain the initial dimension information from the
widthandheightfields of the movie parameter structure that the Movie Toolbox provides to yourMediaInitializefunction (described on page 10-17).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).RESULT CODES
Any Component Manager result codeSEE ALSO
The Movie Toolbox uses theMediaSetMatrixfunction (described in the next section) to tell your media handler about changes to either the movie matrix or the track matrix. In addition, your media handler'sMediaSetClipfunction allows you to learn about changes to your media's clipping region. This function is discussed on page 10-32.