~sipe-collab/sipe-collab/gstreamer-plugins-base

« back to all changes in this revision

Viewing changes to docs/libs/html/gst-plugins-base-libs-appsink.html

  • Committer: Sebastian Dröge
  • Date: 2014-04-19 13:47:47 UTC
  • mfrom: (1.1.23)
  • Revision ID: git-v1:d06393f82dba0d5f13ec2e66275d75cf8178fe5c
Merge tag 'upstream/1.2.4'

Upstream version 1.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<html>
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
 
<title>appsink</title>
 
5
<title>GStreamer Base Plugins 1.0 Library Reference Manual: appsink</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
8
8
<link rel="up" href="gstreamer-app.html" title="App Library">
9
9
<link rel="prev" href="gst-plugins-base-libs-appsrc.html" title="appsrc">
10
10
<link rel="next" href="gstreamer-audio.html" title="Audio Library">
11
 
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
</head>
14
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-libs-appsrc.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
 
<td><a accesskey="u" href="gstreamer-app.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 1.0 Library Reference Manual</th>
21
 
<td><a accesskey="n" href="gstreamer-audio.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-libs-appsink.synopsis" class="shortcut">Top</a>
25
 
                   | 
26
 
                  <a href="#gst-plugins-base-libs-appsink.description" class="shortcut">Description</a>
27
 
</td></tr>
28
 
</table>
 
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
 
16
<td width="100%" align="left" class="shortcuts">
 
17
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
 
18
                  <a href="#gst-plugins-base-libs-appsink.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
 
19
                  <a href="#gst-plugins-base-libs-appsink.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
 
20
</td>
 
21
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
 
22
<td><a accesskey="u" href="gstreamer-app.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
 
23
<td><a accesskey="p" href="gst-plugins-base-libs-appsrc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
 
24
<td><a accesskey="n" href="gstreamer-audio.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
 
25
</tr></table>
29
26
<div class="refentry">
30
27
<a name="gst-plugins-base-libs-appsink"></a><div class="titlepage"></div>
31
28
<div class="refnamediv"><table width="100%"><tr>
34
31
<p>appsink — Easy way for applications to extract samples from a
35
32
    pipeline</p>
36
33
</td>
37
 
<td valign="top" align="right"></td>
 
34
<td class="gallery_image" valign="top" align="right"></td>
38
35
</tr></table></div>
39
 
<div class="refsynopsisdiv">
40
 
<a name="gst-plugins-base-libs-appsink.synopsis"></a><h2>Synopsis</h2>
41
 
<pre class="synopsis">
42
 
#include &lt;gst/app/gstappsink.h&gt;
43
 
 
44
 
<span class="returnvalue">void</span>                <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-caps" title="gst_app_sink_set_caps ()">gst_app_sink_set_caps</a>               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
45
 
                                                         <em class="parameter"><code>const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);
46
 
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="returnvalue">GstCaps</span></a> *           <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-get-caps" title="gst_app_sink_get_caps ()">gst_app_sink_get_caps</a>               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);
47
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos" title="gst_app_sink_is_eos ()">gst_app_sink_is_eos</a>                 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);
48
 
<span class="returnvalue">void</span>                <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-emit-signals" title="gst_app_sink_set_emit_signals ()">gst_app_sink_set_emit_signals</a>       (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
49
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> emit</code></em>);
50
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-get-emit-signals" title="gst_app_sink_get_emit_signals ()">gst_app_sink_get_emit_signals</a>       (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);
51
 
<span class="returnvalue">void</span>                <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-max-buffers" title="gst_app_sink_set_max_buffers ()">gst_app_sink_set_max_buffers</a>        (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
52
 
                                                         <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</code></em>);
53
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-get-max-buffers" title="gst_app_sink_get_max_buffers ()">gst_app_sink_get_max_buffers</a>        (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);
54
 
<span class="returnvalue">void</span>                <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-drop" title="gst_app_sink_set_drop ()">gst_app_sink_set_drop</a>               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
55
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> drop</code></em>);
56
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-get-drop" title="gst_app_sink_get_drop ()">gst_app_sink_get_drop</a>               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);
57
 
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> *         <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-preroll" title="gst_app_sink_pull_preroll ()">gst_app_sink_pull_preroll</a>           (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);
58
 
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> *         <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-sample" title="gst_app_sink_pull_sample ()">gst_app_sink_pull_sample</a>            (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);
59
 
                    <a class="link" href="gst-plugins-base-libs-appsink.html#GstAppSinkCallbacks" title="GstAppSinkCallbacks">GstAppSinkCallbacks</a>;
60
 
<span class="returnvalue">void</span>                <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-callbacks" title="gst_app_sink_set_callbacks ()">gst_app_sink_set_callbacks</a>          (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
61
 
                                                         <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-appsink.html#GstAppSinkCallbacks" title="GstAppSinkCallbacks"><span class="type">GstAppSinkCallbacks</span></a> *callbacks</code></em>,
62
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
63
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);
 
36
<div class="refsect1">
 
37
<a name="gst-plugins-base-libs-appsink.functions"></a><h2>Functions</h2>
 
38
<div class="informaltable"><table width="100%" border="0">
 
39
<colgroup>
 
40
<col width="150px" class="functions_return">
 
41
<col class="functions_name">
 
42
</colgroup>
 
43
<tbody>
 
44
<tr>
 
45
<td class="function_type">
 
46
<span class="returnvalue">void</span>
 
47
</td>
 
48
<td class="function_name">
 
49
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-caps" title="gst_app_sink_set_caps ()">gst_app_sink_set_caps</a> <span class="c_punctuation">()</span>
 
50
</td>
 
51
</tr>
 
52
<tr>
 
53
<td class="function_type">
 
54
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="returnvalue">GstCaps</span></a> *
 
55
</td>
 
56
<td class="function_name">
 
57
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-get-caps" title="gst_app_sink_get_caps ()">gst_app_sink_get_caps</a> <span class="c_punctuation">()</span>
 
58
</td>
 
59
</tr>
 
60
<tr>
 
61
<td class="function_type">
 
62
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
63
</td>
 
64
<td class="function_name">
 
65
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos" title="gst_app_sink_is_eos ()">gst_app_sink_is_eos</a> <span class="c_punctuation">()</span>
 
66
</td>
 
67
</tr>
 
68
<tr>
 
69
<td class="function_type">
 
70
<span class="returnvalue">void</span>
 
71
</td>
 
72
<td class="function_name">
 
73
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-emit-signals" title="gst_app_sink_set_emit_signals ()">gst_app_sink_set_emit_signals</a> <span class="c_punctuation">()</span>
 
74
</td>
 
75
</tr>
 
76
<tr>
 
77
<td class="function_type">
 
78
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
79
</td>
 
80
<td class="function_name">
 
81
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-get-emit-signals" title="gst_app_sink_get_emit_signals ()">gst_app_sink_get_emit_signals</a> <span class="c_punctuation">()</span>
 
82
</td>
 
83
</tr>
 
84
<tr>
 
85
<td class="function_type">
 
86
<span class="returnvalue">void</span>
 
87
</td>
 
88
<td class="function_name">
 
89
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-max-buffers" title="gst_app_sink_set_max_buffers ()">gst_app_sink_set_max_buffers</a> <span class="c_punctuation">()</span>
 
90
</td>
 
91
</tr>
 
92
<tr>
 
93
<td class="function_type">
 
94
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
95
</td>
 
96
<td class="function_name">
 
97
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-get-max-buffers" title="gst_app_sink_get_max_buffers ()">gst_app_sink_get_max_buffers</a> <span class="c_punctuation">()</span>
 
98
</td>
 
99
</tr>
 
100
<tr>
 
101
<td class="function_type">
 
102
<span class="returnvalue">void</span>
 
103
</td>
 
104
<td class="function_name">
 
105
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-drop" title="gst_app_sink_set_drop ()">gst_app_sink_set_drop</a> <span class="c_punctuation">()</span>
 
106
</td>
 
107
</tr>
 
108
<tr>
 
109
<td class="function_type">
 
110
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
111
</td>
 
112
<td class="function_name">
 
113
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-get-drop" title="gst_app_sink_get_drop ()">gst_app_sink_get_drop</a> <span class="c_punctuation">()</span>
 
114
</td>
 
115
</tr>
 
116
<tr>
 
117
<td class="function_type">
 
118
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> *
 
119
</td>
 
120
<td class="function_name">
 
121
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-preroll" title="gst_app_sink_pull_preroll ()">gst_app_sink_pull_preroll</a> <span class="c_punctuation">()</span>
 
122
</td>
 
123
</tr>
 
124
<tr>
 
125
<td class="function_type">
 
126
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> *
 
127
</td>
 
128
<td class="function_name">
 
129
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-sample" title="gst_app_sink_pull_sample ()">gst_app_sink_pull_sample</a> <span class="c_punctuation">()</span>
 
130
</td>
 
131
</tr>
 
132
<tr>
 
133
<td class="function_type">
 
134
<span class="returnvalue">void</span>
 
135
</td>
 
136
<td class="function_name">
 
137
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-callbacks" title="gst_app_sink_set_callbacks ()">gst_app_sink_set_callbacks</a> <span class="c_punctuation">()</span>
 
138
</td>
 
139
</tr>
 
140
</tbody>
 
141
</table></div>
 
142
</div>
 
143
<div class="refsect1">
 
144
<a name="gst-plugins-base-libs-appsink.other"></a><h2>Types and Values</h2>
 
145
<div class="informaltable"><table width="100%" border="0">
 
146
<colgroup>
 
147
<col width="150px" class="name">
 
148
<col class="description">
 
149
</colgroup>
 
150
<tbody><tr>
 
151
<td class="datatype_keyword"> </td>
 
152
<td class="function_name"><a class="link" href="gst-plugins-base-libs-appsink.html#GstAppSinkCallbacks" title="GstAppSinkCallbacks">GstAppSinkCallbacks</a></td>
 
153
</tr></tbody>
 
154
</table></div>
 
155
</div>
 
156
<div class="refsect1">
 
157
<a name="gst-plugins-base-libs-appsink.object-hierarchy"></a><h2>Object Hierarchy</h2>
 
158
<pre class="screen">
 
159
</pre>
 
160
</div>
 
161
<div class="refsect1">
 
162
<a name="gst-plugins-base-libs-appsink.includes"></a><h2>Includes</h2>
 
163
<pre class="synopsis">#include &lt;gst/app/gstappsink.h&gt;
64
164
</pre>
65
165
</div>
66
166
<div class="refsect1">
67
167
<a name="gst-plugins-base-libs-appsink.description"></a><h2>Description</h2>
68
 
<p>
69
 
Appsink is a sink plugin that supports many different methods for making
 
168
<p>Appsink is a sink plugin that supports many different methods for making
70
169
the application get a handle on the GStreamer data in a pipeline. Unlike
71
 
most GStreamer elements, Appsink provides external API functions.
72
 
</p>
73
 
<p>
74
 
appsink can be used by linking to the gstappsink.h header file to access the
75
 
methods or by using the appsink action signals and properties.
76
 
</p>
77
 
<p>
78
 
The normal way of retrieving samples from appsink is by using the
79
 
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-sample" title="gst_app_sink_pull_sample ()"><code class="function">gst_app_sink_pull_sample()</code></a> and <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-preroll" title="gst_app_sink_pull_preroll ()"><code class="function">gst_app_sink_pull_preroll()</code></a> methods.
 
170
most GStreamer elements, Appsink provides external API functions.</p>
 
171
<p>appsink can be used by linking to the gstappsink.h header file to access the
 
172
methods or by using the appsink action signals and properties.</p>
 
173
<p>The normal way of retrieving samples from appsink is by using the
 
174
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-sample" title="gst_app_sink_pull_sample ()"><code class="function">gst_app_sink_pull_sample()</code></a> and <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-preroll" title="gst_app_sink_pull_preroll ()"><code class="function">gst_app_sink_pull_preroll()</code></a> methods.
80
175
These methods block until a sample becomes available in the sink or when the
81
 
sink is shut down or reaches EOS.
82
 
</p>
83
 
<p>
84
 
Appsink will internally use a queue to collect buffers from the streaming
 
176
sink is shut down or reaches EOS.</p>
 
177
<p>Appsink will internally use a queue to collect buffers from the streaming
85
178
thread. If the application is not pulling samples fast enough, this queue
86
179
will consume a lot of memory over time. The "max-buffers" property can be
87
180
used to limit the queue size. The "drop" property controls whether the
88
181
streaming thread blocks or if older buffers are dropped when the maximum
89
182
queue size is reached. Note that blocking the streaming thread can negatively
90
 
affect real-time performance and should be avoided.
91
 
</p>
92
 
<p>
93
 
If a blocking behaviour is not desirable, setting the "emit-signals" property
 
183
affect real-time performance and should be avoided.</p>
 
184
<p>If a blocking behaviour is not desirable, setting the "emit-signals" property
94
185
to <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> will make appsink emit the "new-sample" and "new-preroll" signals
95
 
when a sample can be pulled without blocking.
96
 
</p>
97
 
<p>
98
 
The "caps" property on appsink can be used to control the formats that
 
186
when a sample can be pulled without blocking.</p>
 
187
<p>The "caps" property on appsink can be used to control the formats that
99
188
appsink can receive. This property can contain non-fixed caps, the format of
100
 
the pulled samples can be obtained by getting the sample caps.
101
 
</p>
102
 
<p>
103
 
If one of the pull-preroll or pull-sample methods return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the appsink
 
189
the pulled samples can be obtained by getting the sample caps.</p>
 
190
<p>If one of the pull-preroll or pull-sample methods return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the appsink
104
191
is stopped or in the EOS state. You can check for the EOS state with the
105
 
"eos" property or with the <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos" title="gst_app_sink_is_eos ()"><code class="function">gst_app_sink_is_eos()</code></a> method.
106
 
</p>
107
 
<p>
108
 
The eos signal can also be used to be informed when the EOS state is reached
109
 
to avoid polling.
110
 
</p>
111
 
<p>
112
 
Last reviewed on 2008-12-17 (0.10.22)
113
 
</p>
 
192
"eos" property or with the <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos" title="gst_app_sink_is_eos ()"><code class="function">gst_app_sink_is_eos()</code></a> method.</p>
 
193
<p>The eos signal can also be used to be informed when the EOS state is reached
 
194
to avoid polling.</p>
 
195
<p>Last reviewed on 2008-12-17 (0.10.22)</p>
114
196
</div>
115
197
<div class="refsect1">
116
 
<a name="gst-plugins-base-libs-appsink.details"></a><h2>Details</h2>
 
198
<a name="gst-plugins-base-libs-appsink.functions_details"></a><h2>Functions</h2>
117
199
<div class="refsect2">
118
 
<a name="gst-app-sink-set-caps"></a><h3>gst_app_sink_set_caps ()</h3>
119
 
<pre class="programlisting"><span class="returnvalue">void</span>                gst_app_sink_set_caps               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
120
 
                                                         <em class="parameter"><code>const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);</pre>
121
 
<p>
122
 
Set the capabilities on the appsink element.  This function takes
 
200
<a name="gst-app-sink-set-caps"></a><h3>gst_app_sink_set_caps ()</h3>
 
201
<pre class="programlisting"><span class="returnvalue">void</span>
 
202
gst_app_sink_set_caps (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
 
203
                       <em class="parameter"><code>const <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);</pre>
 
204
<p>Set the capabilities on the appsink element.  This function takes
123
205
a copy of the caps structure. After calling this method, the sink will only
124
 
accept caps that match <em class="parameter"><code>caps</code></em>. If <em class="parameter"><code>caps</code></em> is non-fixed, you must check the caps
125
 
on the buffers to get the actual used caps.
126
 
</p>
127
 
<div class="variablelist"><table border="0" class="variablelist">
128
 
<colgroup>
129
 
<col align="left" valign="top">
130
 
<col>
131
 
</colgroup>
132
 
<tbody>
133
 
<tr>
134
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
135
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
136
 
</td>
137
 
</tr>
138
 
<tr>
139
 
<td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td>
140
 
<td>caps to set</td>
141
 
</tr>
142
 
</tbody>
143
 
</table></div>
144
 
</div>
145
 
<hr>
146
 
<div class="refsect2">
147
 
<a name="gst-app-sink-get-caps"></a><h3>gst_app_sink_get_caps ()</h3>
148
 
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="returnvalue">GstCaps</span></a> *           gst_app_sink_get_caps               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
149
 
<p>
150
 
Get the configured caps on <em class="parameter"><code>appsink</code></em>.
151
 
</p>
152
 
<div class="variablelist"><table border="0" class="variablelist">
153
 
<colgroup>
154
 
<col align="left" valign="top">
155
 
<col>
156
 
</colgroup>
157
 
<tbody>
158
 
<tr>
159
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
160
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
161
 
</td>
162
 
</tr>
163
 
<tr>
164
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
165
 
<td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> accepted by the sink. <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#gst-caps-unref"><code class="function">gst_caps_unref()</code></a> after usage.</td>
166
 
</tr>
167
 
</tbody>
168
 
</table></div>
169
 
</div>
170
 
<hr>
171
 
<div class="refsect2">
172
 
<a name="gst-app-sink-is-eos"></a><h3>gst_app_sink_is_eos ()</h3>
173
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_app_sink_is_eos                 (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
174
 
<p>
175
 
Check if <em class="parameter"><code>appsink</code></em> is EOS, which is when no more samples can be pulled because
176
 
an EOS event was received.
177
 
</p>
178
 
<p>
179
 
This function also returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when the appsink is not in the PAUSED or
180
 
PLAYING state.
181
 
</p>
182
 
<div class="variablelist"><table border="0" class="variablelist">
183
 
<colgroup>
184
 
<col align="left" valign="top">
185
 
<col>
186
 
</colgroup>
187
 
<tbody>
188
 
<tr>
189
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
190
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
191
 
</td>
192
 
</tr>
193
 
<tr>
194
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
195
 
<td>
196
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if no more samples can be pulled and the appsink is EOS.</td>
197
 
</tr>
198
 
</tbody>
199
 
</table></div>
200
 
</div>
201
 
<hr>
202
 
<div class="refsect2">
203
 
<a name="gst-app-sink-set-emit-signals"></a><h3>gst_app_sink_set_emit_signals ()</h3>
204
 
<pre class="programlisting"><span class="returnvalue">void</span>                gst_app_sink_set_emit_signals       (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
205
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> emit</code></em>);</pre>
206
 
<p>
207
 
Make appsink emit the "new-preroll" and "new-sample" signals. This option is
 
206
accept caps that match <em class="parameter"><code>caps</code></em>
 
207
. If <em class="parameter"><code>caps</code></em>
 
208
 is non-fixed, you must check the caps
 
209
on the buffers to get the actual used caps.</p>
 
210
<div class="refsect3">
 
211
<a name="id-1.2.5.5.8.2.5"></a><h4>Parameters</h4>
 
212
<div class="informaltable"><table width="100%" border="0">
 
213
<colgroup>
 
214
<col width="150px" class="parameters_name">
 
215
<col class="parameters_description">
 
216
<col width="200px" class="parameters_annotations">
 
217
</colgroup>
 
218
<tbody>
 
219
<tr>
 
220
<td class="parameter_name"><p>appsink</p></td>
 
221
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
222
<td class="parameter_annotations"> </td>
 
223
</tr>
 
224
<tr>
 
225
<td class="parameter_name"><p>caps</p></td>
 
226
<td class="parameter_description"><p>caps to set</p></td>
 
227
<td class="parameter_annotations"> </td>
 
228
</tr>
 
229
</tbody>
 
230
</table></div>
 
231
</div>
 
232
</div>
 
233
<hr>
 
234
<div class="refsect2">
 
235
<a name="gst-app-sink-get-caps"></a><h3>gst_app_sink_get_caps ()</h3>
 
236
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="returnvalue">GstCaps</span></a> *
 
237
gst_app_sink_get_caps (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
 
238
<p>Get the configured caps on <em class="parameter"><code>appsink</code></em>
 
239
.</p>
 
240
<div class="refsect3">
 
241
<a name="id-1.2.5.5.8.3.5"></a><h4>Parameters</h4>
 
242
<div class="informaltable"><table width="100%" border="0">
 
243
<colgroup>
 
244
<col width="150px" class="parameters_name">
 
245
<col class="parameters_description">
 
246
<col width="200px" class="parameters_annotations">
 
247
</colgroup>
 
248
<tbody><tr>
 
249
<td class="parameter_name"><p>appsink</p></td>
 
250
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
251
<td class="parameter_annotations"> </td>
 
252
</tr></tbody>
 
253
</table></div>
 
254
</div>
 
255
<div class="refsect3">
 
256
<a name="id-1.2.5.5.8.3.6"></a><h4>Returns</h4>
 
257
<p> the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#GstCaps"><span class="type">GstCaps</span></a> accepted by the sink. <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstCaps.html#gst-caps-unref"><code class="function">gst_caps_unref()</code></a> after usage.</p>
 
258
<p></p>
 
259
</div>
 
260
</div>
 
261
<hr>
 
262
<div class="refsect2">
 
263
<a name="gst-app-sink-is-eos"></a><h3>gst_app_sink_is_eos ()</h3>
 
264
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
265
gst_app_sink_is_eos (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
 
266
<p>Check if <em class="parameter"><code>appsink</code></em>
 
267
 is EOS, which is when no more samples can be pulled because
 
268
an EOS event was received.</p>
 
269
<p>This function also returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when the appsink is not in the PAUSED or
 
270
PLAYING state.</p>
 
271
<div class="refsect3">
 
272
<a name="id-1.2.5.5.8.4.6"></a><h4>Parameters</h4>
 
273
<div class="informaltable"><table width="100%" border="0">
 
274
<colgroup>
 
275
<col width="150px" class="parameters_name">
 
276
<col class="parameters_description">
 
277
<col width="200px" class="parameters_annotations">
 
278
</colgroup>
 
279
<tbody><tr>
 
280
<td class="parameter_name"><p>appsink</p></td>
 
281
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
282
<td class="parameter_annotations"> </td>
 
283
</tr></tbody>
 
284
</table></div>
 
285
</div>
 
286
<div class="refsect3">
 
287
<a name="id-1.2.5.5.8.4.7"></a><h4>Returns</h4>
 
288
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if no more samples can be pulled and the appsink is EOS.</p>
 
289
<p></p>
 
290
</div>
 
291
</div>
 
292
<hr>
 
293
<div class="refsect2">
 
294
<a name="gst-app-sink-set-emit-signals"></a><h3>gst_app_sink_set_emit_signals ()</h3>
 
295
<pre class="programlisting"><span class="returnvalue">void</span>
 
296
gst_app_sink_set_emit_signals (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
 
297
                               <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> emit</code></em>);</pre>
 
298
<p>Make appsink emit the "new-preroll" and "new-sample" signals. This option is
208
299
by default disabled because signal emission is expensive and unneeded when
209
 
the application prefers to operate in pull mode.
210
 
</p>
211
 
<div class="variablelist"><table border="0" class="variablelist">
212
 
<colgroup>
213
 
<col align="left" valign="top">
214
 
<col>
215
 
</colgroup>
216
 
<tbody>
217
 
<tr>
218
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
219
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
220
 
</td>
221
 
</tr>
222
 
<tr>
223
 
<td><p><span class="term"><em class="parameter"><code>emit</code></em> :</span></p></td>
224
 
<td>the new state</td>
225
 
</tr>
226
 
</tbody>
227
 
</table></div>
228
 
</div>
229
 
<hr>
230
 
<div class="refsect2">
231
 
<a name="gst-app-sink-get-emit-signals"></a><h3>gst_app_sink_get_emit_signals ()</h3>
232
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_app_sink_get_emit_signals       (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
233
 
<p>
234
 
Check if appsink will emit the "new-preroll" and "new-sample" signals.
235
 
</p>
236
 
<div class="variablelist"><table border="0" class="variablelist">
237
 
<colgroup>
238
 
<col align="left" valign="top">
239
 
<col>
240
 
</colgroup>
241
 
<tbody>
242
 
<tr>
243
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
244
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
245
 
</td>
246
 
</tr>
247
 
<tr>
248
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
249
 
<td>
250
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>appsink</code></em> is emiting the "new-preroll" and "new-sample"
251
 
signals.</td>
252
 
</tr>
253
 
</tbody>
254
 
</table></div>
255
 
</div>
256
 
<hr>
257
 
<div class="refsect2">
258
 
<a name="gst-app-sink-set-max-buffers"></a><h3>gst_app_sink_set_max_buffers ()</h3>
259
 
<pre class="programlisting"><span class="returnvalue">void</span>                gst_app_sink_set_max_buffers        (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
260
 
                                                         <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</code></em>);</pre>
261
 
<p>
262
 
Set the maximum amount of buffers that can be queued in <em class="parameter"><code>appsink</code></em>. After this
 
300
the application prefers to operate in pull mode.</p>
 
301
<div class="refsect3">
 
302
<a name="id-1.2.5.5.8.5.5"></a><h4>Parameters</h4>
 
303
<div class="informaltable"><table width="100%" border="0">
 
304
<colgroup>
 
305
<col width="150px" class="parameters_name">
 
306
<col class="parameters_description">
 
307
<col width="200px" class="parameters_annotations">
 
308
</colgroup>
 
309
<tbody>
 
310
<tr>
 
311
<td class="parameter_name"><p>appsink</p></td>
 
312
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
313
<td class="parameter_annotations"> </td>
 
314
</tr>
 
315
<tr>
 
316
<td class="parameter_name"><p>emit</p></td>
 
317
<td class="parameter_description"><p>the new state</p></td>
 
318
<td class="parameter_annotations"> </td>
 
319
</tr>
 
320
</tbody>
 
321
</table></div>
 
322
</div>
 
323
</div>
 
324
<hr>
 
325
<div class="refsect2">
 
326
<a name="gst-app-sink-get-emit-signals"></a><h3>gst_app_sink_get_emit_signals ()</h3>
 
327
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
328
gst_app_sink_get_emit_signals (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
 
329
<p>Check if appsink will emit the "new-preroll" and "new-sample" signals.</p>
 
330
<div class="refsect3">
 
331
<a name="id-1.2.5.5.8.6.5"></a><h4>Parameters</h4>
 
332
<div class="informaltable"><table width="100%" border="0">
 
333
<colgroup>
 
334
<col width="150px" class="parameters_name">
 
335
<col class="parameters_description">
 
336
<col width="200px" class="parameters_annotations">
 
337
</colgroup>
 
338
<tbody><tr>
 
339
<td class="parameter_name"><p>appsink</p></td>
 
340
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
341
<td class="parameter_annotations"> </td>
 
342
</tr></tbody>
 
343
</table></div>
 
344
</div>
 
345
<div class="refsect3">
 
346
<a name="id-1.2.5.5.8.6.6"></a><h4>Returns</h4>
 
347
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>appsink</code></em>
 
348
is emiting the "new-preroll" and "new-sample"
 
349
signals.</p>
 
350
<p></p>
 
351
</div>
 
352
</div>
 
353
<hr>
 
354
<div class="refsect2">
 
355
<a name="gst-app-sink-set-max-buffers"></a><h3>gst_app_sink_set_max_buffers ()</h3>
 
356
<pre class="programlisting"><span class="returnvalue">void</span>
 
357
gst_app_sink_set_max_buffers (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
 
358
                              <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</code></em>);</pre>
 
359
<p>Set the maximum amount of buffers that can be queued in <em class="parameter"><code>appsink</code></em>
 
360
. After this
263
361
amount of buffers are queued in appsink, any more buffers will block upstream
264
 
elements until a sample is pulled from <em class="parameter"><code>appsink</code></em>.
265
 
</p>
266
 
<div class="variablelist"><table border="0" class="variablelist">
267
 
<colgroup>
268
 
<col align="left" valign="top">
269
 
<col>
270
 
</colgroup>
271
 
<tbody>
272
 
<tr>
273
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
274
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
275
 
</td>
276
 
</tr>
277
 
<tr>
278
 
<td><p><span class="term"><em class="parameter"><code>max</code></em> :</span></p></td>
279
 
<td>the maximum number of buffers to queue</td>
280
 
</tr>
281
 
</tbody>
282
 
</table></div>
283
 
</div>
284
 
<hr>
285
 
<div class="refsect2">
286
 
<a name="gst-app-sink-get-max-buffers"></a><h3>gst_app_sink_get_max_buffers ()</h3>
287
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gst_app_sink_get_max_buffers        (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
288
 
<p>
289
 
Get the maximum amount of buffers that can be queued in <em class="parameter"><code>appsink</code></em>.
290
 
</p>
291
 
<div class="variablelist"><table border="0" class="variablelist">
292
 
<colgroup>
293
 
<col align="left" valign="top">
294
 
<col>
295
 
</colgroup>
296
 
<tbody>
297
 
<tr>
298
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
299
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
300
 
</td>
301
 
</tr>
302
 
<tr>
303
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
304
 
<td>The maximum amount of buffers that can be queued.</td>
305
 
</tr>
306
 
</tbody>
307
 
</table></div>
308
 
</div>
309
 
<hr>
310
 
<div class="refsect2">
311
 
<a name="gst-app-sink-set-drop"></a><h3>gst_app_sink_set_drop ()</h3>
312
 
<pre class="programlisting"><span class="returnvalue">void</span>                gst_app_sink_set_drop               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
313
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> drop</code></em>);</pre>
314
 
<p>
315
 
Instruct <em class="parameter"><code>appsink</code></em> to drop old buffers when the maximum amount of queued
316
 
buffers is reached.
317
 
</p>
318
 
<div class="variablelist"><table border="0" class="variablelist">
319
 
<colgroup>
320
 
<col align="left" valign="top">
321
 
<col>
322
 
</colgroup>
323
 
<tbody>
324
 
<tr>
325
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
326
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
327
 
</td>
328
 
</tr>
329
 
<tr>
330
 
<td><p><span class="term"><em class="parameter"><code>drop</code></em> :</span></p></td>
331
 
<td>the new state</td>
332
 
</tr>
333
 
</tbody>
334
 
</table></div>
335
 
</div>
336
 
<hr>
337
 
<div class="refsect2">
338
 
<a name="gst-app-sink-get-drop"></a><h3>gst_app_sink_get_drop ()</h3>
339
 
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_app_sink_get_drop               (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
340
 
<p>
341
 
Check if <em class="parameter"><code>appsink</code></em> will drop old buffers when the maximum amount of queued
342
 
buffers is reached.
343
 
</p>
344
 
<div class="variablelist"><table border="0" class="variablelist">
345
 
<colgroup>
346
 
<col align="left" valign="top">
347
 
<col>
348
 
</colgroup>
349
 
<tbody>
350
 
<tr>
351
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
352
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
353
 
</td>
354
 
</tr>
355
 
<tr>
356
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
357
 
<td>
358
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>appsink</code></em> is dropping old buffers when the queue is
359
 
filled.</td>
360
 
</tr>
361
 
</tbody>
362
 
</table></div>
363
 
</div>
364
 
<hr>
365
 
<div class="refsect2">
366
 
<a name="gst-app-sink-pull-preroll"></a><h3>gst_app_sink_pull_preroll ()</h3>
367
 
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> *         gst_app_sink_pull_preroll           (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
368
 
<p>
369
 
Get the last preroll sample in <em class="parameter"><code>appsink</code></em>. This was the sample that caused the
 
362
elements until a sample is pulled from <em class="parameter"><code>appsink</code></em>
 
363
.</p>
 
364
<div class="refsect3">
 
365
<a name="id-1.2.5.5.8.7.5"></a><h4>Parameters</h4>
 
366
<div class="informaltable"><table width="100%" border="0">
 
367
<colgroup>
 
368
<col width="150px" class="parameters_name">
 
369
<col class="parameters_description">
 
370
<col width="200px" class="parameters_annotations">
 
371
</colgroup>
 
372
<tbody>
 
373
<tr>
 
374
<td class="parameter_name"><p>appsink</p></td>
 
375
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
376
<td class="parameter_annotations"> </td>
 
377
</tr>
 
378
<tr>
 
379
<td class="parameter_name"><p>max</p></td>
 
380
<td class="parameter_description"><p>the maximum number of buffers to queue</p></td>
 
381
<td class="parameter_annotations"> </td>
 
382
</tr>
 
383
</tbody>
 
384
</table></div>
 
385
</div>
 
386
</div>
 
387
<hr>
 
388
<div class="refsect2">
 
389
<a name="gst-app-sink-get-max-buffers"></a><h3>gst_app_sink_get_max_buffers ()</h3>
 
390
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
 
391
gst_app_sink_get_max_buffers (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
 
392
<p>Get the maximum amount of buffers that can be queued in <em class="parameter"><code>appsink</code></em>
 
393
.</p>
 
394
<div class="refsect3">
 
395
<a name="id-1.2.5.5.8.8.5"></a><h4>Parameters</h4>
 
396
<div class="informaltable"><table width="100%" border="0">
 
397
<colgroup>
 
398
<col width="150px" class="parameters_name">
 
399
<col class="parameters_description">
 
400
<col width="200px" class="parameters_annotations">
 
401
</colgroup>
 
402
<tbody><tr>
 
403
<td class="parameter_name"><p>appsink</p></td>
 
404
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
405
<td class="parameter_annotations"> </td>
 
406
</tr></tbody>
 
407
</table></div>
 
408
</div>
 
409
<div class="refsect3">
 
410
<a name="id-1.2.5.5.8.8.6"></a><h4>Returns</h4>
 
411
<p> The maximum amount of buffers that can be queued.</p>
 
412
<p></p>
 
413
</div>
 
414
</div>
 
415
<hr>
 
416
<div class="refsect2">
 
417
<a name="gst-app-sink-set-drop"></a><h3>gst_app_sink_set_drop ()</h3>
 
418
<pre class="programlisting"><span class="returnvalue">void</span>
 
419
gst_app_sink_set_drop (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
 
420
                       <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> drop</code></em>);</pre>
 
421
<p>Instruct <em class="parameter"><code>appsink</code></em>
 
422
 to drop old buffers when the maximum amount of queued
 
423
buffers is reached.</p>
 
424
<div class="refsect3">
 
425
<a name="id-1.2.5.5.8.9.5"></a><h4>Parameters</h4>
 
426
<div class="informaltable"><table width="100%" border="0">
 
427
<colgroup>
 
428
<col width="150px" class="parameters_name">
 
429
<col class="parameters_description">
 
430
<col width="200px" class="parameters_annotations">
 
431
</colgroup>
 
432
<tbody>
 
433
<tr>
 
434
<td class="parameter_name"><p>appsink</p></td>
 
435
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
436
<td class="parameter_annotations"> </td>
 
437
</tr>
 
438
<tr>
 
439
<td class="parameter_name"><p>drop</p></td>
 
440
<td class="parameter_description"><p>the new state</p></td>
 
441
<td class="parameter_annotations"> </td>
 
442
</tr>
 
443
</tbody>
 
444
</table></div>
 
445
</div>
 
446
</div>
 
447
<hr>
 
448
<div class="refsect2">
 
449
<a name="gst-app-sink-get-drop"></a><h3>gst_app_sink_get_drop ()</h3>
 
450
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
451
gst_app_sink_get_drop (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
 
452
<p>Check if <em class="parameter"><code>appsink</code></em>
 
453
 will drop old buffers when the maximum amount of queued
 
454
buffers is reached.</p>
 
455
<div class="refsect3">
 
456
<a name="id-1.2.5.5.8.10.5"></a><h4>Parameters</h4>
 
457
<div class="informaltable"><table width="100%" border="0">
 
458
<colgroup>
 
459
<col width="150px" class="parameters_name">
 
460
<col class="parameters_description">
 
461
<col width="200px" class="parameters_annotations">
 
462
</colgroup>
 
463
<tbody><tr>
 
464
<td class="parameter_name"><p>appsink</p></td>
 
465
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
466
<td class="parameter_annotations"> </td>
 
467
</tr></tbody>
 
468
</table></div>
 
469
</div>
 
470
<div class="refsect3">
 
471
<a name="id-1.2.5.5.8.10.6"></a><h4>Returns</h4>
 
472
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>appsink</code></em>
 
473
is dropping old buffers when the queue is
 
474
filled.</p>
 
475
<p></p>
 
476
</div>
 
477
</div>
 
478
<hr>
 
479
<div class="refsect2">
 
480
<a name="gst-app-sink-pull-preroll"></a><h3>gst_app_sink_pull_preroll ()</h3>
 
481
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> *
 
482
gst_app_sink_pull_preroll (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
 
483
<p>Get the last preroll sample in <em class="parameter"><code>appsink</code></em>
 
484
. This was the sample that caused the
370
485
appsink to preroll in the PAUSED state. This sample can be pulled many times
371
 
and remains available to the application even after EOS.
372
 
</p>
373
 
<p>
374
 
This function is typically used when dealing with a pipeline in the PAUSED
 
486
and remains available to the application even after EOS.</p>
 
487
<p>This function is typically used when dealing with a pipeline in the PAUSED
375
488
state. Calling this function after doing a seek will give the sample right
376
 
after the seek position.
377
 
</p>
378
 
<p>
379
 
Note that the preroll sample will also be returned as the first sample
380
 
when calling <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-sample" title="gst_app_sink_pull_sample ()"><code class="function">gst_app_sink_pull_sample()</code></a>.
381
 
</p>
382
 
<p>
383
 
If an EOS event was received before any buffers, this function returns
384
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos" title="gst_app_sink_is_eos ()"><code class="function">gst_app_sink_is_eos()</code></a> to check for the EOS condition.
385
 
</p>
386
 
<p>
387
 
This function blocks until a preroll sample or EOS is received or the appsink
388
 
element is set to the READY/NULL state.
389
 
</p>
390
 
<div class="variablelist"><table border="0" class="variablelist">
 
489
after the seek position.</p>
 
490
<p>Note that the preroll sample will also be returned as the first sample
 
491
when calling <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-sample" title="gst_app_sink_pull_sample ()"><code class="function">gst_app_sink_pull_sample()</code></a>.</p>
 
492
<p>If an EOS event was received before any buffers, this function returns
 
493
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos" title="gst_app_sink_is_eos ()"><code class="function">gst_app_sink_is_eos()</code></a> to check for the EOS condition.</p>
 
494
<p>This function blocks until a preroll sample or EOS is received or the appsink
 
495
element is set to the READY/NULL state.</p>
 
496
<div class="refsect3">
 
497
<a name="id-1.2.5.5.8.11.9"></a><h4>Parameters</h4>
 
498
<div class="informaltable"><table width="100%" border="0">
391
499
<colgroup>
392
 
<col align="left" valign="top">
393
 
<col>
 
500
<col width="150px" class="parameters_name">
 
501
<col class="parameters_description">
 
502
<col width="200px" class="parameters_annotations">
394
503
</colgroup>
395
 
<tbody>
396
 
<tr>
397
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
398
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
399
 
</td>
400
 
</tr>
401
 
<tr>
402
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
403
 
<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>
404
 
</tr>
405
 
</tbody>
 
504
<tbody><tr>
 
505
<td class="parameter_name"><p>appsink</p></td>
 
506
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
507
<td class="parameter_annotations"> </td>
 
508
</tr></tbody>
406
509
</table></div>
407
510
</div>
 
511
<div class="refsect3">
 
512
<a name="id-1.2.5.5.8.11.10"></a><h4>Returns</h4>
 
513
<p> 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.</p>
 
514
<p></p>
 
515
</div>
 
516
</div>
408
517
<hr>
409
518
<div class="refsect2">
410
 
<a name="gst-app-sink-pull-sample"></a><h3>gst_app_sink_pull_sample ()</h3>
411
 
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> *         gst_app_sink_pull_sample            (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
412
 
<p>
413
 
This function blocks until a sample or EOS becomes available or the appsink
414
 
element is set to the READY/NULL state.
415
 
</p>
416
 
<p>
417
 
This function will only return samples when the appsink is in the PLAYING
 
519
<a name="gst-app-sink-pull-sample"></a><h3>gst_app_sink_pull_sample ()</h3>
 
520
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="returnvalue">GstSample</span></a> *
 
521
gst_app_sink_pull_sample (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>);</pre>
 
522
<p>This function blocks until a sample or EOS becomes available or the appsink
 
523
element is set to the READY/NULL state.</p>
 
524
<p>This function will only return samples when the appsink is in the PLAYING
418
525
state. All rendered buffers will be put in a queue so that the application
419
526
can pull samples at its own rate. Note that when the application does not
420
527
pull samples fast enough, the queued buffers could consume a lot of memory,
421
 
especially when dealing with raw video frames.
422
 
</p>
423
 
<p>
424
 
If an EOS event was received before any buffers, this function returns
425
 
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos" title="gst_app_sink_is_eos ()"><code class="function">gst_app_sink_is_eos()</code></a> to check for the EOS condition.
426
 
</p>
427
 
<div class="variablelist"><table border="0" class="variablelist">
428
 
<colgroup>
429
 
<col align="left" valign="top">
430
 
<col>
 
528
especially when dealing with raw video frames.</p>
 
529
<p>If an EOS event was received before any buffers, this function returns
 
530
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Use <a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-is-eos" title="gst_app_sink_is_eos ()"><code class="function">gst_app_sink_is_eos()</code></a> to check for the EOS condition.</p>
 
531
<div class="refsect3">
 
532
<a name="id-1.2.5.5.8.12.7"></a><h4>Parameters</h4>
 
533
<div class="informaltable"><table width="100%" border="0">
 
534
<colgroup>
 
535
<col width="150px" class="parameters_name">
 
536
<col class="parameters_description">
 
537
<col width="200px" class="parameters_annotations">
 
538
</colgroup>
 
539
<tbody><tr>
 
540
<td class="parameter_name"><p>appsink</p></td>
 
541
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
542
<td class="parameter_annotations"> </td>
 
543
</tr></tbody>
 
544
</table></div>
 
545
</div>
 
546
<div class="refsect3">
 
547
<a name="id-1.2.5.5.8.12.8"></a><h4>Returns</h4>
 
548
<p> 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.</p>
 
549
<p></p>
 
550
</div>
 
551
</div>
 
552
<hr>
 
553
<div class="refsect2">
 
554
<a name="gst-app-sink-set-callbacks"></a><h3>gst_app_sink_set_callbacks ()</h3>
 
555
<pre class="programlisting"><span class="returnvalue">void</span>
 
556
gst_app_sink_set_callbacks (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
 
557
                            <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-appsink.html#GstAppSinkCallbacks" title="GstAppSinkCallbacks"><span class="type">GstAppSinkCallbacks</span></a> *callbacks</code></em>,
 
558
                            <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
 
559
                            <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
 
560
<p>Set callbacks which will be executed for each new preroll, new sample and eos.
 
561
This is an alternative to using the signals, it has lower overhead and is thus
 
562
less expensive, but also less flexible.</p>
 
563
<p>If callbacks are installed, no signals will be emitted for performance
 
564
reasons.</p>
 
565
<div class="refsect3">
 
566
<a name="id-1.2.5.5.8.13.6"></a><h4>Parameters</h4>
 
567
<div class="informaltable"><table width="100%" border="0">
 
568
<colgroup>
 
569
<col width="150px" class="parameters_name">
 
570
<col class="parameters_description">
 
571
<col width="200px" class="parameters_annotations">
431
572
</colgroup>
432
573
<tbody>
433
574
<tr>
434
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
435
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
436
 
</td>
437
 
</tr>
438
 
<tr>
439
 
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
440
 
<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>
 
575
<td class="parameter_name"><p>appsink</p></td>
 
576
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a></p></td>
 
577
<td class="parameter_annotations"> </td>
 
578
</tr>
 
579
<tr>
 
580
<td class="parameter_name"><p>callbacks</p></td>
 
581
<td class="parameter_description"><p>the callbacks</p></td>
 
582
<td class="parameter_annotations"> </td>
 
583
</tr>
 
584
<tr>
 
585
<td class="parameter_name"><p>user_data</p></td>
 
586
<td class="parameter_description"><p>a user_data argument for the callbacks</p></td>
 
587
<td class="parameter_annotations"> </td>
 
588
</tr>
 
589
<tr>
 
590
<td class="parameter_name"><p>notify</p></td>
 
591
<td class="parameter_description"><p>a destroy notify function</p></td>
 
592
<td class="parameter_annotations"> </td>
441
593
</tr>
442
594
</tbody>
443
595
</table></div>
444
596
</div>
445
 
<hr>
 
597
</div>
 
598
</div>
 
599
<div class="refsect1">
 
600
<a name="gst-plugins-base-libs-appsink.other_details"></a><h2>Types and Values</h2>
446
601
<div class="refsect2">
447
602
<a name="GstAppSinkCallbacks"></a><h3>GstAppSinkCallbacks</h3>
448
603
<pre class="programlisting">typedef struct {
451
606
  GstFlowReturn (*new_sample)       (GstAppSink *appsink, gpointer user_data);
452
607
} GstAppSinkCallbacks;
453
608
</pre>
454
 
<p>
455
 
A set of callbacks that can be installed on the appsink with
456
 
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-callbacks" title="gst_app_sink_set_callbacks ()"><code class="function">gst_app_sink_set_callbacks()</code></a>.
457
 
</p>
458
 
<div class="variablelist"><table border="0" class="variablelist">
 
609
<p>A set of callbacks that can be installed on the appsink with
 
610
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-set-callbacks" title="gst_app_sink_set_callbacks ()"><code class="function">gst_app_sink_set_callbacks()</code></a>.</p>
 
611
<div class="refsect3">
 
612
<a name="id-1.2.5.5.9.2.5"></a><h4>Members</h4>
 
613
<div class="informaltable"><table width="100%" border="0">
459
614
<colgroup>
460
 
<col align="left" valign="top">
461
 
<col>
 
615
<col width="300px" class="struct_members_name">
 
616
<col class="struct_members_description">
 
617
<col width="200px" class="struct_members_annotations">
462
618
</colgroup>
463
619
<tbody>
464
620
<tr>
465
 
<td><p><span class="term"><em class="structfield"><code><a name="GstAppSinkCallbacks.eos"></a>eos</code></em> ()</span></p></td>
466
 
<td>Called when the end-of-stream has been reached. This callback
467
 
is called from the steaming thread.</td>
 
621
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAppSinkCallbacks.eos"></a>eos</code></em> ()</p></td>
 
622
<td class="struct_member_description"><p>Called when the end-of-stream has been reached. This callback
 
623
is called from the steaming thread.</p></td>
 
624
<td class="struct_member_annotations"> </td>
468
625
</tr>
469
626
<tr>
470
 
<td><p><span class="term"><em class="structfield"><code><a name="GstAppSinkCallbacks.new-preroll"></a>new_preroll</code></em> ()</span></p></td>
471
 
<td>Called when a new preroll sample is available.
 
627
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAppSinkCallbacks.new-preroll"></a>new_preroll</code></em> ()</p></td>
 
628
<td class="struct_member_description"><p>Called when a new preroll sample is available.
472
629
This callback is called from the steaming thread.
473
630
The new preroll sample can be retrieved with
474
 
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-preroll" title="gst_app_sink_pull_preroll ()"><code class="function">gst_app_sink_pull_preroll()</code></a> either from this callback
475
 
or from any other thread.</td>
 
631
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-preroll" title="gst_app_sink_pull_preroll ()"><code class="function">gst_app_sink_pull_preroll()</code></a> either from this callback
 
632
or from any other thread.</p></td>
 
633
<td class="struct_member_annotations"> </td>
476
634
</tr>
477
635
<tr>
478
 
<td><p><span class="term"><em class="structfield"><code><a name="GstAppSinkCallbacks.new-sample"></a>new_sample</code></em> ()</span></p></td>
479
 
<td>Called when a new sample is available.
 
636
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAppSinkCallbacks.new-sample"></a>new_sample</code></em> ()</p></td>
 
637
<td class="struct_member_description"><p>Called when a new sample is available.
480
638
This callback is called from the steaming thread.
481
639
The new sample can be retrieved with
482
 
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-sample" title="gst_app_sink_pull_sample ()"><code class="function">gst_app_sink_pull_sample()</code></a> either from this callback
483
 
or from any other thread.</td>
 
640
<a class="link" href="gst-plugins-base-libs-appsink.html#gst-app-sink-pull-sample" title="gst_app_sink_pull_sample ()"><code class="function">gst_app_sink_pull_sample()</code></a> either from this callback
 
641
or from any other thread.</p></td>
 
642
<td class="struct_member_annotations"> </td>
484
643
</tr>
485
644
</tbody>
486
645
</table></div>
487
646
</div>
488
 
<hr>
489
 
<div class="refsect2">
490
 
<a name="gst-app-sink-set-callbacks"></a><h3>gst_app_sink_set_callbacks ()</h3>
491
 
<pre class="programlisting"><span class="returnvalue">void</span>                gst_app_sink_set_callbacks          (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a> *appsink</code></em>,
492
 
                                                         <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-appsink.html#GstAppSinkCallbacks" title="GstAppSinkCallbacks"><span class="type">GstAppSinkCallbacks</span></a> *callbacks</code></em>,
493
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
494
 
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
495
 
<p>
496
 
Set callbacks which will be executed for each new preroll, new sample and eos.
497
 
This is an alternative to using the signals, it has lower overhead and is thus
498
 
less expensive, but also less flexible.
499
 
</p>
500
 
<p>
501
 
If callbacks are installed, no signals will be emitted for performance
502
 
reasons.
503
 
</p>
504
 
<div class="variablelist"><table border="0" class="variablelist">
505
 
<colgroup>
506
 
<col align="left" valign="top">
507
 
<col>
508
 
</colgroup>
509
 
<tbody>
510
 
<tr>
511
 
<td><p><span class="term"><em class="parameter"><code>appsink</code></em> :</span></p></td>
512
 
<td>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base/html/gst-plugins-base-plugins-appsink.html#GstAppSink"><span class="type">GstAppSink</span></a>
513
 
</td>
514
 
</tr>
515
 
<tr>
516
 
<td><p><span class="term"><em class="parameter"><code>callbacks</code></em> :</span></p></td>
517
 
<td>the callbacks</td>
518
 
</tr>
519
 
<tr>
520
 
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
521
 
<td>a user_data argument for the callbacks</td>
522
 
</tr>
523
 
<tr>
524
 
<td><p><span class="term"><em class="parameter"><code>notify</code></em> :</span></p></td>
525
 
<td>a destroy notify function</td>
526
 
</tr>
527
 
</tbody>
528
 
</table></div>
529
647
</div>
530
648
</div>
531
649
<div class="refsect1">
532
650
<a name="gst-plugins-base-libs-appsink.see-also"></a><h2>See Also</h2>
533
 
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="type">GstSample</span></a>, <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSink.html"><span class="type">GstBaseSink</span></a>, appsrc
 
651
<p><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstSample.html#GstSample"><span class="type">GstSample</span></a>, <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSink.html"><span class="type">GstBaseSink</span></a>, appsrc</p>
534
652
</div>
535
653
</div>
536
654
<div class="footer">
537
655
<hr>
538
 
          Generated by GTK-Doc V1.19</div>
 
656
          Generated by GTK-Doc V1.20</div>
539
657
</body>
540
658
</html>
 
 
b'\\ No newline at end of file'