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

AmrSpecificBox

public class AmrSpecificBox extends com.googlecode.mp4parser.AbstractBox
AMR audio format specific subbox of an audio sample entry.
see
com.coremedia.iso.boxes.sampleentry.AudioSampleEntry

Fields Summary
public static final String
TYPE
private String
vendor
private int
decoderVersion
private int
modeSet
private int
modeChangePeriod
private int
framesPerSample
Constructors Summary
public AmrSpecificBox()


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

        byte[] v = new byte[4];
        content.get(v);
        vendor = IsoFile.bytesToFourCC(v);

        decoderVersion = IsoTypeReader.readUInt8(content);
        modeSet = IsoTypeReader.readUInt16(content);
        modeChangePeriod = IsoTypeReader.readUInt8(content);
        framesPerSample = IsoTypeReader.readUInt8(content);

    
public voidgetContent(java.nio.ByteBuffer byteBuffer)

        byteBuffer.put(IsoFile.fourCCtoBytes(vendor));
        IsoTypeWriter.writeUInt8(byteBuffer, decoderVersion);
        IsoTypeWriter.writeUInt16(byteBuffer, modeSet);
        IsoTypeWriter.writeUInt8(byteBuffer, modeChangePeriod);
        IsoTypeWriter.writeUInt8(byteBuffer, framesPerSample);
    
protected longgetContentSize()

        return 9;
    
public intgetDecoderVersion()

        return decoderVersion;
    
public intgetFramesPerSample()

        return framesPerSample;
    
public intgetModeChangePeriod()

        return modeChangePeriod;
    
public intgetModeSet()

        return modeSet;
    
public java.lang.StringgetVendor()

        return vendor;
    
public java.lang.StringtoString()

        StringBuilder buffer = new StringBuilder();
        buffer.append("AmrSpecificBox[vendor=").append(getVendor());
        buffer.append(";decoderVersion=").append(getDecoderVersion());
        buffer.append(";modeSet=").append(getModeSet());
        buffer.append(";modeChangePeriod=").append(getModeChangePeriod());
        buffer.append(";framesPerSample=").append(getFramesPerSample());
        buffer.append("]");
        return buffer.toString();