blob: 0e90360823134de09c589c7026c1400e917f4953 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>downloadbuffer: GStreamer Core Plugins 1.0 Plugins Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GStreamer Core Plugins 1.0 Plugins Reference Manual">
<link rel="up" href="ch01.html" title="gstreamer Elements">
<link rel="prev" href="gstreamer-plugins-capsfilter.html" title="capsfilter">
<link rel="next" href="gstreamer-plugins-fakesrc.html" title="fakesrc">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#gstreamer-plugins-downloadbuffer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#gstreamer-plugins-downloadbuffer.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#gstreamer-plugins-downloadbuffer.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gstreamer-plugins-capsfilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gstreamer-plugins-fakesrc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gstreamer-plugins-downloadbuffer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gstreamer-plugins-downloadbuffer.top_of_page"></a>downloadbuffer</span></h2>
<p>downloadbuffer</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gstreamer-plugins-downloadbuffer.properties"></a><h2>Properties</h2>
<div class="informaltable"><table border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--high-percent" title="The “high-percent” property">high-percent</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--low-percent" title="The “low-percent” property">low-percent</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
<td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--max-size-bytes" title="The “max-size-bytes” property">max-size-bytes</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">guint64</span></td>
<td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--max-size-time" title="The “max-size-time” property">max-size-time</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-location" title="The “temp-location” property">temp-location</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-remove" title="The “temp-remove” property">temp-remove</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer--temp-template" title="The “temp-template” property">temp-template</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<a name="GstDownloadBuffer"></a><div class="refsect1">
<a name="gstreamer-plugins-downloadbuffer.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gstreamer-plugins-downloadbuffer.html#GstDownloadBuffer-struct" title="struct GstDownloadBuffer">GstDownloadBuffer</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gstreamer-plugins-downloadbuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
<span class="lineart">╰──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
<span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
<span class="lineart">╰──</span> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
<span class="lineart">╰──</span> GstDownloadBuffer
</pre>
</div>
<div class="refsect1">
<a name="gstreamer-plugins-downloadbuffer.description"></a><h2>Description</h2>
<p>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.</p>
<p>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 emiting BUFFERING messages until high-percent of max is
reached again.</p>
<p>The downloadbuffer provides push and pull based scheduling on its source pad
and will efficiently seek in the upstream element when needed.</p>
<p>The temp-location property will be used to notify the application of the
allocated filename.</p>
<p>When the downloadbuffer has completely downloaded the media, it will
post an application message named <code class="classname">"GstCacheDownloadComplete"</code>
with the following information:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
G_TYPE_STRING
<code class="classname">"location"</code>:
the location of the completely downloaded file.
</p></li></ul></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="refsect2">
<a name="id-1.2.3.7.8.1"></a><h3>Element Information</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">plugin</span></p></td>
<td>
<a class="link" href="gstreamer-plugins-plugin-coreelements.html#plugin-coreelements">coreelements</a>
</td>
</tr>
<tr>
<td><p><span class="term">author</span></p></td>
<td>Wim Taymans &lt;wim.taymans@gmail.com&gt;</td>
</tr>
<tr>
<td><p><span class="term">class</span></p></td>
<td>Generic</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="id-1.2.3.7.8.2"></a><h3>Element Pads</h3>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>sink</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>ANY</td>
</tr>
</tbody>
</table></div>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term">name</span></p></td>
<td>src</td>
</tr>
<tr>
<td><p><span class="term">direction</span></p></td>
<td>source</td>
</tr>
<tr>
<td><p><span class="term">presence</span></p></td>
<td>always</td>
</tr>
<tr>
<td><p><span class="term">details</span></p></td>
<td>ANY</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gstreamer-plugins-downloadbuffer.functions_details"></a><h2>Functions</h2>
<p></p>
</div>
<div class="refsect1">
<a name="gstreamer-plugins-downloadbuffer.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstDownloadBuffer-struct"></a><h3>struct GstDownloadBuffer</h3>
<pre class="programlisting">struct GstDownloadBuffer;</pre>
</div>
</div>
<div class="refsect1">
<a name="gstreamer-plugins-downloadbuffer.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GstDownloadBuffer--high-percent"></a><h3>The <code class="literal">“high-percent”</code> property</h3>
<pre class="programlisting"> “high-percent” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>High threshold for buffering to finish. Only used if use-buffering is True.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [0,100]</p>
<p>Default value: 99</p>
</div>
<hr>
<div class="refsect2">
<a name="GstDownloadBuffer--low-percent"></a><h3>The <code class="literal">“low-percent”</code> property</h3>
<pre class="programlisting"> “low-percent” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Low threshold for buffering to start. Only used if use-buffering is True.</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [0,100]</p>
<p>Default value: 10</p>
</div>
<hr>
<div class="refsect2">
<a name="GstDownloadBuffer--max-size-bytes"></a><h3>The <code class="literal">“max-size-bytes”</code> property</h3>
<pre class="programlisting"> “max-size-bytes” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
<p>Max. amount of data to buffer (bytes, 0=disable).</p>
<p>Flags: Read / Write</p>
<p>Default value: 2097152</p>
</div>
<hr>
<div class="refsect2">
<a name="GstDownloadBuffer--max-size-time"></a><h3>The <code class="literal">“max-size-time”</code> property</h3>
<pre class="programlisting"> “max-size-time” <span class="type">guint64</span></pre>
<p>Max. amount of data to buffer (in ns, 0=disable).</p>
<p>Flags: Read / Write</p>
<p>Default value: 2000000000</p>
</div>
<hr>
<div class="refsect2">
<a name="GstDownloadBuffer--temp-location"></a><h3>The <code class="literal">“temp-location”</code> property</h3>
<pre class="programlisting"> “temp-location” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Location to store temporary files in (Only read this property, use temp-template to configure the name template).</p>
<p>Flags: Read</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GstDownloadBuffer--temp-remove"></a><h3>The <code class="literal">“temp-remove”</code> property</h3>
<pre class="programlisting"> “temp-remove” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>When temp-template is set, remove the temporary file when going to READY.</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2">
<a name="GstDownloadBuffer--temp-template"></a><h3>The <code class="literal">“temp-template”</code> property</h3>
<pre class="programlisting"> “temp-template” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>File template to store temporary files in, should contain directory and XXXXXX. (NULL == disabled).</p>
<p>Flags: Read / Write</p>
<p>Default value: NULL</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>