gstbase.byte_writer

Module for [ByteWriter] class

Types 1

#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.

Fields
GstByteWriter _cInstance
Methods
void * _cPtr()
gstbase.byte_reader.ByteReader parent() @propertyGet `parent` field. Returns: #GstByteReader parent
uint allocSize() @propertyGet `allocSize` field. Returns: Allocation size of the data
void allocSize(uint propval) @propertySet `allocSize` field. Params: propval = Allocation size of the data
bool fixed() @propertyGet `fixed` field. Returns: If true no reallocations are allowed
void fixed(bool propval) @propertySet `fixed` field. Params: propval = If true no reallocations are allowed
bool owned() @propertyGet `owned` field. Returns: If false no reallocations are allowed and copies of data are returned
void owned(bool propval) @propertySet `owned` field. Params: propval = If false no reallocations are allowed and copies of data are returned
bool ensureFreeSpace(uint size)Checks if enough free space from the current write cursor is available and reallocates if necessary.
bool fill(ubyte value, uint size)Writes size bytes containing value to writer.
gst.buffer.Buffer freeAndGetBuffer()Frees writer and all memory allocated by it except the current data, which is returned as #GstBuffer.
ubyte * freeAndGetData()Frees writer and all memory allocated by it except the current data, which is returned.
uint getRemaining()Returns the remaining size of data that can still be written. If -1 is returned the remaining size is only limited by system resources. Returns: the remaining size of data that can still be written
void init_()Initializes writer to an empty instance
void initWithData(ubyte[] data, bool initialized)Initializes writer with the given memory area. If initialized is true it is possible to read size bytes from the #GstByteWriter from the beginning.
void initWithSize(uint size, bool fixed)Initializes writer with the given initial data size.
bool putBuffer(gst.buffer.Buffer buffer, size_t offset, ptrdiff_t size)Writes size bytes of data to writer.
bool putData(ubyte[] data)Writes size bytes of data to writer.
bool putFloat32Be(float val)Writes a big endian 32 bit float to writer.
bool putFloat32Le(float val)Writes a little endian 32 bit float to writer.
bool putFloat64Be(double val)Writes a big endian 64 bit float to writer.
bool putFloat64Le(double val)Writes a little endian 64 bit float to writer.
bool putInt16Be(short val)Writes a signed big endian 16 bit integer to writer.
bool putInt16Le(short val)Writes a signed little endian 16 bit integer to writer.
bool putInt24Be(int val)Writes a signed big endian 24 bit integer to writer.
bool putInt24Le(int val)Writes a signed little endian 24 bit integer to writer.
bool putInt32Be(int val)Writes a signed big endian 32 bit integer to writer.
bool putInt32Le(int val)Writes a signed little endian 32 bit integer to writer.
bool putInt64Be(long val)Writes a signed big endian 64 bit integer to writer.
bool putInt64Le(long val)Writes a signed little endian 64 bit integer to writer.
bool putInt8(byte val)Writes a signed 8 bit integer to writer.
bool putStringUtf16(ushort[] data)Writes a NUL-terminated UTF16 string to writer (including the terminator).
bool putStringUtf32(uint[] data)Writes a NUL-terminated UTF32 string to writer (including the terminator).
bool putStringUtf8(string data)Writes a NUL-terminated UTF8 string to writer (including the terminator).
bool putUint16Be(ushort val)Writes a unsigned big endian 16 bit integer to writer.
bool putUint16Le(ushort val)Writes a unsigned little endian 16 bit integer to writer.
bool putUint24Be(uint val)Writes a unsigned big endian 24 bit integer to writer.
bool putUint24Le(uint val)Writes a unsigned little endian 24 bit integer to writer.
bool putUint32Be(uint val)Writes a unsigned big endian 32 bit integer to writer.
bool putUint32Le(uint val)Writes a unsigned little endian 32 bit integer to writer.
bool putUint64Be(ulong val)Writes a unsigned big endian 64 bit integer to writer.
bool putUint64Le(ulong val)Writes a unsigned little endian 64 bit integer to writer.
bool putUint8(ubyte val)Writes a unsigned 8 bit integer to writer.
void reset()Resets writer and frees the data if it's owned by writer.
gst.buffer.Buffer resetAndGetBuffer()Resets writer and returns the current data as buffer.
Constructors
this(void * ptr, Flag!"Take" take)