QueueArray.find

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.

Note that the index is not 0-based, but an internal index number with a random offset. The index can be used in connection with gst_queue_array_drop_element(). FIXME: return index 0-based and make gst_queue_array_drop_element() take a 0-based index.

class QueueArray
uint
find
(
GCompareFunc func
,
void* data
)

Parameters

func GCompareFunc

comparison function, or %NULL to find @data by value

data void*

data for comparison function

Return Value

Type: uint

Index of the found element or -1 if nothing was found.

Meta