## downloadbuffer

downloadbuffer

## Properties

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

## Types and Values

struct | GstDownloadBuffer

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstDownloadBuffer

## 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

## Functions

## Types and Values

### struct GstDownloadBuffer

    struct GstDownloadBuffer;

## Property Details

### 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-bytes”` property

      “max-size-bytes”           guint

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

Flags: Read / Write

Default value: 2097152

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

      “max-size-time”            guint64

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

Flags: Read / Write

Default value: 2000000000

### 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