QueueArray

gst.QueueArray.QueueArray is an object that provides standard queue functionality based on an array instead of linked lists. This reduces the overhead caused by memory management by a large factor.

Constructors

this
this(GstQueueArray* gstQueueArray, bool ownedRef)

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

this
this(uint initialSize)

Allocates a new gst.QueueArray.QueueArray object with an initial queue size of initial_size.

this
this(size_t structSize, uint initialSize)

Allocates a new gst.QueueArray.QueueArray object for elements (e.g. structures) of size struct_size, with an initial queue size of initial_size.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

clear
void clear()

Clears queue array and frees all memory associated to it.

dropElement
void* dropElement(uint idx)

Drops the queue element at position idx from queue array.

dropStruct
bool dropStruct(uint idx, void* pStruct)

Drops the queue element at position idx from queue array and copies the data of the element or structure that was removed into p_struct if p_struct is set (not NULL).

find
uint find(GCompareFunc func, void* data)

Finds an element in the queue array, either by comparing every element with func or by looking up data if no compare function func is provided, and returning the index of the found element.

free
void free()

Frees queue array and all memory associated to it.

getLength
uint getLength()

Returns the length of the queue array

getQueueArrayStruct
GstQueueArray* getQueueArrayStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

isEmpty
bool isEmpty()

Checks if the queue array is empty.

peekHead
void* peekHead()

Returns the head of the queue array and does not remove it from the queue.

peekHeadStruct
void* peekHeadStruct()

Returns the head of the queue array without removing it from the queue.

peekNth
void* peekNth(uint idx)

Returns the item at idx in array, but does not remove it from the queue.

peekNthStruct
void* peekNthStruct(uint idx)

Returns the item at idx in array, but does not remove it from the queue.

peekTail
void* peekTail()

Returns the tail of the queue array, but does not remove it from the queue.

peekTailStruct
void* peekTailStruct()

Returns the tail of the queue array, but does not remove it from the queue.

popHead
void* popHead()

Returns and head of the queue array and removes it from the queue.

popHeadStruct
void* popHeadStruct()

Returns the head of the queue array and removes it from the queue.

popTail
void* popTail()

Returns the tail of the queue array and removes it from the queue.

popTailStruct
void* popTailStruct()

Returns the tail of the queue array and removes it from the queue.

pushTail
void pushTail(void* data)

Pushes data to the tail of the queue array.

pushTailStruct
void pushTailStruct(void* pStruct)
setClearFunc
void setClearFunc(GDestroyNotify clearFunc)

Sets a function to clear an element of array.

Variables

gstQueueArray
GstQueueArray* gstQueueArray;

the main Gtk struct