Interface EbmlProcessor


  • public interface EbmlProcessor
    Defines EBML element IDs/types and processes events.
    • Field Detail

      • ELEMENT_TYPE_UNKNOWN

        static final int ELEMENT_TYPE_UNKNOWN
        Type for unknown elements.
        See Also:
        Constant Field Values
      • ELEMENT_TYPE_MASTER

        static final int ELEMENT_TYPE_MASTER
        Type for elements that contain child elements.
        See Also:
        Constant Field Values
      • ELEMENT_TYPE_UNSIGNED_INT

        static final int ELEMENT_TYPE_UNSIGNED_INT
        Type for integer value elements of up to 8 bytes.
        See Also:
        Constant Field Values
      • ELEMENT_TYPE_STRING

        static final int ELEMENT_TYPE_STRING
        Type for string elements.
        See Also:
        Constant Field Values
      • ELEMENT_TYPE_BINARY

        static final int ELEMENT_TYPE_BINARY
        Type for binary elements.
        See Also:
        Constant Field Values
      • ELEMENT_TYPE_FLOAT

        static final int ELEMENT_TYPE_FLOAT
        Type for IEEE floating point value elements of either 4 or 8 bytes.
        See Also:
        Constant Field Values
    • Method Detail

      • isLevel1Element

        boolean isLevel1Element​(int id)
        Checks if the given id is that of a level 1 element.
        Parameters:
        id - The element ID.
        Returns:
        Whether the given id is that of a level 1 element.
      • startMasterElement

        void startMasterElement​(int id,
                                long contentPosition,
                                long contentSize)
                         throws ParserException
        Called when the start of a master element is encountered.

        Following events should be considered as taking place within this element until a matching call to endMasterElement(int) is made.

        Note that it is possible for another master element of the same element ID to be nested within itself.

        Parameters:
        id - The element ID.
        contentPosition - The position of the start of the element's content in the stream.
        contentSize - The size of the element's content in bytes.
        Throws:
        ParserException - If a parsing error occurs.
      • endMasterElement

        void endMasterElement​(int id)
                       throws ParserException
        Called when the end of a master element is encountered.
        Parameters:
        id - The element ID.
        Throws:
        ParserException - If a parsing error occurs.
      • integerElement

        void integerElement​(int id,
                            long value)
                     throws ParserException
        Called when an integer element is encountered.
        Parameters:
        id - The element ID.
        value - The integer value that the element contains.
        Throws:
        ParserException - If a parsing error occurs.
      • floatElement

        void floatElement​(int id,
                          double value)
                   throws ParserException
        Called when a float element is encountered.
        Parameters:
        id - The element ID.
        value - The float value that the element contains
        Throws:
        ParserException - If a parsing error occurs.
      • stringElement

        void stringElement​(int id,
                           String value)
                    throws ParserException
        Called when a string element is encountered.
        Parameters:
        id - The element ID.
        value - The string value that the element contains.
        Throws:
        ParserException - If a parsing error occurs.
      • binaryElement

        void binaryElement​(int id,
                           int contentsSize,
                           ExtractorInput input)
                    throws IOException
        Called when a binary element is encountered.

        The element header (containing the element ID and content size) will already have been read. Implementations are required to consume the whole remainder of the element, which is contentSize bytes in length, before returning. Implementations are permitted to fail (by throwing an exception) having partially consumed the data, however if they do this, they must consume the remainder of the content when called again.

        Parameters:
        id - The element ID.
        contentsSize - The element's content size.
        input - The ExtractorInput from which data should be read.
        Throws:
        ParserException - If a parsing error occurs.
        IOException - If an error occurs reading from the input.