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

SampleDescriptionBox

public class SampleDescriptionBox extends com.googlecode.mp4parser.FullContainerBox
The sample description table gives detailed information about the coding type used, and any initialization information needed for that coding.
The information stored in the sample description box after the entry-count is both track-type specific as documented here, and can also have variants within a track type (e.g. different codings may use different specific information after some common fields, even within a video track).
For video tracks, a VisualSampleEntry is used; for audio tracks, an AudioSampleEntry. Hint tracks use an entry format specific to their protocol, with an appropriate name. Timed Text tracks use a TextSampleEntry For hint tracks, the sample description contains appropriate declarative data for the streaming protocol being used, and the format of the hint track. The definition of the sample description is specific to the protocol. Multiple descriptions may be used within a track.
The 'protocol' and 'codingname' fields are registered identifiers that uniquely identify the streaming protocol or compression format decoder to be used. A given protocol or codingname may have optional or required extensions to the sample description (e.g. codec initialization parameters). All such extensions shall be within boxes; these boxes occur after the required fields. Unrecognized boxes shall be ignored.
Defined in ISO/IEC 14496-12
see
com.coremedia.iso.boxes.sampleentry.VisualSampleEntry
see
com.coremedia.iso.boxes.sampleentry.TextSampleEntry
see
com.coremedia.iso.boxes.sampleentry.AudioSampleEntry

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


      
        super(TYPE);
    
Methods Summary
public void_parseDetails(java.nio.ByteBuffer content)

        parseVersionAndFlags(content);
        content.get(new byte[4]);
        parseChildBoxes(content);
    
protected voidgetContent(java.nio.ByteBuffer byteBuffer)

        writeVersionAndFlags(byteBuffer);
        IsoTypeWriter.writeUInt32(byteBuffer, boxes.size());
        writeChildBoxes(byteBuffer);
    
protected longgetContentSize()

        return super.getContentSize() + 4;
    
public com.coremedia.iso.boxes.sampleentry.SampleEntrygetSampleEntry()

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