BufferList

Buffer lists are an object containing a list of buffers.

Buffer lists are created with Buffer.listNew and filled with data using a Buffer.listInsert.

Buffer lists can be pushed on a srcpad with Pad.pushList. This is interesting when multiple buffers need to be pushed in one go because it can reduce the amount of overhead for pushing each buffer individually.

Constructors

this
this(GstBufferList* gstBufferList, bool ownedRef = false)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new, empty gstreamer.BufferList The caller is responsible for unreffing the returned gstreamer.BufferList

this
this(uint size)

Creates a new, empty gstreamer.BufferList The caller is responsible for unreffing the returned gstreamer.BufferList The list will have size space preallocated so that memory reallocations can be avoided.

Members

Functions

calculateSize
size_t calculateSize()

Calculates the size of the data contained in buffer list by adding the size of all buffers.

copyDeep
BufferList copyDeep()

Create a copy of the given buffer list. This will make a newly allocated copy of the buffer that the source buffer list contains.

foreac
bool foreac(GstBufferListFunc func, void* userData)

Call func with data for each buffer in list.

get
Buffer get(uint idx)

Get the buffer at idx.

getBufferListStruct
GstBufferList* getBufferListStruct(bool transferOwnership = false)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getWritable
Buffer getWritable(uint idx)

Gets the buffer at idx, ensuring it is a writable buffer.

insert
void insert(int idx, Buffer buffer)

Insert buffer at idx in list. Other buffers are moved to make room for this new buffer.

length
uint length()

Returns the number of buffers in list.

remove
void remove(uint idx, uint length)

Remove length buffers starting from idx in list. The following buffers are moved to close the gap.

Static functions

getType
GType getType()

Variables

gstBufferList
GstBufferList* gstBufferList;

the main Gtk struct

Meta