e99c799ccedfeeb4b294efda6bc3c4acee3c8694
[framework/multimedia/gst-plugins-base0.10.git] / docs / plugins / html / gst-plugins-base-plugins-appsink.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>appsink</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GStreamer Base Plugins 0.10 Plugins Reference Manual">
8 <link rel="up" href="ch01.html" title="gst-plugins-base Elements">
9 <link rel="prev" href="gst-plugins-base-plugins-appsrc.html" title="appsrc">
10 <link rel="next" href="gst-plugins-base-plugins-alsamixer.html" title="alsamixer">
11 <meta name="generator" content="GTK-Doc V1.17 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gst-plugins-base-plugins-appsrc.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Base Plugins 0.10 Plugins Reference Manual</th>
21 <td><a accesskey="n" href="gst-plugins-base-plugins-alsamixer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-plugins-appsink.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-plugins-appsink.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-base-plugins-appsink.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-base-plugins-appsink.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#gst-plugins-base-plugins-appsink.properties" class="shortcut">Properties</a>
33                    | 
34                   <a href="#gst-plugins-base-plugins-appsink.signals" class="shortcut">Signals</a>
35 </td></tr>
36 </table>
37 <div class="refentry">
38 <a name="gst-plugins-base-plugins-appsink"></a><div class="titlepage"></div>
39 <div class="refnamediv"><table width="100%"><tr>
40 <td valign="top">
41 <h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-appsink.top_of_page"></a>appsink</span></h2>
42 <p>appsink — Allow the application to get access to raw buffer</p>
43 </td>
44 <td valign="top" align="right"></td>
45 </tr></table></div>
46 <div class="refsynopsisdiv">
47 <a name="gst-plugins-base-plugins-appsink.synopsis"></a><h2>Synopsis</h2>
48 <a name="GstAppSink"></a><pre class="synopsis">struct              <a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink-struct" title="struct GstAppSink">GstAppSink</a>;
49 </pre>
50 </div>
51 <div class="refsect1">
52 <a name="gst-plugins-base-plugins-appsink.object-hierarchy"></a><h2>Object Hierarchy</h2>
53 <pre class="synopsis">
54   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
55    +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
56          +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
57                +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSink.html">GstBaseSink</a>
58                      +----GstAppSink
59 </pre>
60 </div>
61 <div class="refsect1">
62 <a name="gst-plugins-base-plugins-appsink.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
63 <p>
64 GstAppSink implements
65  <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstUriHandler.html#GstURIHandler">GstURIHandler</a>.</p>
66 </div>
67 <div class="refsect1">
68 <a name="gst-plugins-base-plugins-appsink.properties"></a><h2>Properties</h2>
69 <pre class="synopsis">
70   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink--caps" title='The "caps" property'>caps</a>"                     <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a>*              : Read / Write
71   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink--drop" title='The "drop" property'>drop</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
72   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink--emit-signals" title='The "emit-signals" property'>emit-signals</a>"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
73   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink--eos" title='The "eos" property'>eos</a>"                      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read
74   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink--max-buffers" title='The "max-buffers" property'>max-buffers</a>"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write
75 </pre>
76 </div>
77 <div class="refsect1">
78 <a name="gst-plugins-base-plugins-appsink.signals"></a><h2>Signals</h2>
79 <pre class="synopsis">
80   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink-eos" title='The "eos" signal'>eos</a>"                                            : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
81   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink-new-buffer" title='The "new-buffer" signal'>new-buffer</a>"                                     : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
82   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink-new-preroll" title='The "new-preroll" signal'>new-preroll</a>"                                    : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
83   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink-pull-buffer" title='The "pull-buffer" signal'>pull-buffer</a>"                                    : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a>
84   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink-pull-preroll" title='The "pull-preroll" signal'>pull-preroll</a>"                                   : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a>
85   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink-new-buffer-list" title='The "new-buffer-list" signal'>new-buffer-list</a>"                                : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a>
86   "<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink-pull-buffer-list" title='The "pull-buffer-list" signal'>pull-buffer-list</a>"                               : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a>
87 </pre>
88 </div>
89 <div class="refsect1">
90 <a name="gst-plugins-base-plugins-appsink.description"></a><h2>Description</h2>
91 <p>
92 Appsink is a sink plugin that supports many different methods for making
93 the application get a handle on the GStreamer data in a pipeline. Unlike
94 most GStreamer elements, Appsink provides external API functions.
95 </p>
96 <p>
97 For the documentation of the API, please see the
98 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html">libgstapp</a> section in
99 the GStreamer Plugins Base Libraries documentation.
100 </p>
101 <div class="refsynopsisdiv">
102 <h2>Synopsis</h2>
103 <div class="refsect2">
104 <a name="idp9669776"></a><h3>Element Information</h3>
105 <div class="variablelist"><table border="0">
106 <col align="left" valign="top">
107 <tbody>
108 <tr>
109 <td><p><span class="term">plugin</span></p></td>
110 <td>
111             <a class="link" href="gst-plugins-base-plugins-plugin-app.html#plugin-app">app</a>
112           </td>
113 </tr>
114 <tr>
115 <td><p><span class="term">author</span></p></td>
116 <td>David Schleef &lt;ds@schleef.org&gt;, Wim Taymans &lt;wim.taymans@gmail.com&gt;</td>
117 </tr>
118 <tr>
119 <td><p><span class="term">class</span></p></td>
120 <td>Generic/Sink</td>
121 </tr>
122 </tbody>
123 </table></div>
124 </div>
125 <hr>
126 <div class="refsect2">
127 <a name="idp9677184"></a><h3>Element Pads</h3>
128 <div class="variablelist"><table border="0">
129 <col align="left" valign="top">
130 <tbody>
131 <tr>
132 <td><p><span class="term">name</span></p></td>
133 <td>sink</td>
134 </tr>
135 <tr>
136 <td><p><span class="term">direction</span></p></td>
137 <td>sink</td>
138 </tr>
139 <tr>
140 <td><p><span class="term">presence</span></p></td>
141 <td>always</td>
142 </tr>
143 <tr>
144 <td><p><span class="term">details</span></p></td>
145 <td>ANY</td>
146 </tr>
147 </tbody>
148 </table></div>
149 </div>
150 </div>
151 <p>
152 </p>
153 </div>
154 <div class="refsect1">
155 <a name="gst-plugins-base-plugins-appsink.details"></a><h2>Details</h2>
156 <div class="refsect2">
157 <a name="GstAppSink-struct"></a><h3>struct GstAppSink</h3>
158 <pre class="programlisting">struct GstAppSink;</pre>
159 <p>
160 </p>
161 </div>
162 </div>
163 <div class="refsect1">
164 <a name="gst-plugins-base-plugins-appsink.property-details"></a><h2>Property Details</h2>
165 <div class="refsect2">
166 <a name="GstAppSink--caps"></a><h3>The <code class="literal">"caps"</code> property</h3>
167 <pre class="programlisting">  "caps"                     <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a>*              : Read / Write</pre>
168 <p>The allowed caps for the sink pad.</p>
169 </div>
170 <hr>
171 <div class="refsect2">
172 <a name="GstAppSink--drop"></a><h3>The <code class="literal">"drop"</code> property</h3>
173 <pre class="programlisting">  "drop"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
174 <p>Drop old buffers when the buffer queue is filled.</p>
175 <p>Default value: FALSE</p>
176 </div>
177 <hr>
178 <div class="refsect2">
179 <a name="GstAppSink--emit-signals"></a><h3>The <code class="literal">"emit-signals"</code> property</h3>
180 <pre class="programlisting">  "emit-signals"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
181 <p>Emit new-preroll, new-buffer and new-buffer-list signals.</p>
182 <p>Default value: FALSE</p>
183 </div>
184 <hr>
185 <div class="refsect2">
186 <a name="GstAppSink--eos"></a><h3>The <code class="literal">"eos"</code> property</h3>
187 <pre class="programlisting">  "eos"                      <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read</pre>
188 <p>Check if the sink is EOS or not started.</p>
189 <p>Default value: TRUE</p>
190 </div>
191 <hr>
192 <div class="refsect2">
193 <a name="GstAppSink--max-buffers"></a><h3>The <code class="literal">"max-buffers"</code> property</h3>
194 <pre class="programlisting">  "max-buffers"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read / Write</pre>
195 <p>The maximum number of buffers to queue internally (0 = unlimited).</p>
196 <p>Default value: 0</p>
197 </div>
198 </div>
199 <div class="refsect1">
200 <a name="gst-plugins-base-plugins-appsink.signal-details"></a><h2>Signal Details</h2>
201 <div class="refsect2">
202 <a name="GstAppSink-eos"></a><h3>The <code class="literal">"eos"</code> signal</h3>
203 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink,
204                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
205 <p>
206 Signal that the end-of-stream has been reached. This signal is emited from
207 the steaming thread.
208 </p>
209 <div class="variablelist"><table border="0">
210 <col align="left" valign="top">
211 <tbody>
212 <tr>
213 <td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
214 <td>the appsink element that emited the signal</td>
215 </tr>
216 <tr>
217 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
218 <td>user data set when the signal handler was connected.</td>
219 </tr>
220 </tbody>
221 </table></div>
222 </div>
223 <hr>
224 <div class="refsect2">
225 <a name="GstAppSink-new-buffer"></a><h3>The <code class="literal">"new-buffer"</code> signal</h3>
226 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink,
227                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
228 <p>
229 Signal that a new buffer is available.
230 </p>
231 <p>
232 This signal is emited from the steaming thread and only when the
233 "emit-signals" property is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
234 </p>
235 <p>
236 The new buffer can be retrieved with the "pull-buffer" action
237 signal or <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html#gst-app-sink-pull-buffer"><code class="function">gst_app_sink_pull_buffer()</code></a> either from this signal callback
238 or from any other thread.
239 </p>
240 <p>
241 Note that this signal is only emited when the "emit-signals" property is
242 set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, which it is not by default for performance reasons.
243 </p>
244 <div class="variablelist"><table border="0">
245 <col align="left" valign="top">
246 <tbody>
247 <tr>
248 <td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
249 <td>the appsink element that emited the signal</td>
250 </tr>
251 <tr>
252 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
253 <td>user data set when the signal handler was connected.</td>
254 </tr>
255 </tbody>
256 </table></div>
257 </div>
258 <hr>
259 <div class="refsect2">
260 <a name="GstAppSink-new-preroll"></a><h3>The <code class="literal">"new-preroll"</code> signal</h3>
261 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink,
262                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
263 <p>
264 Signal that a new preroll buffer is available. 
265 </p>
266 <p>
267 This signal is emited from the steaming thread and only when the
268 "emit-signals" property is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. 
269 </p>
270 <p>
271 The new preroll buffer can be retrieved with the "pull-preroll" action
272 signal or <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html#gst-app-sink-pull-preroll"><code class="function">gst_app_sink_pull_preroll()</code></a> either from this signal callback
273 or from any other thread.
274 </p>
275 <p>
276 Note that this signal is only emited when the "emit-signals" property is
277 set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, which it is not by default for performance reasons.
278 </p>
279 <div class="variablelist"><table border="0">
280 <col align="left" valign="top">
281 <tbody>
282 <tr>
283 <td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
284 <td>the appsink element that emited the signal</td>
285 </tr>
286 <tr>
287 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
288 <td>user data set when the signal handler was connected.</td>
289 </tr>
290 </tbody>
291 </table></div>
292 </div>
293 <hr>
294 <div class="refsect2">
295 <a name="GstAppSink-pull-buffer"></a><h3>The <code class="literal">"pull-buffer"</code> signal</h3>
296 <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="returnvalue">GstBuffer</span></a>*          user_function                      (<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink,
297                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a></pre>
298 <p>
299 This function blocks until a buffer or EOS becomes available or the appsink
300 element is set to the READY/NULL state. 
301 </p>
302 <p>
303 This function will only return buffers when the appsink is in the PLAYING
304 state. All rendered buffers will be put in a queue so that the application
305 can pull buffers at its own rate. 
306 </p>
307 <p>
308 Note that when the application does not pull buffers fast enough, the
309 queued buffers could consume a lot of memory, especially when dealing with
310 raw video frames. It's possible to control the behaviour of the queue with
311 the "drop" and "max-buffers" properties.
312 </p>
313 <p>
314 If an EOS event was received before any buffers, this function returns
315 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos"><code class="function">gst_app_sink_is_eos()</code></a> to check for the EOS condition.
316 </p>
317 <div class="variablelist"><table border="0">
318 <col align="left" valign="top">
319 <tbody>
320 <tr>
321 <td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
322 <td>the appsink element to emit this signal on</td>
323 </tr>
324 <tr>
325 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
326 <td>user data set when the signal handler was connected.</td>
327 </tr>
328 <tr>
329 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
330 <td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> or NULL when the appsink is stopped or EOS.</td>
331 </tr>
332 </tbody>
333 </table></div>
334 </div>
335 <hr>
336 <div class="refsect2">
337 <a name="GstAppSink-pull-preroll"></a><h3>The <code class="literal">"pull-preroll"</code> signal</h3>
338 <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="returnvalue">GstBuffer</span></a>*          user_function                      (<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink,
339                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a></pre>
340 <p>
341 Get the last preroll buffer in <em class="parameter"><code>appsink</code></em>. This was the buffer that caused the
342 appsink to preroll in the PAUSED state. This buffer can be pulled many times
343 and remains available to the application even after EOS.
344 </p>
345 <p>
346 This function is typically used when dealing with a pipeline in the PAUSED
347 state. Calling this function after doing a seek will give the buffer right
348 after the seek position.
349 </p>
350 <p>
351 Note that the preroll buffer will also be returned as the first buffer
352 when calling <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html#gst-app-sink-pull-buffer"><code class="function">gst_app_sink_pull_buffer()</code></a> or the "pull-buffer" action signal.
353 </p>
354 <p>
355 If an EOS event was received before any buffers, this function returns
356 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos"><code class="function">gst_app_sink_is_eos()</code></a> to check for the EOS condition. 
357 </p>
358 <p>
359 This function blocks until a preroll buffer or EOS is received or the appsink
360 element is set to the READY/NULL state.
361 </p>
362 <div class="variablelist"><table border="0">
363 <col align="left" valign="top">
364 <tbody>
365 <tr>
366 <td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
367 <td>the appsink element to emit this signal on</td>
368 </tr>
369 <tr>
370 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
371 <td>user data set when the signal handler was connected.</td>
372 </tr>
373 <tr>
374 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
375 <td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBuffer.html#GstBuffer"><span class="type">GstBuffer</span></a> or NULL when the appsink is stopped or EOS.</td>
376 </tr>
377 </tbody>
378 </table></div>
379 </div>
380 <hr>
381 <div class="refsect2">
382 <a name="GstAppSink-new-buffer-list"></a><h3>The <code class="literal">"new-buffer-list"</code> signal</h3>
383 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink,
384                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS"><code class="literal">Run Last</code></a></pre>
385 <p>
386 Signal that a new bufferlist is available.
387 </p>
388 <p>
389 This signal is emited from the steaming thread and only when the
390 "emit-signals" property is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. 
391 </p>
392 <p>
393 The new buffer can be retrieved with the "pull-buffer-list" action
394 signal or <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html#gst-app-sink-pull-buffer-list"><code class="function">gst_app_sink_pull_buffer_list()</code></a> either from this signal callback
395 or from any other thread.
396 </p>
397 <p>
398 Note that this signal is only emited when the "emit-signals" property is
399 set to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, which it is not by default for performance reasons.
400 </p>
401 <div class="variablelist"><table border="0">
402 <col align="left" valign="top">
403 <tbody>
404 <tr>
405 <td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
406 <td>the appsink element that emited the signal</td>
407 </tr>
408 <tr>
409 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
410 <td>user data set when the signal handler was connected.</td>
411 </tr>
412 </tbody>
413 </table></div>
414 </div>
415 <hr>
416 <div class="refsect2">
417 <a name="GstAppSink-pull-buffer-list"></a><h3>The <code class="literal">"pull-buffer-list"</code> signal</h3>
418 <pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBufferList.html#GstBufferList"><span class="returnvalue">GstBufferList</span></a>*      user_function                      (<a class="link" href="gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink,
419                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a></pre>
420 <p>
421 This function blocks until a buffer list or EOS becomes available or the appsink
422 element is set to the READY/NULL state. 
423 </p>
424 <p>
425 This function will only return bufferlists when the appsink is in the PLAYING
426 state. All rendered bufferlists will be put in a queue so that the application
427 can pull bufferlists at its own rate. 
428 </p>
429 <p>
430 Note that when the application does not pull bufferlists fast enough, the
431 queued bufferlists could consume a lot of memory, especially when dealing with
432 raw video frames. It's possible to control the behaviour of the queue with
433 the "drop" and "max-buffers" properties.
434 </p>
435 <p>
436 If an EOS event was received before any buffers, this function returns
437 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos"><code class="function">gst_app_sink_is_eos()</code></a> to check for the EOS condition.
438 </p>
439 <div class="variablelist"><table border="0">
440 <col align="left" valign="top">
441 <tbody>
442 <tr>
443 <td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
444 <td>the appsink element to emit this signal on</td>
445 </tr>
446 <tr>
447 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
448 <td>user data set when the signal handler was connected.</td>
449 </tr>
450 <tr>
451 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
452 <td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstBufferList.html#GstBufferList"><span class="type">GstBufferList</span></a> or NULL when the appsink is stopped or EOS.</td>
453 </tr>
454 </tbody>
455 </table></div>
456 </div>
457 </div>
458 </div>
459 <div class="footer">
460 <hr>
461           Generated by GTK-Doc V1.17</div>
462 </body>
463 </html>