FileDocCategorySizeDatePackage
SampleTableBox.javaAPI Docmp4parser 1.0-RC-174313Wed Dec 19 20:10:38 GMT 2012com.coremedia.iso.boxes

SampleTableBox

public class SampleTableBox extends com.googlecode.mp4parser.AbstractContainerBox
The sample table contains all the time and data indexing of the media samples in a track. Using the tables here, it is possible to locate samples in time, determine their type (e.g. I-frame or not), and determine their size, container, and offset into that container.
If the track that contains the Sample Table Box references no data, then the Sample Table Box does not need to contain any sub-boxes (this is not a very useful media track).
If the track that the Sample Table Box is contained in does reference data, then the following sub-boxes are required: Sample Description, Sample Size, Sample To Chunk, and Chunk Offset. Further, the Sample Description Box shall contain at least one entry. A Sample Description Box is required because it contains the data reference index field which indicates which Data Reference Box to use to retrieve the media samples. Without the Sample Description, it is not possible to determine where the media samples are stored. The Sync Sample Box is optional. If the Sync Sample Box is not present, all samples are sync samples.
Annex A provides a narrative description of random access using the structures defined in the Sample Table Box.

Fields Summary
public static final String
TYPE
Constructors Summary
public SampleTableBox()


      
        super(TYPE);
    
Methods Summary
public ChunkOffsetBoxgetChunkOffsetBox()

        for (Box box : boxes) {
            if (box instanceof ChunkOffsetBox) {
                return (ChunkOffsetBox) box;
            }
        }
        return null;
    
public CompositionTimeToSamplegetCompositionTimeToSample()

        for (Box box : boxes) {
            if (box instanceof CompositionTimeToSample) {
                return (CompositionTimeToSample) box;
            }
        }
        return null;
    
public SampleDependencyTypeBoxgetSampleDependencyTypeBox()

        for (Box box : boxes) {
            if (box instanceof SampleDependencyTypeBox) {
                return (SampleDependencyTypeBox) box;
            }
        }
        return null;
    
public SampleDescriptionBoxgetSampleDescriptionBox()

        for (Box box : boxes) {
            if (box instanceof SampleDescriptionBox) {
                return (SampleDescriptionBox) box;
            }
        }
        return null;
    
public SampleSizeBoxgetSampleSizeBox()

        for (Box box : boxes) {
            if (box instanceof SampleSizeBox) {
                return (SampleSizeBox) box;
            }
        }
        return null;
    
public SampleToChunkBoxgetSampleToChunkBox()

        for (Box box : boxes) {
            if (box instanceof SampleToChunkBox) {
                return (SampleToChunkBox) box;
            }
        }
        return null;
    
public SyncSampleBoxgetSyncSampleBox()

        for (Box box : boxes) {
            if (box instanceof SyncSampleBox) {
                return (SyncSampleBox) box;
            }
        }
        return null;
    
public TimeToSampleBoxgetTimeToSampleBox()

        for (Box box : boxes) {
            if (box instanceof TimeToSampleBox) {
                return (TimeToSampleBox) box;
            }
        }
        return null;
    
public voidsetChunkOffsetBox(ChunkOffsetBox b)

        for (int i = 0; i < boxes.size(); i++) {
            Box box = boxes.get(i);
            if (box instanceof ChunkOffsetBox) {
                boxes.set(i, b);
            }
        }