Gjsify LogoGjsify Logo

#GstBitWriter provides a bit writer that can write any number of bits into a memory buffer. It provides functions for writing any number of bits into 8, 16, 32 and 64 bit variables.

record

Hierarchy

  • BitWriter

Index

Constructors

Properties

bitSize: number

Size of written data in bits

field
data: number

Allocated data for bit writer to write

field
name: string

Methods

  • alignBytes(trailingBit: number): boolean
  • Write trailing bit to align last byte of data. trailing_bit can only be 1 or 0.

    Parameters

    • trailingBit: number

      trailing bits of last byte, 0 or 1

    Returns boolean

  • free(): void
  • Frees bitwriter without destroying the internal data, which is returned as #GstBuffer.

    Free-function: gst_buffer_unref

    Returns Gst.Buffer

  • freeAndGetData(): Uint8Array
  • Frees bitwriter without destroying the internal data, which is returned.

    Free-function: g_free

    Returns Uint8Array

  • getData(): Uint8Array
  • getRemaining(): number
  • getSize(): number
  • putBitsUint16(value: number, nbits: number): boolean
  • Write nbits bits of value to #GstBitWriter.

    Parameters

    • value: number

      value of #guint16 to write

    • nbits: number

      number of bits to write

    Returns boolean

  • putBitsUint32(value: number, nbits: number): boolean
  • Write nbits bits of value to #GstBitWriter.

    Parameters

    • value: number

      value of #guint32 to write

    • nbits: number

      number of bits to write

    Returns boolean

  • putBitsUint64(value: number, nbits: number): boolean
  • Write nbits bits of value to #GstBitWriter.

    Parameters

    • value: number

      value of #guint64 to write

    • nbits: number

      number of bits to write

    Returns boolean

  • putBitsUint8(value: number, nbits: number): boolean
  • Write nbits bits of value to #GstBitWriter.

    Parameters

    • value: number

      value of #guint8 to write

    • nbits: number

      number of bits to write

    Returns boolean

  • putBytes(data: Uint8Array, nbytes: number): boolean
  • Write nbytes bytes of data to #GstBitWriter.

    Parameters

    • data: Uint8Array

      pointer of data to write

    • nbytes: number

      number of bytes to write

    Returns boolean

  • reset(): void
  • Resets bitwriter and frees the data if it's owned by bitwriter.

    Returns void

  • resetAndGetData(): Uint8Array
  • Resets bitwriter and returns the current data.

    Free-function: g_free

    Returns Uint8Array

  • setPos(pos: number): boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method