Class TimeCodeBox

java.lang.Object
org.mp4parser.support.AbstractBox
org.mp4parser.boxes.apple.TimeCodeBox
All Implemented Interfaces:
Box, SampleEntry, Container, ParsableBox

public class TimeCodeBox extends AbstractBox implements SampleEntry, Container

4cc = ""tmcd""

  • Field Details

  • Constructor Details

    • TimeCodeBox

      public TimeCodeBox()
  • Method Details

    • getContentSize

      protected long getContentSize()
      Description copied from class: AbstractBox
      Get the box's content size without its header. This must be the exact number of bytes that getContent(ByteBuffer) writes.
      Specified by:
      getContentSize in class AbstractBox
      Returns:
      Gets the box's content size in bytes
      See Also:
    • getContent

      protected void getContent(ByteBuffer bb)
      Description copied from class: AbstractBox
      Write the box's content into the given ByteBuffer. This must include flags and version in case of a full box. byteBuffer has been initialized with getSize() bytes.
      Specified by:
      getContent in class AbstractBox
      Parameters:
      bb - the sink for the box's content
    • _parseDetails

      protected void _parseDetails(ByteBuffer content)
      Description copied from class: AbstractBox
      Parse the box's fields and child boxes if any.
      Specified by:
      _parseDetails in class AbstractBox
      Parameters:
      content - the box's raw content beginning after the 4-cc field.
    • getDataReferenceIndex

      public int getDataReferenceIndex()
      Specified by:
      getDataReferenceIndex in interface SampleEntry
    • setDataReferenceIndex

      public void setDataReferenceIndex(int dataReferenceIndex)
      Specified by:
      setDataReferenceIndex in interface SampleEntry
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getTimeScale

      public int getTimeScale()
    • setTimeScale

      public void setTimeScale(int timeScale)
    • getFrameDuration

      public int getFrameDuration()
    • setFrameDuration

      public void setFrameDuration(int frameDuration)
    • getNumberOfFrames

      public int getNumberOfFrames()
    • setNumberOfFrames

      public void setNumberOfFrames(int numberOfFrames)
    • getReserved1

      public int getReserved1()
    • setReserved1

      public void setReserved1(int reserved1)
    • getReserved2

      public int getReserved2()
    • setReserved2

      public void setReserved2(int reserved2)
    • getFlags

      public long getFlags()
    • setFlags

      public void setFlags(long flags)
    • getRest

      public byte[] getRest()
    • setRest

      public void setRest(byte[] rest)
    • getBoxes

      public List<Box> getBoxes()
      Description copied from interface: Container
      Gets all child boxes. May not return null.
      Specified by:
      getBoxes in interface Container
      Returns:
      an array of boxes, empty array in case of no children.
    • 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
      Parameters:
      boxes - the new list of children
    • getBoxes

      public <T extends Box> List<T> getBoxes(Class<T> clazz)
      Description copied from interface: Container
      Gets all child boxes of the given type. May not return null.
      Specified by:
      getBoxes in interface Container
      Type Parameters:
      T - type of boxes to get
      Parameters:
      clazz - child box's type
      Returns:
      an array of boxes, empty array in case of no children.
    • getBoxes

      public <T extends Box> List<T> getBoxes(Class<T> clazz, boolean recursive)
      Description copied from interface: Container
      Gets all child boxes of the given type. May not return null.
      Specified by:
      getBoxes in interface Container
      Type Parameters:
      T - type of boxes to get
      Parameters:
      clazz - child box's type
      recursive - step down the tree
      Returns:
      an array of boxes, empty array in case of no children.
    • writeContainer

      public void writeContainer(WritableByteChannel bb) throws IOException
      Specified by:
      writeContainer in interface Container
      Throws:
      IOException