## queue2 queue2 — Simple data queue |

## Properties

guint | current-level-buffers | Read
guint | current-level-bytes | Read
guint64 | current-level-time | Read
gint | high-percent | Read / Write
gint | low-percent | Read / Write
guint | max-size-buffers | Read / Write
guint | max-size-bytes | Read / Write
guint64 | max-size-time | Read / Write
guint64 | ring-buffer-max-size | Read / Write
gchar * | temp-location | Read
gboolean | temp-remove | Read / Write
gchar * | temp-template | Read / Write
gboolean | use-buffering | Read / Write
gboolean | use-rate-estimate | Read / Write

## Types and Values

struct | GstQueue2

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstQueue2

## Description

Data is queued until one of the limits specified by the “max-size-buffers”, “max-size-bytes” and/or “max-size-time” properties has been reached. Any attempt to push more buffers into the queue will block the pushing thread until more space becomes available.

The queue will create a new thread on the source pad to decouple the processing on sink and source pad.

You can query how many buffers are queued by reading the “current-level-buffers” property.

The default queue size limits are 100 buffers, 2MB of data, or two seconds worth of data, whichever is reached first.

If you set temp-template to a value such as /tmp/gstreamer-XXXXXX, the element will allocate a random free filename and buffer data in the file. By using this, it will buffer the entire stream data on the file independently of the queue size limits, they will only be used for buffering statistics.

The temp-location property will be used to notify the application of the allocated filename.

## Synopsis

### Element Information

plugin | coreelements
author | Erik Walthinsen <omega@cse.ogi.edu>, Wim Taymans <wim.taymans@gmail.com>
class | Generic

### Element Pads

name | sink
direction | sink
presence | always
details | ANY

name | src
direction | source
presence | always
details | ANY

## Functions

## Types and Values

### struct GstQueue2

    struct GstQueue2;

## Property Details

### The `“current-level-buffers”` property

      “current-level-buffers”    guint

Current number of buffers in the queue.

Flags: Read

Default value: 0

### The `“current-level-bytes”` property

      “current-level-bytes”      guint

Current amount of data in the queue (bytes).

Flags: Read

Default value: 0

### The `“current-level-time”` property

      “current-level-time”       guint64

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

Flags: Read

Default value: 0

### The `“high-percent”` property

      “high-percent”             gint

High threshold for buffering to finish. Only used if use-buffering is True.

Flags: Read / Write

Allowed values: [0,100]

Default value: 99

### The `“low-percent”` property

      “low-percent”              gint

Low threshold for buffering to start. Only used if use-buffering is True.

Flags: Read / Write

Allowed values: [0,100]

Default value: 10

### The `“max-size-buffers”` property

      “max-size-buffers”         guint

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

Flags: Read / Write

Default value: 100

### The `“max-size-bytes”` property

      “max-size-bytes”           guint

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

Flags: Read / Write

Default value: 2097152

### The `“max-size-time”` property

      “max-size-time”            guint64

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

Flags: Read / Write

Default value: 2000000000

### The `“ring-buffer-max-size”` property

      “ring-buffer-max-size”     guint64

The maximum size of the ring buffer in bytes. If set to 0, the ring buffer is disabled. Default 0.

Flags: Read / Write

Default value: 0

### The `“temp-location”` property

      “temp-location”            gchar *

Location to store temporary files in (Only read this property, use temp-template to configure the name template).

Flags: Read

Default value: NULL

### The `“temp-remove”` property

      “temp-remove”              gboolean

When temp-template is set, remove the temporary file when going to READY.

Flags: Read / Write

Default value: TRUE

### The `“temp-template”` property

      “temp-template”            gchar *

File template to store temporary files in, should contain directory and XXXXXX. (NULL == disabled).

Flags: Read / Write

Default value: NULL

### The `“use-buffering”` property

      “use-buffering”            gboolean

Emit GST_MESSAGE_BUFFERING based on low-/high-percent thresholds.

Flags: Read / Write

Default value: FALSE

### The `“use-rate-estimate”` property

      “use-rate-estimate”        gboolean

Estimate the bitrate of the stream to calculate time level.

Flags: Read / Write

Default value: TRUE