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

< Previous PageNext Page > Hide TOC

Monitoring the Load State

Calling any NewMovieFrom... function initiates a series of events that you can monitor by making calls to GetMovieLoadState. The initial load state is always kMovieLoadStateLoading, at least briefly. Eventually the load state changes to either kMovieLoadStateComplete or kMovieLoadStateError. There are often additional intermediate load states.

All NewMovieFrom... functions support asynchronous movie loading. This is controlled by passing a flag when calling the function. When asynchronous loading is enabled, the NewMovieFrom... function returns almost immediately, so that your application is not blocked while QuickTime locates the movie data source, resolves its media sample data references, downloads any necessary files, or performs any necessary import. You need to monitor the progress of the movie loading process by checking the load state periodically by calling GetMovieLoadState.

All NewMovieFrom... functions, including NewMovieFromProperties, load asynchronously only if the newMovieAsyncOK flag is passed (when calling NewMovieFromProperties, this flag is passed in the NewMovieProperties property).

If asynchronous loading is not used, any NewMovieFrom... function blocks until the movie finds and loads all referenced data or the process fails, and the load state resolves to either kMovieLoadStateComplete or kMovieLoadStateError.

The possible load states during asynchronous movie loading are these:

Contents:

The Download Sequence
Example of Getting a Movie and Monitoring the Load State




< 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