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() nothrow
gstbase.byte_reader.ByteReader parent() @property nothrowGet `parent` field. Returns: #GstByteReader parent
uint allocSize() @property nothrowGet `allocSize` field. Returns: Allocation size of the data
void allocSize(uint propval) @property nothrowSet `allocSize` field. Params: propval = Allocation size of the data
bool fixed() @property nothrowGet `fixed` field. Returns: If true no reallocations are allowed
void fixed(bool propval) @property nothrowSet `fixed` field. Params: propval = If true no reallocations are allowed
bool owned() @property nothrowGet `owned` field. Returns: If false no reallocations are allowed and copies of data are returned
void owned(bool propval) @property nothrowSet `owned` field. Params: propval = If false no reallocations are allowed and copies of data are returned
bool ensureFreeSpace(uint size) nothrowChecks if enough free space from the current write cursor is available and reallocates if necessary.
bool fill(ubyte value, uint size) nothrowWrites size bytes containing value to writer.
gst.buffer.Buffer freeAndGetBuffer() nothrowFrees writer and all memory allocated by it except the current data, which is returned as #GstBuffer.
ubyte * freeAndGetData() nothrowFrees writer and all memory allocated by it except the current data, which is returned.
uint getRemaining() nothrowReturns 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_() nothrowInitializes writer to an empty instance
void initWithData(ubyte[] data, bool initialized) nothrowInitializes 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) nothrowInitializes writer with the given initial data size.
bool putBuffer(gst.buffer.Buffer buffer, size_t offset, ptrdiff_t size) nothrowWrites size bytes of data to writer.
bool putData(ubyte[] data) nothrowWrites size bytes of data to writer.
bool putFloat32Be(float val) nothrowWrites a big endian 32 bit float to writer.
bool putFloat32Le(float val) nothrowWrites a little endian 32 bit float to writer.
bool putFloat64Be(double val) nothrowWrites a big endian 64 bit float to writer.
bool putFloat64Le(double val) nothrowWrites a little endian 64 bit float to writer.
bool putInt16Be(short val) nothrowWrites a signed big endian 16 bit integer to writer.
bool putInt16Le(short val) nothrowWrites a signed little endian 16 bit integer to writer.
bool putInt24Be(int val) nothrowWrites a signed big endian 24 bit integer to writer.
bool putInt24Le(int val) nothrowWrites a signed little endian 24 bit integer to writer.
bool putInt32Be(int val) nothrowWrites a signed big endian 32 bit integer to writer.
bool putInt32Le(int val) nothrowWrites a signed little endian 32 bit integer to writer.
bool putInt64Be(long val) nothrowWrites a signed big endian 64 bit integer to writer.
bool putInt64Le(long val) nothrowWrites a signed little endian 64 bit integer to writer.
bool putInt8(byte val) nothrowWrites a signed 8 bit integer to writer.
bool putStringUtf16(ushort[] data) nothrowWrites a NUL-terminated UTF16 string to writer (including the terminator).
bool putStringUtf32(uint[] data) nothrowWrites a NUL-terminated UTF32 string to writer (including the terminator).
bool putStringUtf8(string data) nothrowWrites a NUL-terminated UTF8 string to writer (including the terminator).
bool putUint16Be(ushort val) nothrowWrites a unsigned big endian 16 bit integer to writer.
bool putUint16Le(ushort val) nothrowWrites a unsigned little endian 16 bit integer to writer.
bool putUint24Be(uint val) nothrowWrites a unsigned big endian 24 bit integer to writer.
bool putUint24Le(uint val) nothrowWrites a unsigned little endian 24 bit integer to writer.
bool putUint32Be(uint val) nothrowWrites a unsigned big endian 32 bit integer to writer.
bool putUint32Le(uint val) nothrowWrites a unsigned little endian 32 bit integer to writer.
bool putUint64Be(ulong val) nothrowWrites a unsigned big endian 64 bit integer to writer.
bool putUint64Le(ulong val) nothrowWrites a unsigned little endian 64 bit integer to writer.
bool putUint8(ubyte val) nothrowWrites a unsigned 8 bit integer to writer.
void reset() nothrowResets writer and frees the data if it's owned by writer.
gst.buffer.Buffer resetAndGetBuffer() nothrowResets writer and returns the current data as buffer.
Constructors
this(void * ptr, Flag!"Take" take)