Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Changing a Movie’s Graphics Destination

To change an existing movie’s graphics destination to a new visual context, call SetMovieVisualContext.

To change an existing movie’s graphics destination to a new GWorld, call SetMovieGWorld. If the movie is currently using a visual context, free the context by calling SetMovieVisualContext, passing in NULL instead of a VisualContextRef, before setting the GWorld.

To disable visual rendering, call SetMovieVisualContext, passing in NULL instead of a VisualContextRef.

To get a movie’s current graphics destination, call GetMovieVisualContext. If the movie’s destination is a GWorld instead of a visual context, this function returns an error (kQTVisualContextRequiredErr); you can then call GetMovieGworld to obtain the GWorld.

GetMovieGWorld does not return an error for movies that use a visual context instead of a GWorld. It gives a special GWorld value that represents the visual context. This provides backward compatibility with existing code that gets a movie GWorld and later restores it.

Note: It is common practice to get a movie’s current graphics destination, set the movie’s graphics destination temporarily, then restore the original graphics destination. Prior to QuickTime 7, this was done by calling GetMovieGWorld to get a pointer to the current destination, then calling SetMovieGWorld to restore it. Existing code that uses these functions also works with movies that use a visual context.



< Previous PageNext Page > Hide TOC


Last updated: 2005-08-11




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice