Allocation size of the data
If %TRUE no reallocations are allowed
If %FALSE no reallocations are allowed and copies of data are returned
#GstByteReader parent
Checks if enough free space from the current write cursor is available and reallocates if necessary.
Number of bytes that should be available
Writes size
bytes containing value
to writer
.
Value to be written
Number of bytes to be written
Frees writer
and all memory allocated by it.
Frees writer
and all memory allocated by it except
the current data, which is returned.
Free-function: g_free
Returns the remaining size of data that can still be written. If -1 is returned the remaining size is only limited by system resources.
Initializes writer
to an empty instance
Initializes writer
with the given
memory area. If initialized
is %TRUE it is possible to
read size
bytes from the #GstByteWriter from the beginning.
Memory area for writing
If %TRUE the complete data can be read from the beginning
Initializes writer
with the given initial data size.
Initial size of data
If %TRUE the data can't be reallocated
Writes size
bytes of data
to writer
.
Data to write
Writes a big endian 32 bit float to writer
.
Value to write
Writes a little endian 32 bit float to writer
.
Value to write
Writes a big endian 64 bit float to writer
.
Value to write
Writes a little endian 64 bit float to writer
.
Value to write
Writes a signed big endian 16 bit integer to writer
.
Value to write
Writes a signed little endian 16 bit integer to writer
.
Value to write
Writes a signed big endian 24 bit integer to writer
.
Value to write
Writes a signed little endian 24 bit integer to writer
.
Value to write
Writes a signed big endian 32 bit integer to writer
.
Value to write
Writes a signed little endian 32 bit integer to writer
.
Value to write
Writes a signed big endian 64 bit integer to writer
.
Value to write
Writes a signed little endian 64 bit integer to writer
.
Value to write
Writes a signed 8 bit integer to writer
.
Value to write
Writes a NUL-terminated UTF16 string to writer
(including the terminator).
UTF16 string to write
Writes a NUL-terminated UTF32 string to writer
(including the terminator).
UTF32 string to write
Writes a NUL-terminated UTF8 string to writer
(including the terminator).
UTF8 string to write
Writes a unsigned big endian 16 bit integer to writer
.
Value to write
Writes a unsigned little endian 16 bit integer to writer
.
Value to write
Writes a unsigned big endian 24 bit integer to writer
.
Value to write
Writes a unsigned little endian 24 bit integer to writer
.
Value to write
Writes a unsigned big endian 32 bit integer to writer
.
Value to write
Writes a unsigned little endian 32 bit integer to writer
.
Value to write
Writes a unsigned big endian 64 bit integer to writer
.
Value to write
Writes a unsigned little endian 64 bit integer to writer
.
Value to write
Writes a unsigned 8 bit integer to writer
.
Value to write
Resets writer
and frees the data if it's
owned by writer
.
Resets writer
and returns the current data.
Free-function: g_free
#GstByteWriter provides a byte writer and reader that can write/read different integer and floating point types to/from a memory buffer. It provides functions for writing/reading signed/unsigned, little/big endian integers of 8, 16, 24, 32 and 64 bits and functions for reading little/big endian floating points numbers of 32 and 64 bits. It also provides functions to write/read NUL-terminated strings in various character encodings.