ADC Home > Reference Library > Technical Q&As > QuickTime > Design Guidelines >
|
Q I need some advice about setting up movie atoms.
Certain values (e.g., samplesPerChunk) are variable, but I have found that extreme cases
don't work. For example, I want to make a movie all in one chunk, since this results in a
simple movie-atom structure. However, when I made a movie with an audio track that had only
one 4MB chunk, the playback failed without any error message (ifMovie Player 2.0 had less
memory than that assigned to the application).
Why do movies created by most applications have a lot of chunks, even when the data is contiguous from chunk to chunk, and the chunks are all the same size? A The chunk architecture was designed for faster playback of movie material, based on the classical computer science notion that grouping material for faster caching makes the application faster overall. We use a parameter to define the default chunk sizes, based on our current strategy for playback optimization.Creating one huge chunk causes the system to read the whole chunk at once, and in your extreme case, you are truly running out of memory. The Mac operates with a very static memory model (unless VM is enabled, which we don't recommend, because page hits slow down any system that is trying to play back sound and video samples). Our concept is that the Movie Toolbox will do the right thing concerning chunking of samples, so we don't have APIs for this purpose. We recommend that you avoid changing the default values with Dumpster and similar tools. QuickTime 2.0 introduced the SetMediaPreferredChunkSize and GetMediaPreferredChunkSize calls for specifying the maximum chunk size for a media and for retrieving the current maximum value. Anything beyond this is outside the control of the developer. [Aug 01 1995] |
|