Git init
[framework/multimedia/gstreamer0.10.git] / docs / libs / html / gstreamer-libs-GstDataQueue.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>GstDataQueue</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GStreamer 0.10 Library Reference Manual">
8 <link rel="up" href="gstreamer-base.html" title="GStreamer Base and Utillity Classes">
9 <link rel="prev" href="gstreamer-libs-GstTypeFindHelper.html" title="GstTypeFindHelper">
10 <link rel="next" href="gstreamer-control.html" title="GStreamer Dynamic Parameter Control">
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="gstreamer-libs-GstTypeFindHelper.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="gstreamer-base.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 0.10 Library Reference Manual</th>
21 <td><a accesskey="n" href="gstreamer-control.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="#gstreamer-libs-GstDataQueue.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gstreamer-libs-GstDataQueue.description" class="shortcut">Description</a>
27 </td></tr>
28 </table>
29 <div class="refentry">
30 <a name="gstreamer-libs-GstDataQueue"></a><div class="titlepage"></div>
31 <div class="refnamediv"><table width="100%"><tr>
32 <td valign="top">
33 <h2><span class="refentrytitle"><a name="gstreamer-libs-GstDataQueue.top_of_page"></a>GstDataQueue</span></h2>
34 <p>GstDataQueue — Threadsafe queueing object</p>
35 </td>
36 <td valign="top" align="right"></td>
37 </tr></table></div>
38 <div class="refsynopsisdiv">
39 <a name="gstreamer-libs-GstDataQueue.synopsis"></a><h2>Synopsis</h2>
40 <pre class="synopsis">
41 #include &lt;gst/base/gstdataqueue.h&gt;
42
43 struct              <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue">GstDataQueue</a>;
44 struct              <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueSize" title="struct GstDataQueueSize">GstDataQueueSize</a>;
45 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueCheckFullFunction" title="GstDataQueueCheckFullFunction ()">*GstDataQueueCheckFullFunction</a>)    (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
46                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> visible</code></em>,
47                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> bytes</code></em>,
48                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> time</code></em>,
49                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);
50 struct              <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem">GstDataQueueItem</a>;
51 <span class="returnvalue">void</span>                (<a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueEmptyCallback" title="GstDataQueueEmptyCallback ()">*GstDataQueueEmptyCallback</a>)        (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
52                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);
53 <span class="returnvalue">void</span>                (<a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueFullCallback" title="GstDataQueueFullCallback ()">*GstDataQueueFullCallback</a>)         (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
54                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);
55 <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="returnvalue">GstDataQueue</span></a> *      <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-new" title="gst_data_queue_new ()">gst_data_queue_new</a>                  (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueCheckFullFunction" title="GstDataQueueCheckFullFunction ()"><span class="type">GstDataQueueCheckFullFunction</span></a> checkfull</code></em>,
56                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);
57 <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="returnvalue">GstDataQueue</span></a> *      <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-new-full" title="gst_data_queue_new_full ()">gst_data_queue_new_full</a>             (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueCheckFullFunction" title="GstDataQueueCheckFullFunction ()"><span class="type">GstDataQueueCheckFullFunction</span></a> checkfull</code></em>,
58                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueFullCallback" title="GstDataQueueFullCallback ()"><span class="type">GstDataQueueFullCallback</span></a> fullcallback</code></em>,
59                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueEmptyCallback" title="GstDataQueueEmptyCallback ()"><span class="type">GstDataQueueEmptyCallback</span></a> emptycallback</code></em>,
60                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);
61 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-push" title="gst_data_queue_push ()">gst_data_queue_push</a>                 (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
62                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a> *item</code></em>);
63 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-pop" title="gst_data_queue_pop ()">gst_data_queue_pop</a>                  (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
64                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a> **item</code></em>);
65 <span class="returnvalue">void</span>                <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-flush" title="gst_data_queue_flush ()">gst_data_queue_flush</a>                (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>);
66 <span class="returnvalue">void</span>                <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-set-flushing" title="gst_data_queue_set_flushing ()">gst_data_queue_set_flushing</a>         (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
67                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> flushing</code></em>);
68 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-drop-head" title="gst_data_queue_drop_head ()">gst_data_queue_drop_head</a>            (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
69                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>);
70 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-is-full" title="gst_data_queue_is_full ()">gst_data_queue_is_full</a>              (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>);
71 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-is-empty" title="gst_data_queue_is_empty ()">gst_data_queue_is_empty</a>             (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>);
72 <span class="returnvalue">void</span>                <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-get-level" title="gst_data_queue_get_level ()">gst_data_queue_get_level</a>            (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
73                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueSize" title="struct GstDataQueueSize"><span class="type">GstDataQueueSize</span></a> *level</code></em>);
74 <span class="returnvalue">void</span>                <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-limits-changed" title="gst_data_queue_limits_changed ()">gst_data_queue_limits_changed</a>       (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>);
75 </pre>
76 </div>
77 <div class="refsect1">
78 <a name="gstreamer-libs-GstDataQueue.description"></a><h2>Description</h2>
79 <p>
80 <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> is an object that handles threadsafe queueing of objects. It
81 also provides size-related functionality. This object should be used for
82 any <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> that wishes to provide some sort of queueing functionality.
83 </p>
84 </div>
85 <div class="refsect1">
86 <a name="gstreamer-libs-GstDataQueue.details"></a><h2>Details</h2>
87 <div class="refsect2">
88 <a name="GstDataQueue"></a><h3>struct GstDataQueue</h3>
89 <pre class="programlisting">struct GstDataQueue {
90   GObject object;
91 };
92 </pre>
93 <p>
94 Opaque <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> structure.
95 </p>
96 <div class="variablelist"><table border="0">
97 <col align="left" valign="top">
98 <tbody><tr>
99 <td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> <em class="structfield"><code><a name="GstDataQueue.object"></a>object</code></em>;</span></p></td>
100 <td>the parent structure</td>
101 </tr></tbody>
102 </table></div>
103 <p class="since">Since 0.10.11</p>
104 </div>
105 <hr>
106 <div class="refsect2">
107 <a name="GstDataQueueSize"></a><h3>struct GstDataQueueSize</h3>
108 <pre class="programlisting">struct GstDataQueueSize {
109   guint visible;
110   guint bytes;
111   guint64 time;
112 };
113 </pre>
114 <p>
115 Structure describing the size of a queue.
116 </p>
117 <div class="variablelist"><table border="0">
118 <col align="left" valign="top">
119 <tbody>
120 <tr>
121 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstDataQueueSize.visible"></a>visible</code></em>;</span></p></td>
122 <td>number of buffers</td>
123 </tr>
124 <tr>
125 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstDataQueueSize.bytes"></a>bytes</code></em>;</span></p></td>
126 <td>number of bytes</td>
127 </tr>
128 <tr>
129 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> <em class="structfield"><code><a name="GstDataQueueSize.time"></a>time</code></em>;</span></p></td>
130 <td>amount of time</td>
131 </tr>
132 </tbody>
133 </table></div>
134 <p class="since">Since 0.10.11</p>
135 </div>
136 <hr>
137 <div class="refsect2">
138 <a name="GstDataQueueCheckFullFunction"></a><h3>GstDataQueueCheckFullFunction ()</h3>
139 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*GstDataQueueCheckFullFunction)    (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
140                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> visible</code></em>,
141                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> bytes</code></em>,
142                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> time</code></em>,
143                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);</pre>
144 <p>
145 The prototype of the function used to inform the queue that it should be
146 considered as full.
147 </p>
148 <div class="variablelist"><table border="0">
149 <col align="left" valign="top">
150 <tbody>
151 <tr>
152 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
153 <td>a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
154 </tr>
155 <tr>
156 <td><p><span class="term"><em class="parameter"><code>visible</code></em> :</span></p></td>
157 <td>The number of visible items currently in the queue.</td>
158 </tr>
159 <tr>
160 <td><p><span class="term"><em class="parameter"><code>bytes</code></em> :</span></p></td>
161 <td>The amount of bytes currently in the queue.</td>
162 </tr>
163 <tr>
164 <td><p><span class="term"><em class="parameter"><code>time</code></em> :</span></p></td>
165 <td>The accumulated duration of the items currently in the queue.</td>
166 </tr>
167 <tr>
168 <td><p><span class="term"><em class="parameter"><code>checkdata</code></em> :</span></p></td>
169 <td>The <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> registered when the <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> was created.</td>
170 </tr>
171 <tr>
172 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
173 <td>
174 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if the queue should be considered full.</td>
175 </tr>
176 </tbody>
177 </table></div>
178 <p class="since">Since 0.10.11</p>
179 </div>
180 <hr>
181 <div class="refsect2">
182 <a name="GstDataQueueItem"></a><h3>struct GstDataQueueItem</h3>
183 <pre class="programlisting">struct GstDataQueueItem {
184   GstMiniObject *object;
185   guint size;
186   guint64 duration;
187   gboolean visible;
188
189   /* user supplied destroy function */
190   GDestroyNotify destroy;
191 };
192 </pre>
193 <p>
194 Structure used by <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>. You can supply a different structure, as
195 long as the top of the structure is identical to this structure.
196 </p>
197 <div class="variablelist"><table border="0">
198 <col align="left" valign="top">
199 <tbody>
200 <tr>
201 <td><p><span class="term"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#GstMiniObject"><span class="type">GstMiniObject</span></a> *<em class="structfield"><code><a name="GstDataQueueItem.object"></a>object</code></em>;</span></p></td>
202 <td>the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#GstMiniObject"><span class="type">GstMiniObject</span></a> to queue.</td>
203 </tr>
204 <tr>
205 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> <em class="structfield"><code><a name="GstDataQueueItem.size"></a>size</code></em>;</span></p></td>
206 <td>the size in bytes of the miniobject.</td>
207 </tr>
208 <tr>
209 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> <em class="structfield"><code><a name="GstDataQueueItem.duration"></a>duration</code></em>;</span></p></td>
210 <td>the duration in <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> of the miniobject. Can not be
211 <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GST-CLOCK-TIME-NONE:CAPS"><span class="type">GST_CLOCK_TIME_NONE</span></a>.</td>
212 </tr>
213 <tr>
214 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="GstDataQueueItem.visible"></a>visible</code></em>;</span></p></td>
215 <td>
216 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if <em class="parameter"><code>object</code></em> should be considered as a visible object.</td>
217 </tr>
218 <tr>
219 <td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> <em class="structfield"><code><a name="GstDataQueueItem.destroy"></a>destroy</code></em>;</span></p></td>
220 <td>The <a href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> function to use to free the <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a>.
221 This function should also drop the reference to <em class="parameter"><code>object</code></em> the owner of the
222 <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a> is assumed to hold.</td>
223 </tr>
224 </tbody>
225 </table></div>
226 <p class="since">Since 0.10.11</p>
227 </div>
228 <hr>
229 <div class="refsect2">
230 <a name="GstDataQueueEmptyCallback"></a><h3>GstDataQueueEmptyCallback ()</h3>
231 <pre class="programlisting"><span class="returnvalue">void</span>                (*GstDataQueueEmptyCallback)        (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
232                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);</pre>
233 </div>
234 <hr>
235 <div class="refsect2">
236 <a name="GstDataQueueFullCallback"></a><h3>GstDataQueueFullCallback ()</h3>
237 <pre class="programlisting"><span class="returnvalue">void</span>                (*GstDataQueueFullCallback)         (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
238                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);</pre>
239 </div>
240 <hr>
241 <div class="refsect2">
242 <a name="gst-data-queue-new"></a><h3>gst_data_queue_new ()</h3>
243 <pre class="programlisting"><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="returnvalue">GstDataQueue</span></a> *      gst_data_queue_new                  (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueCheckFullFunction" title="GstDataQueueCheckFullFunction ()"><span class="type">GstDataQueueCheckFullFunction</span></a> checkfull</code></em>,
244                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);</pre>
245 <div class="variablelist"><table border="0">
246 <col align="left" valign="top">
247 <tbody>
248 <tr>
249 <td><p><span class="term"><em class="parameter"><code>checkfull</code></em> :</span></p></td>
250 <td>the callback used to tell if the element considers the queue full
251 or not.</td>
252 </tr>
253 <tr>
254 <td><p><span class="term"><em class="parameter"><code>checkdata</code></em> :</span></p></td>
255 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> that will be given in the <em class="parameter"><code>checkfull</code></em> callback.</td>
256 </tr>
257 <tr>
258 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
259 <td>a new <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
260 </tr>
261 </tbody>
262 </table></div>
263 </div>
264 <hr>
265 <div class="refsect2">
266 <a name="gst-data-queue-new-full"></a><h3>gst_data_queue_new_full ()</h3>
267 <pre class="programlisting"><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="returnvalue">GstDataQueue</span></a> *      gst_data_queue_new_full             (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueCheckFullFunction" title="GstDataQueueCheckFullFunction ()"><span class="type">GstDataQueueCheckFullFunction</span></a> checkfull</code></em>,
268                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueFullCallback" title="GstDataQueueFullCallback ()"><span class="type">GstDataQueueFullCallback</span></a> fullcallback</code></em>,
269                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueEmptyCallback" title="GstDataQueueEmptyCallback ()"><span class="type">GstDataQueueEmptyCallback</span></a> emptycallback</code></em>,
270                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> checkdata</code></em>);</pre>
271 <p>
272 Creates a new <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>. The difference with <em class="parameter"><code>gst_data_queue_new</code></em> is that it will
273 not emit the 'full' and 'empty' signals, but instead calling directly <em class="parameter"><code>fullcallback</code></em>
274 or <em class="parameter"><code>emptycallback</code></em>.
275 </p>
276 <div class="variablelist"><table border="0">
277 <col align="left" valign="top">
278 <tbody>
279 <tr>
280 <td><p><span class="term"><em class="parameter"><code>checkfull</code></em> :</span></p></td>
281 <td>the callback used to tell if the element considers the queue full
282 or not.</td>
283 </tr>
284 <tr>
285 <td><p><span class="term"><em class="parameter"><code>fullcallback</code></em> :</span></p></td>
286 <td>the callback which will be called when the queue is considered full.</td>
287 </tr>
288 <tr>
289 <td><p><span class="term"><em class="parameter"><code>emptycallback</code></em> :</span></p></td>
290 <td>the callback which will be called when the queue is considered empty.</td>
291 </tr>
292 <tr>
293 <td><p><span class="term"><em class="parameter"><code>checkdata</code></em> :</span></p></td>
294 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> that will be given in the <em class="parameter"><code>checkfull</code></em> callback.</td>
295 </tr>
296 <tr>
297 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
298 <td>a new <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
299 </tr>
300 </tbody>
301 </table></div>
302 <p class="since">Since 0.10.26</p>
303 </div>
304 <hr>
305 <div class="refsect2">
306 <a name="gst-data-queue-push"></a><h3>gst_data_queue_push ()</h3>
307 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_data_queue_push                 (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
308                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a> *item</code></em>);</pre>
309 <p>
310 Pushes a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a> (or a structure that begins with the same fields)
311 on the <em class="parameter"><code>queue</code></em>. If the <em class="parameter"><code>queue</code></em> is full, the call will block until space is
312 available, OR the <em class="parameter"><code>queue</code></em> is set to flushing state.
313 MT safe.
314 </p>
315 <p>
316 Note that this function has slightly different semantics than <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-push"><code class="function">gst_pad_push()</code></a>
317 and <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#gst-pad-push-event"><code class="function">gst_pad_push_event()</code></a>: this function only takes ownership of <em class="parameter"><code>item</code></em> and
318 the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#GstMiniObject"><span class="type">GstMiniObject</span></a> contained in <em class="parameter"><code>item</code></em> if the push was successful. If FALSE
319 is returned, the caller is responsible for freeing <em class="parameter"><code>item</code></em> and its contents.
320 </p>
321 <div class="variablelist"><table border="0">
322 <col align="left" valign="top">
323 <tbody>
324 <tr>
325 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
326 <td>a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
327 </tr>
328 <tr>
329 <td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
330 <td>a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a>.</td>
331 </tr>
332 <tr>
333 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
334 <td>
335 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if the <em class="parameter"><code>item</code></em> was successfully pushed on the <em class="parameter"><code>queue</code></em>.</td>
336 </tr>
337 </tbody>
338 </table></div>
339 <p class="since">Since 0.10.11</p>
340 </div>
341 <hr>
342 <div class="refsect2">
343 <a name="gst-data-queue-pop"></a><h3>gst_data_queue_pop ()</h3>
344 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_data_queue_pop                  (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
345                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a> **item</code></em>);</pre>
346 <p>
347 Retrieves the first <em class="parameter"><code>item</code></em> available on the <em class="parameter"><code>queue</code></em>. If the queue is currently
348 empty, the call will block until at least one item is available, OR the
349 <em class="parameter"><code>queue</code></em> is set to the flushing state.
350 MT safe.
351 </p>
352 <div class="variablelist"><table border="0">
353 <col align="left" valign="top">
354 <tbody>
355 <tr>
356 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
357 <td>a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
358 </tr>
359 <tr>
360 <td><p><span class="term"><em class="parameter"><code>item</code></em> :</span></p></td>
361 <td>pointer to store the returned <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueItem" title="struct GstDataQueueItem"><span class="type">GstDataQueueItem</span></a>.</td>
362 </tr>
363 <tr>
364 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
365 <td>
366 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if an <em class="parameter"><code>item</code></em> was successfully retrieved from the <em class="parameter"><code>queue</code></em>.</td>
367 </tr>
368 </tbody>
369 </table></div>
370 <p class="since">Since 0.10.11</p>
371 </div>
372 <hr>
373 <div class="refsect2">
374 <a name="gst-data-queue-flush"></a><h3>gst_data_queue_flush ()</h3>
375 <pre class="programlisting"><span class="returnvalue">void</span>                gst_data_queue_flush                (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>);</pre>
376 <p>
377 Flushes all the contents of the <em class="parameter"><code>queue</code></em>. Any call to <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-push" title="gst_data_queue_push ()"><span class="type">gst_data_queue_push</span></a> and
378 <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-pop" title="gst_data_queue_pop ()"><span class="type">gst_data_queue_pop</span></a> will be released.
379 MT safe.
380 </p>
381 <div class="variablelist"><table border="0">
382 <col align="left" valign="top">
383 <tbody><tr>
384 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
385 <td>a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
386 </tr></tbody>
387 </table></div>
388 <p class="since">Since 0.10.11</p>
389 </div>
390 <hr>
391 <div class="refsect2">
392 <a name="gst-data-queue-set-flushing"></a><h3>gst_data_queue_set_flushing ()</h3>
393 <pre class="programlisting"><span class="returnvalue">void</span>                gst_data_queue_set_flushing         (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
394                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> flushing</code></em>);</pre>
395 <p>
396 Sets the queue to flushing state if <em class="parameter"><code>flushing</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a>. If set to flushing
397 state, any incoming data on the <em class="parameter"><code>queue</code></em> will be discarded. Any call currently
398 blocking on <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-push" title="gst_data_queue_push ()"><span class="type">gst_data_queue_push</span></a> or <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-pop" title="gst_data_queue_pop ()"><span class="type">gst_data_queue_pop</span></a> will return straight
399 away with a return value of <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a>. While the <em class="parameter"><code>queue</code></em> is in flushing state, 
400 all calls to those two functions will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a>.
401 </p>
402 <p>
403 MT Safe.
404 </p>
405 <div class="variablelist"><table border="0">
406 <col align="left" valign="top">
407 <tbody>
408 <tr>
409 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
410 <td>a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
411 </tr>
412 <tr>
413 <td><p><span class="term"><em class="parameter"><code>flushing</code></em> :</span></p></td>
414 <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> stating if the queue will be flushing or not.</td>
415 </tr>
416 </tbody>
417 </table></div>
418 <p class="since">Since 0.10.11</p>
419 </div>
420 <hr>
421 <div class="refsect2">
422 <a name="gst-data-queue-drop-head"></a><h3>gst_data_queue_drop_head ()</h3>
423 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_data_queue_drop_head            (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
424                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>);</pre>
425 <p>
426 Pop and unref the head-most <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstMiniObject.html#GstMiniObject"><span class="type">GstMiniObject</span></a> with the given <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a>.
427 </p>
428 <div class="variablelist"><table border="0">
429 <col align="left" valign="top">
430 <tbody>
431 <tr>
432 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
433 <td>The <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> to drop an item from.</td>
434 </tr>
435 <tr>
436 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
437 <td>The <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of the item to drop.</td>
438 </tr>
439 <tr>
440 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
441 <td>TRUE if an element was removed.</td>
442 </tr>
443 </tbody>
444 </table></div>
445 <p class="since">Since 0.10.11</p>
446 </div>
447 <hr>
448 <div class="refsect2">
449 <a name="gst-data-queue-is-full"></a><h3>gst_data_queue_is_full ()</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>            gst_data_queue_is_full              (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>);</pre>
451 <p>
452 Queries if <em class="parameter"><code>queue</code></em> is full. This check will be done using the
453 <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueCheckFullFunction" title="GstDataQueueCheckFullFunction ()"><span class="type">GstDataQueueCheckFullFunction</span></a> registered with <em class="parameter"><code>queue</code></em>.
454 MT safe.
455 </p>
456 <div class="variablelist"><table border="0">
457 <col align="left" valign="top">
458 <tbody>
459 <tr>
460 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
461 <td>a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
462 </tr>
463 <tr>
464 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
465 <td>
466 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if <em class="parameter"><code>queue</code></em> is full.</td>
467 </tr>
468 </tbody>
469 </table></div>
470 <p class="since">Since 0.10.11</p>
471 </div>
472 <hr>
473 <div class="refsect2">
474 <a name="gst-data-queue-is-empty"></a><h3>gst_data_queue_is_empty ()</h3>
475 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_data_queue_is_empty             (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>);</pre>
476 <p>
477 Queries if there are any items in the <em class="parameter"><code>queue</code></em>.
478 MT safe.
479 </p>
480 <div class="variablelist"><table border="0">
481 <col align="left" valign="top">
482 <tbody>
483 <tr>
484 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
485 <td>a <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>.</td>
486 </tr>
487 <tr>
488 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
489 <td>
490 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if <em class="parameter"><code>queue</code></em> is empty.</td>
491 </tr>
492 </tbody>
493 </table></div>
494 <p class="since">Since 0.10.11</p>
495 </div>
496 <hr>
497 <div class="refsect2">
498 <a name="gst-data-queue-get-level"></a><h3>gst_data_queue_get_level ()</h3>
499 <pre class="programlisting"><span class="returnvalue">void</span>                gst_data_queue_get_level            (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>,
500                                                          <em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueueSize" title="struct GstDataQueueSize"><span class="type">GstDataQueueSize</span></a> *level</code></em>);</pre>
501 <p>
502 Get the current level of the queue.
503 </p>
504 <div class="variablelist"><table border="0">
505 <col align="left" valign="top">
506 <tbody>
507 <tr>
508 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
509 <td>The <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>
510 </td>
511 </tr>
512 <tr>
513 <td><p><span class="term"><em class="parameter"><code>level</code></em> :</span></p></td>
514 <td>the location to store the result</td>
515 </tr>
516 </tbody>
517 </table></div>
518 <p class="since">Since 0.10.11</p>
519 </div>
520 <hr>
521 <div class="refsect2">
522 <a name="gst-data-queue-limits-changed"></a><h3>gst_data_queue_limits_changed ()</h3>
523 <pre class="programlisting"><span class="returnvalue">void</span>                gst_data_queue_limits_changed       (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a> *queue</code></em>);</pre>
524 <p>
525 Inform the queue that the limits for the fullness check have changed and that
526 any blocking <a class="link" href="gstreamer-libs-GstDataQueue.html#gst-data-queue-push" title="gst_data_queue_push ()"><code class="function">gst_data_queue_push()</code></a> should be unblocked to recheck the limts.
527 </p>
528 <div class="variablelist"><table border="0">
529 <col align="left" valign="top">
530 <tbody><tr>
531 <td><p><span class="term"><em class="parameter"><code>queue</code></em> :</span></p></td>
532 <td>The <a class="link" href="gstreamer-libs-GstDataQueue.html#GstDataQueue" title="struct GstDataQueue"><span class="type">GstDataQueue</span></a>
533 </td>
534 </tr></tbody>
535 </table></div>
536 <p class="since">Since 0.10.11</p>
537 </div>
538 </div>
539 </div>
540 <div class="footer">
541 <hr>
542           Generated by GTK-Doc V1.17</div>
543 </body>
544 </html>