Class: shaka.util.EbmlParser

Constructor

new EbmlParser(dataViewnon-null)

Creates an Extensible Binary Markup Language (EBML) parser.
Parameters:
Name Type Description
dataView DataView The EBML data.
Source:

Members

(static, constant, non-null) DYNAMIC_SIZES :Array.<!Uint8Array>

Type:
  • Array.<!Uint8Array>
Source:

(private, non-null) dataView_ :DataView

Type:
  • DataView
Source:

(private, non-null) reader_ :shaka.util.DataViewReader

Type:
Source:

Methods

(private, static) getVintValue_(vintnon-null) → {number}

Gets the value of a variable sized integer. For example, the x's below are part of the vint's value. 7-bit value: 1xxx xxxx 14-bit value: 01xx xxxx xxxx xxxx 21-bit value: 001x xxxx xxxx xxxx xxxx xxxx
Parameters:
Name Type Description
vint Uint8Array The variable sized integer.
Source:
Throws:
Returns:
The value of the variable sized integer.
Type
number

(private, static) isDynamicSizeValue_(vintnon-null) → {boolean}

Checks if the given variable sized integer represents a dynamic size value.
Parameters:
Name Type Description
vint Uint8Array The variable sized integer.
Source:
Returns:
true if |vint| represents a dynamic size value, false otherwise.
Type
boolean

hasMoreData() → {boolean}

Source:
Returns:
True if the parser has more data, false otherwise.
Type
boolean

parseElement() → (non-null) {shaka.util.EbmlElement}

Parses an EBML element from the parser's current position, and advances the parser.
Source:
See:
Throws:
Returns:
The EBML element.
Type
shaka.util.EbmlElement

(private) parseId_() → {number}

Parses an EBML ID from the parser's current position, and advances the parser.
Source:
Throws:
Returns:
The EBML ID.
Type
number

(private) parseVint_() → (non-null) {Uint8Array}

Parses a variable sized integer from the parser's current position, and advances the parser. For example: 1 byte wide: 1xxx xxxx 2 bytes wide: 01xx xxxx xxxx xxxx 3 bytes wide: 001x xxxx xxxx xxxx xxxx xxxx
Source:
Throws:
Returns:
The variable sized integer.
Type
Uint8Array