FileDocCategorySizeDatePackage
QuicktimeTextSampleEntry.javaAPI Docmp4parser 1.0-RC-176202Wed Dec 19 20:10:37 GMT 2012com.googlecode.mp4parser.boxes.apple

QuicktimeTextSampleEntry

public class QuicktimeTextSampleEntry extends com.coremedia.iso.boxes.sampleentry.SampleEntry
Entry type for timed text samples defined in the timed text specification (ISO/IEC 14496-17).

Fields Summary
public static final String
TYPE
int
displayFlags
int
textJustification
int
backgroundR
int
backgroundG
int
backgroundB
long
defaultTextBox
long
reserved1
short
fontNumber
short
fontFace
byte
reserved2
short
reserved3
int
foregroundR
int
foregroundG
int
foregroundB
String
fontName
Constructors Summary
public QuicktimeTextSampleEntry()


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

        _parseReservedAndDataReferenceIndex(content);

        displayFlags = content.getInt();
        textJustification = content.getInt();
        backgroundR = IsoTypeReader.readUInt16(content);
        backgroundG = IsoTypeReader.readUInt16(content);
        backgroundB = IsoTypeReader.readUInt16(content);
        defaultTextBox = IsoTypeReader.readUInt64(content);
        reserved1 = IsoTypeReader.readUInt64(content);
        fontNumber = content.getShort();
        fontFace = content.getShort();
        reserved2 = content.get();
        reserved3 = content.getShort();
        foregroundR = IsoTypeReader.readUInt16(content);
        foregroundG = IsoTypeReader.readUInt16(content);
        foregroundB = IsoTypeReader.readUInt16(content);

        if (content.remaining() > 0) {
            int length = IsoTypeReader.readUInt8(content);
            byte[] myFontName = new byte[length];
            content.get(myFontName);
            fontName = new String(myFontName);
        } else {
            fontName = null;
        }
    
public intgetBackgroundB()

        return backgroundB;
    
public intgetBackgroundG()

        return backgroundG;
    
public intgetBackgroundR()

        return backgroundR;
    
protected voidgetContent(java.nio.ByteBuffer byteBuffer)

        _writeReservedAndDataReferenceIndex(byteBuffer);
        byteBuffer.putInt(displayFlags);
        byteBuffer.putInt(textJustification);
        IsoTypeWriter.writeUInt16(byteBuffer, backgroundR);
        IsoTypeWriter.writeUInt16(byteBuffer, backgroundG);
        IsoTypeWriter.writeUInt16(byteBuffer, backgroundB);
        IsoTypeWriter.writeUInt64(byteBuffer, defaultTextBox);
        IsoTypeWriter.writeUInt64(byteBuffer, reserved1);
        byteBuffer.putShort(fontNumber);
        byteBuffer.putShort(fontFace);
        byteBuffer.put(reserved2);
        byteBuffer.putShort(reserved3);

        IsoTypeWriter.writeUInt16(byteBuffer, foregroundR);
        IsoTypeWriter.writeUInt16(byteBuffer, foregroundG);
        IsoTypeWriter.writeUInt16(byteBuffer, foregroundB);
        if (fontName != null) {
            IsoTypeWriter.writeUInt8(byteBuffer, fontName.length());
            byteBuffer.put(fontName.getBytes());
        }

    
protected longgetContentSize()

        return 52 + (fontName != null ? fontName.length() : 0);
    
public longgetDefaultTextBox()

        return defaultTextBox;
    
public intgetDisplayFlags()

        return displayFlags;
    
public shortgetFontFace()

        return fontFace;
    
public java.lang.StringgetFontName()

        return fontName;
    
public shortgetFontNumber()

        return fontNumber;
    
public intgetForegroundB()

        return foregroundB;
    
public intgetForegroundG()

        return foregroundG;
    
public intgetForegroundR()

        return foregroundR;
    
public longgetReserved1()

        return reserved1;
    
public bytegetReserved2()

        return reserved2;
    
public shortgetReserved3()

        return reserved3;
    
public intgetTextJustification()

        return textJustification;
    
public voidsetBackgroundB(int backgroundB)

        this.backgroundB = backgroundB;
    
public voidsetBackgroundG(int backgroundG)

        this.backgroundG = backgroundG;
    
public voidsetBackgroundR(int backgroundR)

        this.backgroundR = backgroundR;
    
public voidsetDefaultTextBox(long defaultTextBox)

        this.defaultTextBox = defaultTextBox;
    
public voidsetDisplayFlags(int displayFlags)

        this.displayFlags = displayFlags;
    
public voidsetFontFace(short fontFace)

        this.fontFace = fontFace;
    
public voidsetFontName(java.lang.String fontName)

        this.fontName = fontName;
    
public voidsetFontNumber(short fontNumber)

        this.fontNumber = fontNumber;
    
public voidsetForegroundB(int foregroundB)

        this.foregroundB = foregroundB;
    
public voidsetForegroundG(int foregroundG)

        this.foregroundG = foregroundG;
    
public voidsetForegroundR(int foregroundR)

        this.foregroundR = foregroundR;
    
public voidsetReserved1(long reserved1)

        this.reserved1 = reserved1;
    
public voidsetReserved2(byte reserved2)

        this.reserved2 = reserved2;
    
public voidsetReserved3(short reserved3)

        this.reserved3 = reserved3;
    
public voidsetTextJustification(int textJustification)

        this.textJustification = textJustification;