Documentation Archive Developer
Search

ADC Home > Reference Library > Technical Q&As > QuickTime > Movie Basics >

QuickTime and Carbon Events


Q: What is the recommended technique for ensuring smooth QuickTime movie playback when using Carbon events? Under the old Classic Event Manager, one would simply call the MoviesTask function in the main event loop. With Carbon events, should an event timer be used? If so, are there any guidelines regarding the optimal frequency for such a timer?

A: The recommended technique for giving time to the Movie Toolbox to ensure smooth movie playback is to install an event loop timer (see the Carbon Event Manager documentation) and idle your movie/controller from such a timer.

Unfortunately, there's really no good way to determine the optimal event timer frequency (in fact, even QuickTime does not currently have a good technique for obtaining this information). As such, we suggest you use an interval of 1/10 of a second when you have a movie open - otherwise 0.

Some movies (although less and less of these nowadays) have a requirement for idle time. The QuickTime Player will idle movies 10 times per second if they are open, and 0 if there are no movies open. Note you must even idle movies that are "stopped" if you want sprite rollovers, QTVR movies, etc. to work properly.


[Oct 26 2001]