Interface MatroskaBlock

  • All Known Implementing Classes:
    MutableMatroskaBlock

    public interface MatroskaBlock
    Provides information and buffer to read from for a Matroska block.
    • Method Detail

      • getTimecode

        int getTimecode()
        Returns:
        The timecode of this block relative to its cluster
      • getTrackNumber

        int getTrackNumber()
        Returns:
        The track number which this block is for
      • isKeyFrame

        boolean isKeyFrame()
        Returns:
        Whether this block is a keyframe
      • getFrameCount

        int getFrameCount()
        Returns:
        The number of frames in this block
      • getNextFrameBuffer

        java.nio.ByteBuffer getNextFrameBuffer​(MatroskaFileReader reader,
                                               int index)
                                        throws java.io.IOException
        The reader must already be positioned at the frame that is to be read next.
        Parameters:
        reader - The reader to use to read the block contents into a buffer.
        index - The index of the frame to get the buffer for.
        Returns:
        A buffer where the range between position and limit contains the data for the specific frame. The contents of this buffer are only valid until the next call to this method.
        Throws:
        java.io.IOException - On read error.