blob: 8ca07d7f7243801e86b9dfaa0f5cd32114cddb78 [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>GstBufferPool</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GStreamer 0.11 Core Reference Manual">
<link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
<link rel="prev" href="gstreamer-GstBufferList.html" title="GstBufferList">
<link rel="next" href="GstBus.html" title="GstBus">
<meta name="generator" content="GTK-Doc V1.18 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="gstreamer-GstBufferList.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GStreamer 0.11 Core Reference Manual</th>
<td><a accesskey="n" href="GstBus.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gstreamer-GstBufferPool.synopsis" class="shortcut">Top</a>
 | 
<a href="#gstreamer-GstBufferPool.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gstreamer-GstBufferPool"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gstreamer-GstBufferPool.top_of_page"></a>GstBufferPool</span></h2>
<p>GstBufferPool — Pool for buffers</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gstreamer-GstBufferPool.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gst/gst.h&gt;
<a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool">GstBufferPool</a>;
struct <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPoolClass" title="struct GstBufferPoolClass">GstBufferPoolClass</a>;
enum <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPoolFlags" title="enum GstBufferPoolFlags">GstBufferPoolFlags</a>;
#define <a class="link" href="gstreamer-GstBufferPool.html#GST-BUFFER-POOL-IS-FLUSHING:CAPS" title="GST_BUFFER_POOL_IS_FLUSHING()">GST_BUFFER_POOL_IS_FLUSHING</a> (pool)
<a class="link" href="gstreamer-GstBufferPool.html#GstBufferPoolParams" title="GstBufferPoolParams">GstBufferPoolParams</a>;
<a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="returnvalue">GstBufferPool</span></a> * <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-new" title="gst_buffer_pool_new ()">gst_buffer_pool_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-config-get" title="gst_buffer_pool_config_get ()">gst_buffer_pool_config_get</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> **caps</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *size</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *min_buffers</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *max_buffers</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *prefix</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *align</code></em>);
<span class="returnvalue">void</span> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-config-set" title="gst_buffer_pool_config_set ()">gst_buffer_pool_config_set</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> size</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> min_buffers</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> max_buffers</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> prefix</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> align</code></em>);
<span class="returnvalue">void</span> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-config-add-option" title="gst_buffer_pool_config_add_option ()">gst_buffer_pool_config_add_option</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *option</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-config-get-option" title="gst_buffer_pool_config_get_option ()">gst_buffer_pool_config_get_option</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-config-has-option" title="gst_buffer_pool_config_has_option ()">gst_buffer_pool_config_has_option</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *option</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-config-n-options" title="gst_buffer_pool_config_n_options ()">gst_buffer_pool_config_n_options</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-get-options" title="gst_buffer_pool_get_options ()">gst_buffer_pool_get_options</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-has-option" title="gst_buffer_pool_has_option ()">gst_buffer_pool_has_option</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *option</code></em>);
<a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="returnvalue">GstStructure</span></a> * <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-get-config" title="gst_buffer_pool_get_config ()">gst_buffer_pool_get_config</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-set-config" title="gst_buffer_pool_set_config ()">gst_buffer_pool_set_config</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-set-active" title="gst_buffer_pool_set_active ()">gst_buffer_pool_set_active</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> active</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-is-active" title="gst_buffer_pool_is_active ()">gst_buffer_pool_is_active</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>);
<a class="link" href="GstPad.html#GstFlowReturn" title="enum GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-acquire-buffer" title="gst_buffer_pool_acquire_buffer ()">gst_buffer_pool_acquire_buffer</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> **buffer</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPoolParams" title="GstBufferPoolParams"><span class="type">GstBufferPoolParams</span></a> *params</code></em>);
<span class="returnvalue">void</span> <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-release-buffer" title="gst_buffer_pool_release_buffer ()">gst_buffer_pool_release_buffer</a> (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gstreamer-GstBufferPool.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="gstreamer-GstBufferPool.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GstBufferPool"></a><h3>GstBufferPool</h3>
<pre class="programlisting">typedef struct {
GstObject object;
} GstBufferPool;
</pre>
<p>
The structure of a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>. Use the associated macros to access the public
variables.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> <em class="structfield"><code><a name="GstBufferPool.object"></a>object</code></em>;</span></p></td>
<td>the parent structure</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstBufferPoolClass"></a><h3>struct GstBufferPoolClass</h3>
<pre class="programlisting">struct GstBufferPoolClass {
GstObjectClass object_class;
/* vmethods */
const gchar ** (*get_options) (GstBufferPool *pool);
gboolean (*set_config) (GstBufferPool *pool, GstStructure *config);
gboolean (*start) (GstBufferPool *pool);
gboolean (*stop) (GstBufferPool *pool);
GstFlowReturn (*acquire_buffer) (GstBufferPool *pool, GstBuffer **buffer,
GstBufferPoolParams *params);
GstFlowReturn (*alloc_buffer) (GstBufferPool *pool, GstBuffer **buffer,
GstBufferPoolParams *params);
void (*reset_buffer) (GstBufferPool *pool, GstBuffer *buffer,
GstBufferPoolParams *params);
void (*release_buffer) (GstBufferPool *pool, GstBuffer *buffer);
void (*free_buffer) (GstBufferPool *pool, GstBuffer *buffer);
};
</pre>
<p>
The GstBufferPool class.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="GstObject.html#GstObjectClass" title="struct GstObjectClass"><span class="type">GstObjectClass</span></a> <em class="structfield"><code><a name="GstBufferPoolClass.object-class"></a>object_class</code></em>;</span></p></td>
<td>Object parent class</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.get-options"></a>get_options</code></em> ()</span></p></td>
<td>get a list of options supported by this pool</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.set-config"></a>set_config</code></em> ()</span></p></td>
<td>apply the bufferpool configuration. The default configuration
will parse the default config parameters</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.start"></a>start</code></em> ()</span></p></td>
<td>start the bufferpool. The default implementation will preallocate
min-buffers buffers and put them in the queue</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.stop"></a>stop</code></em> ()</span></p></td>
<td>stop the bufferpool. the default implementation will free the
preallocated buffers. This function is called when all the buffers are
returned to the pool.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.acquire-buffer"></a>acquire_buffer</code></em> ()</span></p></td>
<td>get a new buffer from the pool. The default implementation
will take a buffer from the queue and optionally wait for a buffer to
be released when there are no buffers available.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.alloc-buffer"></a>alloc_buffer</code></em> ()</span></p></td>
<td>allocate a buffer. the default implementation allocates
buffers from the default memory allocator and with the configured
size, prefix and alignment.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.reset-buffer"></a>reset_buffer</code></em> ()</span></p></td>
<td>reset the buffer to its state when it was freshly allocated.
The default implementation will clear the flags and timestamps.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.release-buffer"></a>release_buffer</code></em> ()</span></p></td>
<td>release a buffer back in the pool. The default
implementation will put the buffer back in the queue and notify any
blocking acquire_buffer calls.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstBufferPoolClass.free-buffer"></a>free_buffer</code></em> ()</span></p></td>
<td>free a buffer. The default implementation unrefs the buffer.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstBufferPoolFlags"></a><h3>enum GstBufferPoolFlags</h3>
<pre class="programlisting">typedef enum {
GST_BUFFER_POOL_FLAG_NONE = 0,
GST_BUFFER_POOL_FLAG_KEY_UNIT = (1 &lt;&lt; 0),
GST_BUFFER_POOL_FLAG_DONTWAIT = (1 &lt;&lt; 1),
GST_BUFFER_POOL_FLAG_DISCONT = (1 &lt;&lt; 2),
GST_BUFFER_POOL_FLAG_LAST = (1 &lt;&lt; 16),
} GstBufferPoolFlags;
</pre>
<p>
Additional flags to control the allocation of a buffer
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GST-BUFFER-POOL-FLAG-NONE:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_POOL_FLAG_NONE</code></span></p></td>
<td>no flags
</td>
</tr>
<tr>
<td><p><a name="GST-BUFFER-POOL-FLAG-KEY-UNIT:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_POOL_FLAG_KEY_UNIT</code></span></p></td>
<td>buffer is keyframe
</td>
</tr>
<tr>
<td><p><a name="GST-BUFFER-POOL-FLAG-DONTWAIT:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_POOL_FLAG_DONTWAIT</code></span></p></td>
<td>don't wait for buffer. This makes the
acquire_buffer method return GST_FLOW_UNEXPECTED.
</td>
</tr>
<tr>
<td><p><a name="GST-BUFFER-POOL-FLAG-DISCONT:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_POOL_FLAG_DISCONT</code></span></p></td>
<td>buffer is discont
</td>
</tr>
<tr>
<td><p><a name="GST-BUFFER-POOL-FLAG-LAST:CAPS"></a><span class="term"><code class="literal">GST_BUFFER_POOL_FLAG_LAST</code></span></p></td>
<td>last flag, subclasses can use private flags
starting from this value.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-BUFFER-POOL-IS-FLUSHING:CAPS"></a><h3>GST_BUFFER_POOL_IS_FLUSHING()</h3>
<pre class="programlisting">#define GST_BUFFER_POOL_IS_FLUSHING(pool) (g_atomic_int_get (&amp;pool-&gt;flushing))
</pre>
<p>
Check if the bufferpool is flushing. Subclasses might want to check the
state of the pool in the acquire function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a GstBufferPool</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstBufferPoolParams"></a><h3>GstBufferPoolParams</h3>
<pre class="programlisting">typedef struct {
GstFormat format;
gint64 start;
gint64 stop;
GstBufferPoolFlags flags;
} GstBufferPoolParams;
</pre>
<p>
Parameters passed to the <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-acquire-buffer" title="gst_buffer_pool_acquire_buffer ()"><code class="function">gst_buffer_pool_acquire_buffer()</code></a> function to control the
allocation of the buffer.
</p>
<p>
The default implementation ignores the <em class="parameter"><code>start</code></em> and <em class="parameter"><code>stop</code></em> members but other
implementations can use this extra information to decide what buffer to
return.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="gstreamer-GstFormat.html#GstFormat" title="enum GstFormat"><span class="type">GstFormat</span></a> <em class="structfield"><code><a name="GstBufferPoolParams.format"></a>format</code></em>;</span></p></td>
<td>the format of <em class="parameter"><code>start</code></em> and <em class="parameter"><code>stop</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> <em class="structfield"><code><a name="GstBufferPoolParams.start"></a>start</code></em>;</span></p></td>
<td>the start position</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a> <em class="structfield"><code><a name="GstBufferPoolParams.stop"></a>stop</code></em>;</span></p></td>
<td>the stop position</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPoolFlags" title="enum GstBufferPoolFlags"><span class="type">GstBufferPoolFlags</span></a> <em class="structfield"><code><a name="GstBufferPoolParams.flags"></a>flags</code></em>;</span></p></td>
<td>additional flags</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-new"></a><h3>gst_buffer_pool_new ()</h3>
<pre class="programlisting"><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="returnvalue">GstBufferPool</span></a> * gst_buffer_pool_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> instance.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> instance</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-config-get"></a><h3>gst_buffer_pool_config_get ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_pool_config_get (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> **caps</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *size</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *min_buffers</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *max_buffers</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *prefix</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> *align</code></em>);</pre>
<p>
Get the configuration values from <em class="parameter"><code>config</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>config</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> configuration</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
<td>the caps of buffers</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>the size of each buffer, not including prefix</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>min_buffers</code></em> :</span></p></td>
<td>the minimum amount of buffers to allocate.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_buffers</code></em> :</span></p></td>
<td>the maximum amount of buffers to allocate or 0 for unlimited.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>prefix each buffer with this many bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>align</code></em> :</span></p></td>
<td>alignment of the buffer data.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-config-set"></a><h3>gst_buffer_pool_config_set ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gst_buffer_pool_config_set (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> size</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> min_buffers</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> max_buffers</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> prefix</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> align</code></em>);</pre>
<p>
Configure <em class="parameter"><code>config</code></em> with the given parameters.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>config</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> configuration</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
<td>caps for the buffers</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>the size of each buffer, not including prefix</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>min_buffers</code></em> :</span></p></td>
<td>the minimum amount of buffers to allocate.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_buffers</code></em> :</span></p></td>
<td>the maximum amount of buffers to allocate or 0 for unlimited.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>prefix each buffer with this many bytes</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>align</code></em> :</span></p></td>
<td>alignment of the buffer data.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-config-add-option"></a><h3>gst_buffer_pool_config_add_option ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gst_buffer_pool_config_add_option (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *option</code></em>);</pre>
<p>
Enabled the option in <em class="parameter"><code>config</code></em>. This will instruct the <em class="parameter"><code>bufferpool</code></em> to enable
the specified option on the buffers that it allocates.
</p>
<p>
The supported options by <em class="parameter"><code>pool</code></em> can be retrieved with <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-get-options" title="gst_buffer_pool_get_options ()"><code class="function">gst_buffer_pool_get_options()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>config</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> configuration</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>option</code></em> :</span></p></td>
<td>an option to add</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-config-get-option"></a><h3>gst_buffer_pool_config_get_option ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_buffer_pool_config_get_option (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> index</code></em>);</pre>
<p>
Parse an available <em class="parameter"><code>config</code></em> and get the option
at <em class="parameter"><code>index</code></em> of the options API array.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>config</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> configuration</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>index</code></em> :</span></p></td>
<td>position in the option array to read</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> of the option at <em class="parameter"><code>index</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-config-has-option"></a><h3>gst_buffer_pool_config_has_option ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_pool_config_has_option (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *option</code></em>);</pre>
<p>
Check if <em class="parameter"><code>config</code></em> contains <em class="parameter"><code>option</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>config</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> configuration</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>option</code></em> :</span></p></td>
<td>an option</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if the options array contains <em class="parameter"><code>option</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-config-n-options"></a><h3>gst_buffer_pool_config_n_options ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gst_buffer_pool_config_n_options (<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>);</pre>
<p>
Retrieve the number of values currently stored in the
options array of the <em class="parameter"><code>config</code></em> structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>config</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> configuration</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the options array size as a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-get-options"></a><h3>gst_buffer_pool_get_options ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> ** gst_buffer_pool_get_options (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>);</pre>
<p>
Get a NULL terminated array of string with supported bufferpool options for
<em class="parameter"><code>pool</code></em>. An option would typically be enabled with
<a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-config-add-option" title="gst_buffer_pool_config_add_option ()"><code class="function">gst_buffer_pool_config_add_option()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a NULL terminated array of strings.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-has-option"></a><h3>gst_buffer_pool_has_option ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_pool_has_option (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *option</code></em>);</pre>
<p>
Check if the bufferpool supports <em class="parameter"><code>option</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>option</code></em> :</span></p></td>
<td>an option</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a NULL terminated array of strings.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-get-config"></a><h3>gst_buffer_pool_get_config ()</h3>
<pre class="programlisting"><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="returnvalue">GstStructure</span></a> * gst_buffer_pool_get_config (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>);</pre>
<p>
Get a copy of the current configuration of the pool. This configuration
can either be modified and used for the <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-set-config" title="gst_buffer_pool_set_config ()"><code class="function">gst_buffer_pool_set_config()</code></a> call
or it must be freed after usage.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a copy of the current configuration of <em class="parameter"><code>pool</code></em>. use
<a class="link" href="gstreamer-GstStructure.html#gst-structure-free" title="gst_structure_free ()"><code class="function">gst_structure_free()</code></a> after usage or <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-set-config" title="gst_buffer_pool_set_config ()"><code class="function">gst_buffer_pool_set_config()</code></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-set-config"></a><h3>gst_buffer_pool_set_config ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_pool_set_config (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> *config</code></em>);</pre>
<p>
Set the configuration of the pool. The pool must be inactive and all buffers
allocated form this pool must be returned or else this function will do
nothing and return FALSE.
</p>
<p>
<em class="parameter"><code>config</code></em> is a <a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a> that contains the configuration parameters for
the pool. A default and mandatory set of parameters can be configured with
<a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-config-set" title="gst_buffer_pool_config_set ()"><code class="function">gst_buffer_pool_config_set()</code></a>. This function takes ownership of <em class="parameter"><code>config</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>config</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstStructure.html#GstStructure" title="struct GstStructure"><span class="type">GstStructure</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE when the configuration could be set.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-set-active"></a><h3>gst_buffer_pool_set_active ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_pool_set_active (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> active</code></em>);</pre>
<p>
Control the active state of <em class="parameter"><code>pool</code></em>. When the pool is active, new calls to
<a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-acquire-buffer" title="gst_buffer_pool_acquire_buffer ()"><code class="function">gst_buffer_pool_acquire_buffer()</code></a> will return with GST_FLOW_WRONG_STATE.
</p>
<p>
Activating the bufferpool will preallocate all resources in the pool based on
the configuration of the pool.
</p>
<p>
Deactivating will free the resources again when there are no outstanding
buffers. When there are outstanding buffers, they will be freed as soon as
they are all returned to the pool.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>active</code></em> :</span></p></td>
<td>the new active state</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> when the pool was not configured or when preallocation of the
buffers failed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-is-active"></a><h3>gst_buffer_pool_is_active ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_buffer_pool_is_active (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>);</pre>
<p>
Check if <em class="parameter"><code>pool</code></em> is active. A pool can be activated with the
<a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-set-active" title="gst_buffer_pool_set_active ()"><code class="function">gst_buffer_pool_set_active()</code></a> call.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when the pool is active.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-acquire-buffer"></a><h3>gst_buffer_pool_acquire_buffer ()</h3>
<pre class="programlisting"><a class="link" href="GstPad.html#GstFlowReturn" title="enum GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> gst_buffer_pool_acquire_buffer (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> **buffer</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPoolParams" title="GstBufferPoolParams"><span class="type">GstBufferPoolParams</span></a> *params</code></em>);</pre>
<p>
Acquire a buffer from <em class="parameter"><code>pool</code></em>. <em class="parameter"><code>buffer</code></em> should point to a memory location that
can hold a pointer to the new buffer.
</p>
<p>
<em class="parameter"><code>params</code></em> can be NULL or contain optional parameters to influence the allocation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a location for a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>parameters.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <a class="link" href="GstPad.html#GstFlowReturn" title="enum GstFlowReturn"><span class="type">GstFlowReturn</span></a> such as GST_FLOW_WRONG_STATE when the pool is
inactive.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-buffer-pool-release-buffer"></a><h3>gst_buffer_pool_release_buffer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gst_buffer_pool_release_buffer (<em class="parameter"><code><a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a> *pool</code></em>,
<em class="parameter"><code><a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>
Release <em class="parameter"><code>buffer</code></em> to <em class="parameter"><code>pool</code></em>. <em class="parameter"><code>buffer</code></em> should have previously been allocated from
<em class="parameter"><code>pool</code></em> with <a class="link" href="gstreamer-GstBufferPool.html#gst-buffer-pool-acquire-buffer" title="gst_buffer_pool_acquire_buffer ()"><code class="function">gst_buffer_pool_acquire_buffer()</code></a>.
</p>
<p>
This function is usually called automatically when the last ref on <em class="parameter"><code>buffer</code></em>
disappears.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pool</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBufferPool.html#GstBufferPool" title="GstBufferPool"><span class="type">GstBufferPool</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="gstreamer-GstBufferPool.see-also"></a><h2>See Also</h2>
<a class="link" href="gstreamer-GstBuffer.html#GstBuffer" title="struct GstBuffer"><span class="type">GstBuffer</span></a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>