Interface EbmlProcessor


  • @Deprecated
    public interface EbmlProcessor
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Defines EBML element IDs/types and processes events.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  EbmlProcessor.ElementType
      Deprecated.
      EBML element types.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void binaryElement​(int id, int contentsSize, ExtractorInput input)
      Deprecated.
      Called when a binary element is encountered.
      void endMasterElement​(int id)
      Deprecated.
      Called when the end of a master element is encountered.
      void floatElement​(int id, double value)
      Deprecated.
      Called when a float element is encountered.
      @com.google.android.exoplayer2.extractor.mkv.EbmlProcessor.ElementType int getElementType​(int id)
      Deprecated.
      Maps an element ID to a corresponding type.
      void integerElement​(int id, long value)
      Deprecated.
      Called when an integer element is encountered.
      boolean isLevel1Element​(int id)
      Deprecated.
      Checks if the given id is that of a level 1 element.
      void startMasterElement​(int id, long contentPosition, long contentSize)
      Deprecated.
      Called when the start of a master element is encountered.
      void stringElement​(int id, String value)
      Deprecated.
      Called when a string element is encountered.
    • Field Detail

      • ELEMENT_TYPE_UNKNOWN

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

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

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

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

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

        static final int ELEMENT_TYPE_FLOAT
        Deprecated.
        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)
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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
        Deprecated.
        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.