//--8.6.1.2 Decoding Time to Sample Box--//
//8.6.1.2.1 Definition
Box Type: ‘stts’
Container: Sample Table Box (‘stbl’)
Mandatory: Yes
Quantity: Exactly one
This box contains a compact version of a table that allows indexing from decoding time to sample number.
Other tables give sample sizes and pointers, from the sample number. Each entry in the table gives the number of consecutive samples with the same time delta, and the delta of those samples. By adding the deltas a complete time-to-sample map may be built.
The Decoding Time to Sample Box contains decode time delta’s: DT(n+1) = DT(n) + STTS(n) where STTS(n) is the (uncompressed) table entry for sample n.
The sample entries are ordered by decoding time stamps; therefore the deltas are all non-negative.
The DT axis has a zero origin; DT(i) = SUM(for j=0 to i-1 of delta(j)), and the sum of all deltas gives the length of the media in the track (not mapped to the overall timescale, and not considering any edit list).
The Edit List Box provides the initial CT value if it is non-empty (non-zero).
aligned(8) class TimeToSampleBox
extends FullBox(’stts’, version = 0, 0) {
unsigned int(32) entry_count;
int i;
for (i=0; i < entry_count; i++) {
unsigned int(32) sample_count;
unsigned int(32) sample_delta;
}
}
//——8.1.1 Media Data Box —//
Box Type:‘mdat’
Container:File
Mandatory:No
Quantity:Zero or more
This box contains the media data. In video tracks, this box would contain video frames. A presentation may contain zero or more Media Data Boxes. The actual media data follows the type field; its structure is described by the metadata (see particularly the sample table, subclause 8.5, and the item location box, subclause 8.11.3).
In large presentations, it may be desirable to have more data in this box than a 32-bit size would permit. In this case, the large variant of the size field, above in subclause 4.2, is used.
There may be any number of these boxes in the file (including zero, if all the media data is in other files). The metadata refers to media data by its absolute offset within the file (see subclause 8.7.5, the Chunk Offset Box); so Media Data Box headers and free space may easily be skipped, and files without any box structure
may also be referenced and used.
aligned(8) class MediaDataBox extends Box(‘mdat’) {
bit(8) data[];
}
332

被折叠的 条评论
为什么被折叠?



