Interface Track

All Known Implementing Classes:
ImageSequenceTrack

public interface Track
A Track refers to media data that can be interpreted in a time coordinate system.
Author:
Werner Randelshofer
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the format of the track.
    long
    Gets the read position.
    long
    Returns the numbers of samples in this track.
    void
    read(Buffer buf)
    Reads a sample from the input stream.
    void
    setPosition(long pos)
    Sets the read position.
  • Method Details

    • getSampleCount

      long getSampleCount()
      Returns the numbers of samples in this track.
      Returns:
      sample count
    • setPosition

      void setPosition(long pos)
      Sets the read position.
      Parameters:
      pos - desired position
    • getPosition

      long getPosition()
      Gets the read position.
      Returns:
      the current position
    • read

      void read(Buffer buf) throws IOException
      Reads a sample from the input stream. If the end of the track is reached, the discard-flag in the buffer is set to true.
      Parameters:
      buf - The buffer for the sample.
      Throws:
      IOException - if an error occurs
    • getFormat

      Format getFormat()
      Gets the format of the track.
      Returns:
      the format of the track