Class QuicktimeTextSampleEntry

All Implemented Interfaces:
Box, SampleEntry, Container, ParsableBox

public class QuicktimeTextSampleEntry extends AbstractSampleEntry

4cc = ""text""

Entry type for timed text samples defined in the timed text specification (ISO/IEC 14496-17).
  • Field Details

  • Constructor Details

    • QuicktimeTextSampleEntry

      public QuicktimeTextSampleEntry()
  • Method Details

    • parse

      public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException
      Description copied from interface: ParsableBox
      Parses the box excluding the already parsed header (size, 4cc, [long-size], [user-type]). The remaining size of the box is the contentSize, contentSize number of bytes should be read from the box source (readableByteChannel). If you need the header buffer at a later stage you have to create a copy.
      Specified by:
      parse in interface ParsableBox
      Specified by:
      parse in class AbstractSampleEntry
      Parameters:
      dataSource - the source for this box
      header - the box' already parsed header (create copy if you need it later as it will be overwritten)
      contentSize - remaining bytes of this box
      boxParser - use it to parse sub-boxes.
      Throws:
      IOException - in case of an error during a read operation
    • setBoxes

      public void setBoxes(List<? extends Box> boxes)
      Description copied from interface: Container
      Sets all boxes and removes all previous child boxes.
      Specified by:
      setBoxes in interface Container
      Overrides:
      setBoxes in class BasicContainer
      Parameters:
      boxes - the new list of children
    • addBox

      public void addBox(Box box)
      Description copied from class: BasicContainer
      Add box to the container and sets the parent correctly. If box is null nochange will be performed and no error thrown.
      Overrides:
      addBox in class BasicContainer
      Parameters:
      box - will be added to the container
    • getBox

      public void getBox(WritableByteChannel writableByteChannel) throws IOException
      Description copied from interface: Box
      Writes the complete box - size | 4-cc | content - to the given writableByteChannel.
      Specified by:
      getBox in interface Box
      Specified by:
      getBox in class AbstractSampleEntry
      Parameters:
      writableByteChannel - the box's sink
      Throws:
      IOException - in case of problems with the Channel
    • getSize

      public long getSize()
      Specified by:
      getSize in interface Box
      Overrides:
      getSize in class AbstractContainerBox
    • getDisplayFlags

      public int getDisplayFlags()
    • setDisplayFlags

      public void setDisplayFlags(int displayFlags)
    • getTextJustification

      public int getTextJustification()
    • setTextJustification

      public void setTextJustification(int textJustification)
    • getBackgroundR

      public int getBackgroundR()
    • setBackgroundR

      public void setBackgroundR(int backgroundR)
    • getBackgroundG

      public int getBackgroundG()
    • setBackgroundG

      public void setBackgroundG(int backgroundG)
    • getBackgroundB

      public int getBackgroundB()
    • setBackgroundB

      public void setBackgroundB(int backgroundB)
    • getDefaultTextBox

      public long getDefaultTextBox()
    • setDefaultTextBox

      public void setDefaultTextBox(long defaultTextBox)
    • getReserved1

      public long getReserved1()
    • setReserved1

      public void setReserved1(long reserved1)
    • getFontNumber

      public short getFontNumber()
    • setFontNumber

      public void setFontNumber(short fontNumber)
    • getFontFace

      public short getFontFace()
    • setFontFace

      public void setFontFace(short fontFace)
    • getReserved2

      public byte getReserved2()
    • setReserved2

      public void setReserved2(byte reserved2)
    • getReserved3

      public short getReserved3()
    • setReserved3

      public void setReserved3(short reserved3)
    • getForegroundR

      public int getForegroundR()
    • setForegroundR

      public void setForegroundR(int foregroundR)
    • getForegroundG

      public int getForegroundG()
    • setForegroundG

      public void setForegroundG(int foregroundG)
    • getForegroundB

      public int getForegroundB()
    • setForegroundB

      public void setForegroundB(int foregroundB)
    • getFontName

      public String getFontName()
    • setFontName

      public void setFontName(String fontName)