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

< Previous PageNext Page > Hide TOC

QuickTime Atoms and Atom Containers

QuickTime stores most of its data using specialized structures in memory, called atoms. Movies themselves are atoms, as are tracks, media, and data samples. There are two kinds of atoms: chunk atoms, which your code accesses by offsets, and QT atoms, for which QuickTime provides a full set of access tools.

Each atom carries its own size and type information as well as its data. A container atom is an atom that contains other atoms, including other container atoms. There are several advantages to using QT atoms for holding and passing information:

Each atom has a four-character type designation that describes its internal structure. For example, movie atoms are type 'moov', while the track atoms inside them are type 'trak'.

Atoms that contain only data, and not other atoms, are called leaf atoms. A leaf atom simply contains a series of data fields accessible by offsets. You can use QuickTime’s atom tools to search through QT atom hierarchies until you get to leaf atoms, then read the leaf atom’s data from its various fields. With chunk atoms, you read their size bytes and access their contents by calculating offsets. For more information about atoms and atom containers, see the book QuickTime File Format. Atoms are also discussed in the QuickTime API Reference.

“Figure 8-1” shows an example of the atom structure of a simple QuickTime movie that has one track containing video data. Both the atoms in “Figure 8-1” are chunk atoms, so you create and read them through your own code.


Figure 8-1  Atom structure of a simple QuickTime movie

Atom structure of a simple QuickTime movie

Contents:

QT Atom Containers
Creating, Copying, and Disposing of Atom Containers
Creating New Atoms
Copying Existing Atoms
Retrieving Atoms From an Atom Container
Modifying Atoms
Removing Atoms From an Atom Container




< Previous PageNext Page > Hide TOC


Last updated: 2002-10-01




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