Class MovieHeaderBox

All Implemented Interfaces:
Box, FullBox, ParsableBox

public class MovieHeaderBox extends AbstractFullBox

4cc = ""mvhd""

Box Type: 'mvhd'
Container: MovieBox ('moov')
Mandatory: Yes
Quantity: Exactly one

This box defines overall information which is media-independent, and relevant to the entire presentation considered as a whole.
  • Field Details

  • Constructor Details

    • MovieHeaderBox

      public MovieHeaderBox()
  • Method Details

    • getCreationTime

      public Date getCreationTime()
    • setCreationTime

      public void setCreationTime(Date creationTime)
    • getModificationTime

      public Date getModificationTime()
    • setModificationTime

      public void setModificationTime(Date modificationTime)
    • getTimescale

      public long getTimescale()
    • setTimescale

      public void setTimescale(long timescale)
    • getDuration

      public long getDuration()
    • setDuration

      public void setDuration(long duration)
    • getRate

      public double getRate()
    • setRate

      public void setRate(double rate)
    • getVolume

      public float getVolume()
    • setVolume

      public void setVolume(float volume)
    • getMatrix

      public Matrix getMatrix()
    • setMatrix

      public void setMatrix(Matrix matrix)
    • getNextTrackId

      public long getNextTrackId()
    • setNextTrackId

      public void setNextTrackId(long nextTrackId)
    • 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:
    • _parseDetails

      public 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.
    • toString

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

      protected void getContent(ByteBuffer byteBuffer)
      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:
      byteBuffer - the sink for the box's content
    • getPreviewTime

      public int getPreviewTime()
    • setPreviewTime

      public void setPreviewTime(int previewTime)
    • getPreviewDuration

      public int getPreviewDuration()
    • setPreviewDuration

      public void setPreviewDuration(int previewDuration)
    • getPosterTime

      public int getPosterTime()
    • setPosterTime

      public void setPosterTime(int posterTime)
    • getSelectionTime

      public int getSelectionTime()
    • setSelectionTime

      public void setSelectionTime(int selectionTime)
    • getSelectionDuration

      public int getSelectionDuration()
    • setSelectionDuration

      public void setSelectionDuration(int selectionDuration)
    • getCurrentTime

      public int getCurrentTime()
    • setCurrentTime

      public void setCurrentTime(int currentTime)