GstQueue

## GstQueue GstQueue — Simple asynchronous data queue. |

## Synopsis

    #include <gst/gst.h>

                GstQueue;
                GstQueueSize;

## Object Hierarchy

      GObject
       +----GstObject
             +----GstElement
                   +----GstQueue

## Properties

      "block-timeout"        guint64               : Read / Write
      "current-level-buffers" guint                 : Read
      "current-level-bytes"  guint                 : Read
      "current-level-time"   guint64               : Read
      "leaky"                GstQueueLeaky         : Read / Write
      "max-size-buffers"     guint                 : Read / Write
      "max-size-bytes"       guint                 : Read / Write
      "max-size-time"        guint64               : Read / Write
      "may-deadlock"         gboolean              : Read / Write
      "min-threshold-buffers" guint                 : Read / Write
      "min-threshold-bytes"  guint                 : Read / Write
      "min-threshold-time"   guint64               : Read / Write

## Signal Prototypes

    "overrun"   void        user_function      (GstQueue *gstqueue,
                                                gpointer user_data);
    "running"   void        user_function      (GstQueue *gstqueue,
                                                gpointer user_data);
    "underrun"  void        user_function      (GstQueue *gstqueue,
                                                gpointer user_data);

## Description

Simple data queue. Data is queued till max_level buffers any subsequent buffers sent to this filter will block until free space becomes available in the buffer. The queue is typically used in conjunction with a thread.

You can query how many buffers are queued with the level argument.

The default queue length is set to 100.

The queue blocks by default.

## Details

### GstQueue

    typedef struct _GstQueue GstQueue;

### GstQueueSize

    typedef struct {
        guint   buffers;	/* no. of buffers */
        guint   bytes;	/* no. of bytes */
        guint64 time;	/* amount of time */
    } GstQueueSize;

## Properties

### The "`block-timeout`" property

      "block-timeout"        guint64               : Read / Write

Nanoseconds until blocked queue times out and returns filler event. Value of -1 disables timeout.

Default value: 18446744073709551615

### The "`current-level-buffers`" property

      "current-level-buffers" guint                 : Read

Current number of buffers in the queue.

Default value: 0

### The "`current-level-bytes`" property

      "current-level-bytes"  guint                 : Read

Current amount of data in the queue (bytes).

Default value: 0

### The "`current-level-time`" property

      "current-level-time"   guint64               : Read

Current amount of data in the queue (in ns).

Default value: 0

### The "`leaky`" property

      "leaky"                GstQueueLeaky         : Read / Write

Where the queue leaks, if at all.

Default value: 0

### The "`max-size-buffers`" property

      "max-size-buffers"     guint                 : Read / Write

Max. number of buffers in the queue (0=disable).

Default value: 0

### The "`max-size-bytes`" property

      "max-size-bytes"       guint                 : Read / Write

Max. amount of data in the queue (bytes, 0=disable).

Default value: 0

### The "`max-size-time`" property

      "max-size-time"        guint64               : Read / Write

Max. amount of data in the queue (in ns, 0=disable).

Default value: 0

### The "`may-deadlock`" property

      "may-deadlock"         gboolean              : Read / Write

The queue may deadlock if it's full and not PLAYING.

Default value: TRUE

### The "`min-threshold-buffers`" property

      "min-threshold-buffers" guint                 : Read / Write

Min. number of buffers in the queue to allow reading (0=disable).

Default value: 0

### The "`min-threshold-bytes`" property

      "min-threshold-bytes"  guint                 : Read / Write

Min. amount of data in the queue to allow reading (bytes, 0=disable).

Default value: 0

### The "`min-threshold-time`" property

      "min-threshold-time"   guint64               : Read / Write

Min. amount of data in the queue to allow reading (in ns, 0=disable).

Default value: 0

## Signals

### The "overrun" signal

    void        user_function                  (GstQueue *gstqueue,
                                                gpointer user_data);

Reports that the buffer became full (overrun). A buffer is full if the total amount of data inside it (num-buffers, time, size) is higher than the boundary values which can be set through the GObject properties.

`gstqueue` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "running" signal

    void        user_function                  (GstQueue *gstqueue,
                                                gpointer user_data);

`gstqueue` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The "underrun" signal

    void        user_function                  (GstQueue *gstqueue,
                                                gpointer user_data);

Reports that the buffer became empty (underrun). A buffer is empty if the total amount of data inside it (num-buffers, time, size) is lower than the boundary values which can be set through the GObject properties.

`gstqueue` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.