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

< Previous PageNext Page > Hide TOC

Hint Track Structure

Hint tracks are atoms of type 'trak'. A hint track atom contains a track header atom ('tkhd'), an edits atom ('edts'), a track reference atom ('tref'), a media atom ('mdia'), and usually a track user data atom ('udta'). The atoms are normally present in the order described, but this is not a requirement. Most of these atoms have child atoms. An expanded diagram of a typical hint track atom is shown in Figure 2-4.


Figure 2-4  A typical hint track atom

Figure 2-4 A typical hint track atom

A detailed description of each atom’s contents follows. This document focuses on atom contents that are specific to hint tracks. Refer to the QuickTime File Format documentation for generic information about the structure and contents of the atom types found in track atoms.

Note:  The actual hint samples are not part of the hint track atom structure. The hint track atom structure contains the information you need to locate and interpret the samples. A description of hint samples follows the description of the hint track’s atoms.

In this section:

Track Header Atom
Edits Atom
Track Reference Atom


Track Header Atom

The flags field of the track header atom must be 0x000000, indicating the track is inactive, and not part of the movie, preview, or poster. Hint tracks must be marked as inactive for the movie to play locally.

The creation time, modification time, and track ID fields are set as they would be for any track.

The duration field is also the duration of the media track being hinted, expressed in movie time scale.

The layer field is not used.

The alternate group field can be used to distinguish alternate language or alternate data rate tracks in streaming movies. It is not required that all servers support this feature. It is not recommended that applications attempt to make use of this feature at this time. This field is normally set to 1.

The remaining track header fields are not used for hint tracks.

Unused fields should be set to 0 when creating hint tracks and ignored when using them.

Edits Atom

The edits atom contains an edits list atom ('elst'). Edit lists can be used for hint tracks as they can for any other track type.

The fields of the edits list atom ('elst') are used as follows:

The flags field is not used, and should be set to 0.

The numEntries field is the number of list entries. Unless the hint track has been edited, it will have either 1 or 2 entries.

Each list entry consists of a duration, a media time, and a rate.

If the track should begin playing after the movie begins, there is an “empty edit” whose duration is the amount of time that passes until the track begins playing, whose media time is -1, and whose media rate is 1. No data should be sent for this track until the number of movie time units specified by the duration field has passed.

Whether or not there is an empty edit, there will typically be one entry whose duration is the media duration in movie timescale units, whose media time is 0, and whose rate is 1.

Track Reference Atom

Each hint track refers to a media track. The hint track contains a track reference atom ('tref') that contains exactly one child atom of type 'hint'. This child atom holds the track ID of the media track. The whole track reference atom has this structure:

Atom Type

Field

Bytes

Description

Track Reference

Contains a 'hint' atom

  

Size

4

Size of track reference atom (including 'hint' atom); 32-bit integer.

  

Type

4

'tref'

Track Hint

Contains the track ID of the media track being hinted

  

Size

4

Size of this child atom; 32-bit integer.

  

Type

4

'hint'

  

TrackID

4

Track ID of the media track being hinted; 32-bit integer.

The Track ID field of the 'hint' atom contains the track ID of the media track being hinted. The target track ID can be found in the media track’s track header atom ('tkhd'). All media sample data should be taken from the specified media track.

There could theoretically be a list of track IDs for a hint track that hinted multiple media tracks, but the current hinter only references one media track per hint track.



< Previous PageNext Page > Hide TOC


Last updated: 2006-01-10




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