Class MutableMatroskaBlock

    • Constructor Detail

      • MutableMatroskaBlock

        public MutableMatroskaBlock()
    • Method Detail

      • getTimecode

        public int getTimecode()
        Specified by:
        getTimecode in interface MatroskaBlock
        Returns:
        The timecode of this block relative to its cluster
      • getTrackNumber

        public int getTrackNumber()
        Specified by:
        getTrackNumber in interface MatroskaBlock
        Returns:
        The track number which this block is for
      • isKeyFrame

        public boolean isKeyFrame()
        Specified by:
        isKeyFrame in interface MatroskaBlock
        Returns:
        Whether this block is a keyframe
      • getFrameCount

        public int getFrameCount()
        Specified by:
        getFrameCount in interface MatroskaBlock
        Returns:
        The number of frames in this block
      • getNextFrameBuffer

        public java.nio.ByteBuffer getNextFrameBuffer​(MatroskaFileReader reader,
                                                      int index)
                                               throws java.io.IOException
        Description copied from interface: MatroskaBlock
        The reader must already be positioned at the frame that is to be read next.
        Specified by:
        getNextFrameBuffer in interface MatroskaBlock
        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.
      • parseHeader

        public boolean parseHeader​(MatroskaFileReader reader,
                                   MatroskaElement element,
                                   int trackFilter)
                            throws java.io.IOException
        Parses the Matroska block header data into the fields of this instance. On success of this method, this instance effectively represents that block.
        Parameters:
        reader - The reader to use.
        element - The block EBML element.
        trackFilter - The ID of the track to read data for from the block.
        Returns:
        true of a block if it contains data for the requested track, false otherwise.
        Throws:
        java.io.IOException - On read error.