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

< Previous PageNext Page > Hide TOC

Replacing NewMovieFrom... Functions

QuickTime 7 introduces a replacement––NewMovieFromProperties–– for NewMovie, NewMovieFromDataRef, and all other NewMovieFrom... functions.

In previous versions of QuickTime, you could use other functions that create new movies, including NewMovieFromFile and NewMovieFromDataRef. These functions accept flags that allow you to set some movie characteristics at creation time, but other movie characteristics are always set by default. For example, there must be a valid graphics port associated with a movie created by these functions, even if the movie does not output video.

NewMovieFromProperties allows you to configure an extensible set of properties before creating a movie. This has a number of advantages.

Using NewMovieFromProperties

To instantiate a movie using NewMovieFromProperties, follow these steps:

  1. Pass in a CFString file path, a URL, or set up a data reference, just as you would for NewMovieFromDataRef or one of the other NewMovieFrom_ functions.

  2. Next, set up a visual context for the movie to use by calling a function that creates a context of a the desired type, such as QTOpenGLTextureContextCreate. Similarly, you can set up an audio context if you want a device other than the default device.

  3. Call NewMovieFromProperties, passing in the data reference for the movie and the QTVisualContextRef for the visual context, plus any appropriate properties listed in the QTNewMoviePropertyArray.

Properties are passed in using a QTNewMoviePropertyElement struct, which specifies the property class and property ID of each property.

The movie will automatically retain the visual context, so if your application does not need to work with the context directly, you may release it now.

For additional details, see:



< Previous PageNext Page > Hide TOC


Last updated: 2005-04-29




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