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

TrackBox

public class TrackBox extends com.googlecode.mp4parser.AbstractContainerBox
Tracks are used for two purposes: (a) to contain media data (media tracks) and (b) to contain packetization information for streaming protocols (hint tracks).
There shall be at least one media track within an ISO file, and all the media tracks that contributed to the hint tracks shall remain in the file, even if the media data within them is not referenced by the hint tracks; after deleting all hint tracks, the entire un-hinted presentation shall remain.

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


      
        super(TYPE);
    
Methods Summary
public MediaBoxgetMediaBox()

        for (Box box : boxes) {
            if (box instanceof MediaBox) {
                return (MediaBox) box;
            }
        }
        return null;
    
public SampleTableBoxgetSampleTableBox()
Gets the SampleTableBox at mdia/minf/stbl if existing.

return
the SampleTableBox or null

        MediaBox mdia = getMediaBox();
        if (mdia != null) {
            MediaInformationBox minf = mdia.getMediaInformationBox();
            if (minf != null) {
                return minf.getSampleTableBox();
            }
        }
        return null;

    
public TrackHeaderBoxgetTrackHeaderBox()

        for (Box box : boxes) {
            if (box instanceof TrackHeaderBox) {
                return (TrackHeaderBox) box;
            }
        }
        return null;