downloadbuffer

downloadbuffer

Synopsis

struct              GstDownloadBuffer;

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstDownloadBuffer

Properties

  "high-percent"             gint                  : Read / Write
  "low-percent"              gint                  : Read / Write
  "max-size-bytes"           guint                 : Read / Write
  "max-size-time"            guint64               : Read / Write
  "temp-location"            gchar*                : Read
  "temp-remove"              gboolean              : Read / Write
  "temp-template"            gchar*                : Read / Write

Description

The downloadbuffer element provides on-disk buffering and caching of, typically, a network file. temp-template should be set to a value such as /tmp/gstreamer-XXXXXX and the element will allocate a random free filename and buffer the data in the file.

With max-size-bytes and max-size-time you can configure the buffering limits. The downloadbuffer element will try to read-ahead these amounts of data. When the amount of read-ahead data drops below low-percent of the configured max, the element will start emitting BUFFERING messages until high-percent of max is reached again.

The downloadbuffer provides push and pull based scheduling on its source pad and will efficiently seek in the upstream element when needed.

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

When the downloadbuffer has completely downloaded the media, it will post an application message named "GstCacheDownloadComplete" with the following information:

  • G_TYPE_STRING "location": the location of the completely downloaded file.

Synopsis

Element Information

plugin

coreelements

author

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 GstDownloadBuffer

struct GstDownloadBuffer;

Property Details

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-bytes" property

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

Max. amount of data to buffer (bytes, 0=disable).

Default value: 2097152


The "max-size-time" property

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

Max. amount of data to buffer (in ns, 0=disable).

Default value: 2000000000


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