BitWriter
Object Hierarchy:
Description:
[ CCode ( cname = "GstBitWriter" , has_type_id = false ) ]
[ GIR ( name = "BitWriter" ) ]
[ Version ( since = "1.16" ) ]
public struct BitWriter
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.
Content:
Methods:
- public bool align_bytes (uint8 trailing_bit)
Write trailing bit to align last byte of data
.
- public void free ()
Frees this and the allocated data
inside.
- public Buffer free_and_get_buffer ()
Frees this without destroying the
internal data, which is returned as Buffer.
- public uint8[] free_and_get_data ()
Frees this without destroying the
internal data, which is returned.
- public unowned uint8[] get_data ()
Get written data pointer
- public uint get_remaining ()
- public uint get_size ()
Get size of written data
- public bool put_bits_uint16 (uint16 value, uint nbits)
Write nbits
bits of value
to
BitWriter.
- public bool put_bits_uint32 (uint32 value, uint nbits)
Write nbits
bits of value
to
BitWriter.
- public bool put_bits_uint64 (uint64 value, uint nbits)
Write nbits
bits of value
to
BitWriter.
- public bool put_bits_uint8 (uint8 value, uint nbits)
Write nbits
bits of value
to
BitWriter.
- public bool put_bytes (uint8[] data)
Write nbytes
bytes of data
to
BitWriter.
- public void reset ()
Resets this and frees the data if
it's owned by this.
- public Buffer reset_and_get_buffer ()
Resets this and returns the current
data as Buffer.
- public uint8[] reset_and_get_data ()
Resets this and returns the current
data.
- public bool set_pos (uint pos)
Fields: