Class (GI Struct)

GstBase-1.0GstBaseBitReader

GstBase.BitReader provides a bit reader that can read any number of bits from a memory buffer. It provides functions for reading any number of bits into 8, 16, 32 and 64 bit variables.

Index

Constructors

  • Parameters

    • Optionalproperties: Partial<{ bit: number; byte: number; data: Uint8Array; size: number }>

    Returns BitReader

Properties

bit: number
byte: number
data: Uint8Array
size: number
$gtype: GType<BitReader>

Methods

  • Read nbits bits into val and update the current position.

    Parameters

    • nbits: number

      number of bits to read

    Returns [boolean, number]

    true if successful, false otherwise.

  • Read nbits bits into val and update the current position.

    Parameters

    • nbits: number

      number of bits to read

    Returns [boolean, number]

    true if successful, false otherwise.

  • Read nbits bits into val and update the current position.

    Parameters

    • nbits: number

      number of bits to read

    Returns [boolean, number]

    true if successful, false otherwise.

  • Read nbits bits into val and update the current position.

    Parameters

    • nbits: number

      number of bits to read

    Returns [boolean, number]

    true if successful, false otherwise.

  • Initializes a GstBase.BitReader instance to read from data. This function can be called on already initialized instances.

    Parameters

    • data: string | Uint8Array<ArrayBufferLike>

      data from which the bit reader should read

    Returns void

  • Read nbits bits into val but keep the current position.

    Parameters

    • nbits: number

      number of bits to read

    Returns [boolean, number]

    true if successful, false otherwise.

  • Read nbits bits into val but keep the current position.

    Parameters

    • nbits: number

      number of bits to read

    Returns [boolean, number]

    true if successful, false otherwise.

  • Read nbits bits into val but keep the current position.

    Parameters

    • nbits: number

      number of bits to read

    Returns [boolean, number]

    true if successful, false otherwise.

  • Read nbits bits into val but keep the current position.

    Parameters

    • nbits: number

      number of bits to read

    Returns [boolean, number]

    true if successful, false otherwise.

  • Sets the new position of a GstBase.BitReader instance to pos in bits.

    Parameters

    • pos: number

      The new position in bits

    Returns boolean

    true if the position could be set successfully, false otherwise.