Technical: QuickTime
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

title


Previous Section Table of Contents Next Section


QuickTime Atom Containers

Contents

QT Atom Hierarchies

Reference

QuickTime stores most of its data using a special memory structure called atoms. You can think of atoms as the basic data containers inside QuickTime. Movies and their tracks are organized as atoms.

A newly created atom is like the root of a tree structure. Each subsequent atom is contained within it and can either contain some data or another atom. If an atom contains other atoms it is referred to as a parent atom, and the atoms it contains are referred to as child atoms. If an atom contains only data instead of another atom, it is called a leaf atom.

For cross-platform purposes, all data in a QT atom is expected to be in big-endian (Macintosh) format.

 

You use QuickTime calls to create and manipulate QT atoms. Each atom has a type code that determines the kind of data stored in it. By storing data this way, the number of data structures and complexity you need to deal with is greatly minimized. Because the data is typed, you can ignore data that's not of interest when interpreting atom data.

QT Atom Hierarchies

QT atoms can nest indefinitely forming hierarchies that are easy to pass from one process to another.

You can search and manipulate QT atoms, as well as search through QT atom hierarchies until you get to the leaf atoms, then read the leaf atom's data from its various fields.

The diagram below shows a QT atom container that has two child atoms. The first child atom (offset = 10) is a leaf atom that has an atom type of 'abcd' , an ID of 1000, and an index of 1. The second child atom (offset = 20) has an atom type of 'abcd' , an ID of 900, and an index of 2. Because the two child atoms have the same type, they must have different IDs. The second child atom is also a parent atom of three atoms.

The first child atom (offset = 30) has an atom type of 'abcd' , an ID of 100, and an index of 1. It does not have any children, nor does it have data. The second child atom (offset = 40) has an atom type of 'word' , an ID of 100, and an index of 1. The atom has data, so it is a leaf atom. The second atom (offset = 40) has the same ID as the first atom (offset = 30), but a different atom type. The third child atom (offset = 50) has an atom type of 'abcd' , an ID of 1000, and an index of 2. Its atom type and ID are the same as that of another atom (offset = 20) with a different parent.

References

QuickTime Atoms

Movie Toolbox:Data Types

QTAtomContainer-Based Data Structure Descriptions

 



Previous Section Table of Contents Next Section