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

< Previous PageNext Page > Hide TOC

Referencing Two Data Files With a Single Track

The data reference index to be used for a given media sample is stored within that sample’s sample description. Therefore, a track must contain multiple sample descriptions in order for that track to reference multiple data files. A different sample description must be used whenever the data file changes or whenever the format of the data changes. The sample-to-chunk atom determines which sample description to use for a sample.

The sample description atom would contain the following data values:

Atom size

Atom type

'stsd'

Version/Flags

0

Number of entries

2

Sample description size[1]

Data format

'tmcd'

Reserved

0

Data reference index

1

(sample data)

Sample description size[1]

Data format

'tmcd'

Reserved

0

Data reference index

2

(sample data)

If there is only 1 sample per chunk and the first 10 samples are extracted from sample description 2 and the next 30 samples are extracted from sample description 1, the sample-to-chunk atom would contain the following data values:

Atom size

40

Atom type

'stsc'

Version/Flags

0

Number of entries

2

First chunk[1]

1

Samples per chunk[1]

1

Sample description ID[1]

2

First chunk[2]

11

Samples per chunk[2]

1

Sample description ID[2]

1

The data reference atom would contain the following data values:

Atom size

Atom type

'dinf'

Atom size

Atom type

'dref'

Version/Flags

0

Number of entries

2

Size[1]

Type[1]

'alis'

Version[1]

0

Flags[1]

0 (not self referenced)

Data reference[1]

[alias pointing to file #1]

Size[2]

Type[2]

'rsrc'

Version[2]

0

Flags[2]

0 (not self referenced)

Data reference[2]

[alias pointing to file #2]



< Previous PageNext Page > Hide TOC


Last updated: 2007-09-04




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