queue2

queue2 — Simple data queue

Synopsis

struct              GstQueue2;

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstQueue2

Properties

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

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.

Last reviewed on 2009-07-10 (0.10.24)

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

Details

struct GstQueue2

struct GstQueue2;

Property Details

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 "high-percent" property

  "high-percent"             gint                  : Read / Write

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

Allowed values: [0,100]

Default value: 99


The "low-percent" property

  "low-percent"              gint                  : Read / Write

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

Allowed values: [0,100]

Default value: 10


The "max-size-buffers" property

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

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

Default value: 100


The "max-size-bytes" property

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

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

Default value: 2097152


The "max-size-time" property

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

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

Default value: 2000000000


The "ring-buffer-max-size" property

  "ring-buffer-max-size"     guint64               : Read / Write

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

Default value: 0


The "temp-location" property

  "temp-location"            gchar*                : Read

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

Default value: NULL


The "temp-remove" property

  "temp-remove"              gboolean              : Read / Write

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

Default value: TRUE


The "temp-template" property

  "temp-template"            gchar*                : Read / Write

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

Default value: NULL


The "use-buffering" property

  "use-buffering"            gboolean              : Read / Write

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

Default value: FALSE


The "use-rate-estimate" property

  "use-rate-estimate"        gboolean              : Read / Write

Estimate the bitrate of the stream to calculate time level.

Default value: TRUE