"Fossies" - the Fresh Open Source Software Archive

Member "gstreamer-1.16.1/docs/gst/html/gstreamer-GstAtomicQueue.html" (23 Sep 2019, 16033 Bytes) of package /linux/misc/gstreamer-1.16.1.tar.xz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the gstreamer-1.16.1.tar.xz project site itself.

GstAtomicQueue

GstAtomicQueue — An atomic queue implementation

Functions

Types and Values

Includes

#include <gst/gst.h>

Description

The GstAtomicQueue object implements a queue that can be used from multiple threads without performing any blocking operations.

Functions

gst_atomic_queue_new ()

GstAtomicQueue *
gst_atomic_queue_new (guint initial_size);

Create a new atomic queue instance. initial_size will be rounded up to the nearest power of 2 and used as the initial size of the queue.

Parameters

initial_size

initial queue size

 

Returns

a new GstAtomicQueue


gst_atomic_queue_ref ()

void
gst_atomic_queue_ref (GstAtomicQueue *queue);

Increase the refcount of queue .

Parameters

queue

a GstAtomicQueue

 

gst_atomic_queue_unref ()

void
gst_atomic_queue_unref (GstAtomicQueue *queue);

Unref queue and free the memory when the refcount reaches 0.

Parameters

queue

a GstAtomicQueue

 

gst_atomic_queue_push ()

void
gst_atomic_queue_push (GstAtomicQueue *queue,
                       gpointer data);

Append data to the tail of the queue.

Parameters

queue

a GstAtomicQueue

 

data

the data

 

gst_atomic_queue_peek ()

gpointer
gst_atomic_queue_peek (GstAtomicQueue *queue);

Peek the head element of the queue without removing it from the queue.

Parameters

queue

a GstAtomicQueue

 

Returns

the head element of queue or NULL when the queue is empty.

[transfer none][nullable]


gst_atomic_queue_pop ()

gpointer
gst_atomic_queue_pop (GstAtomicQueue *queue);

Get the head element of the queue.

Parameters

queue

a GstAtomicQueue

 

Returns

the head element of queue or NULL when the queue is empty.

[transfer full]


gst_atomic_queue_length ()

guint
gst_atomic_queue_length (GstAtomicQueue *queue);

Get the amount of items in the queue.

Parameters

queue

a GstAtomicQueue

 

Returns

the number of elements in the queue.

Types and Values

GstAtomicQueue

typedef struct _GstAtomicQueue GstAtomicQueue;

Opaque atomic data queue.

Use the accessor functions to get the stored values.