GstBase.BitWriter¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
auto_grow |
r |
||
bit_capacity |
r |
||
bit_size |
r/w |
Size of written data in bits |
|
data |
r/w |
Allocated data for bit writer to write |
|
owned |
r |
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class GstBase.BitWriter¶
GstBase.BitWriter
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.New in version 1.16.
- align_bytes(trailing_bit)[source]¶
- Parameters:
trailing_bit (
int
) – trailing bits of last byte, 0 or 1- Returns:
- Return type:
Write trailing bit to align last byte of data. trailing_bit can only be 1 or 0.
- free_and_get_buffer()[source]¶
- Returns:
a new allocated
Gst.Buffer
wrapping the data inside. gst_buffer_unref() after usage.- Return type:
Frees self without destroying the internal data, which is returned as
Gst.Buffer
.Free-function: gst_buffer_unref
- free_and_get_data()[source]¶
-
Frees self without destroying the internal data, which is returned.
Free-function:
GLib.free
- put_bits_uint16(value, nbits)[source]¶
- Parameters:
- Returns:
- Return type:
Write nbits bits of value to
GstBase.BitWriter
.
- put_bits_uint32(value, nbits)[source]¶
- Parameters:
- Returns:
- Return type:
Write nbits bits of value to
GstBase.BitWriter
.
- put_bits_uint64(value, nbits)[source]¶
- Parameters:
- Returns:
- Return type:
Write nbits bits of value to
GstBase.BitWriter
.
- put_bits_uint8(value, nbits)[source]¶
- Parameters:
- Returns:
- Return type:
Write nbits bits of value to
GstBase.BitWriter
.
- put_bytes(data, nbytes)[source]¶
- Parameters:
- Returns:
- Return type:
Write nbytes bytes of data to
GstBase.BitWriter
.
- reset_and_get_buffer()[source]¶
- Returns:
a new allocated
Gst.Buffer
wrapping the current data. gst_buffer_unref() after usage.- Return type:
Resets self and returns the current data as
Gst.Buffer
.Free-function: gst_buffer_unref