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)¶
- 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()¶
Frees self and the allocated data inside.
- free_and_get_buffer()¶
- 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()¶
-
Frees self without destroying the internal data, which is returned.
Free-function:
GLib.free
- put_bits_uint16(value, nbits)¶
- Parameters:
- Returns:
- Return type:
Write nbits bits of value to
GstBase.BitWriter
.
- put_bits_uint32(value, nbits)¶
- Parameters:
- Returns:
- Return type:
Write nbits bits of value to
GstBase.BitWriter
.
- put_bits_uint64(value, nbits)¶
- Parameters:
- Returns:
- Return type:
Write nbits bits of value to
GstBase.BitWriter
.
- put_bits_uint8(value, nbits)¶
- Parameters:
- Returns:
- Return type:
Write nbits bits of value to
GstBase.BitWriter
.
- put_bytes(data, nbytes)¶
- Parameters:
- Returns:
- Return type:
Write nbytes bytes of data to
GstBase.BitWriter
.
- reset()¶
Resets self and frees the data if it’s owned by self.
- reset_and_get_buffer()¶
- 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