/usr/share/gtk-doc/html/gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregator.html is in gstreamer1.0-plugins-bad-doc 1.4.4-2.1+deb8u2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GStreamer Bad Plugins 1.0 Library Reference Manual: GstAggregator</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GStreamer Bad Plugins 1.0 Library Reference Manual">
<link rel="up" href="base.html" title="GStreamer Base classes from gst-plugins-bad">
<link rel="prev" href="base.html" title="GStreamer Base classes from gst-plugins-bad">
<link rel="next" href="gst-plugins-bad-libs-GstAggregatorPad.html" title="GstAggregatorPad">
<meta name="generator" content="GTK-Doc V1.21 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#gst-plugins-bad-libs-GstAggregator.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="base.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="base.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gst-plugins-bad-libs-GstAggregatorPad.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gst-plugins-bad-libs-GstAggregator"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gst-plugins-bad-libs-GstAggregator.top_of_page"></a>GstAggregator</span></h2>
<p>GstAggregator — manages a set of pads with the purpose of
aggregating their buffers.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstAggregator.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-finish-buffer" title="gst_aggregator_finish_buffer ()">gst_aggregator_finish_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-set-src-caps" title="gst_aggregator_set_src_caps ()">gst_aggregator_set_src_caps</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-iterate-sinkpads" title="gst_aggregator_iterate_sinkpads ()">gst_aggregator_iterate_sinkpads</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstAggregator.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator">GstAggregator</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregatorClass" title="struct GstAggregatorClass">GstAggregatorClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstAggregator.description"></a><h2>Description</h2>
<p>Manages a set of pads with the purpose of aggregating their buffers.
Control is given to the subclass when all pads have data.</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>
Base class for mixers and muxers. Implementers should at least implement
the <code class="function">aggregate()</code> vmethod.
</p></li>
<li class="listitem"><p>
When data is queued on all pads, tha aggregate vmethod is called.
</p></li>
<li class="listitem"><p>
One can peek at the data on any given GstAggregatorPad with the
<a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-get-buffer" title="gst_aggregator_pad_get_buffer ()"><code class="function">gst_aggregator_pad_get_buffer()</code></a> method, and take ownership of it
with the <a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#gst-aggregator-pad-steal-buffer" title="gst_aggregator_pad_steal_buffer ()"><code class="function">gst_aggregator_pad_steal_buffer()</code></a> method. When a buffer
has been taken with <code class="function">steal_buffer()</code>, a new buffer can be queued
on that pad.
</p></li>
<li class="listitem"><p>
If the subclass wishes to push a buffer downstream in its aggregate
implementation, it should do so through the
<a class="link" href="gst-plugins-bad-libs-GstAggregator.html#gst-aggregator-finish-buffer" title="gst_aggregator_finish_buffer ()"><code class="function">gst_aggregator_finish_buffer()</code></a> method. This method will take care
of sending and ordering mandatory events such as stream start, caps
and segment.
</p></li>
<li class="listitem"><p>
Same goes for EOS events, which should not be pushed directly by the
subclass, it should instead return GST_FLOW_EOS in its aggregate
implementation.
</p></li>
</ul></div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstAggregator.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-aggregator-finish-buffer"></a><h3>gst_aggregator_finish_buffer ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
gst_aggregator_finish_buffer (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator"><span class="type">GstAggregator</span></a> *agg</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>This method will take care of sending mandatory events before pushing
the provided buffer.</p>
<div class="refsect3">
<a name="id-1.2.7.2.6.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>The <a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator"><span class="type">GstAggregator</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html"><span class="type">GstBuffer</span></a> to push.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-aggregator-set-src-caps"></a><h3>gst_aggregator_set_src_caps ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_aggregator_set_src_caps (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator"><span class="type">GstAggregator</span></a> *agg</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html"><span class="type">GstCaps</span></a> *caps</code></em>);</pre>
<p>Sets the caps to be used on the src pad.</p>
<div class="refsect3">
<a name="id-1.2.7.2.6.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>The <a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator"><span class="type">GstAggregator</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>caps</p></td>
<td class="parameter_description"><p>The <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html"><span class="type">GstCaps</span></a> to set later on the src pad.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-aggregator-iterate-sinkpads"></a><h3>gst_aggregator_iterate_sinkpads ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_aggregator_iterate_sinkpads (<em class="parameter"><code><a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator"><span class="type">GstAggregator</span></a> *self</code></em>,
<em class="parameter"><code><span class="type">GstAggregatorPadForeachFunc</span> func</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Iterate the sinkpads of aggregator to call a function on them.</p>
<p>This method guarantees that <em class="parameter"><code>func</code></em>
will be called only once for each
sink pad.</p>
<div class="refsect3">
<a name="id-1.2.7.2.6.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>The <a class="link" href="gst-plugins-bad-libs-GstAggregator.html#GstAggregator" title="struct GstAggregator"><span class="type">GstAggregator</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>The function to call.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>The data to pass to <em class="parameter"><code>func</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstAggregator.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstAggregator"></a><h3>struct GstAggregator</h3>
<pre class="programlisting">struct GstAggregator {
GstElement parent;
GstPad * srcpad;
GstSegment segment;
};
</pre>
<p>Collectpads object.</p>
<div class="refsect3">
<a name="id-1.2.7.2.7.2.5"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html"><span class="type">GstElement</span></a> <em class="structfield"><code><a name="GstAggregator.parent"></a>parent</code></em>;</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html"><span class="type">GstPad</span></a> *<em class="structfield"><code><a name="GstAggregator.srcpad"></a>srcpad</code></em>;</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstSegment.html"><span class="type">GstSegment</span></a> <em class="structfield"><code><a name="GstAggregator.segment"></a>segment</code></em>;</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstAggregatorClass"></a><h3>struct GstAggregatorClass</h3>
<pre class="programlisting">struct GstAggregatorClass {
GstElementClass parent_class;
GType sinkpads_type;
GstFlowReturn (*flush) (GstAggregator * aggregator);
GstFlowReturn (*clip) (GstAggregator * agg,
GstAggregatorPad * bpad,
GstBuffer * buf,
GstBuffer ** outbuf);
/* sinkpads virtual methods */
gboolean (*sink_event) (GstAggregator * aggregate,
GstAggregatorPad * bpad,
GstEvent * event);
gboolean (*sink_query) (GstAggregator * aggregate,
GstAggregatorPad * bpad,
GstQuery * query);
/* srcpad virtual methods */
gboolean (*src_event) (GstAggregator * aggregate,
GstEvent * event);
gboolean (*src_query) (GstAggregator * aggregate,
GstQuery * query);
gboolean (*src_activate) (GstAggregator * aggregator,
GstPadMode mode,
gboolean active);
GstFlowReturn (*aggregate) (GstAggregator * aggregator);
gboolean (*stop) (GstAggregator * aggregator);
gboolean (*start) (GstAggregator * aggregator);
};
</pre>
<p>The aggregator base class will handle in a thread-safe way all manners of
concurrent flushes, seeks, pad additions and removals, leaving to the
subclass the responsibility of clipping buffers, and aggregating buffers in
the way the implementor sees fit.</p>
<p>It will also take care of event ordering (stream-start, segment, eos).</p>
<p>Basically, a basic implementation will override <em class="parameter"><code>aggregate</code></em>
, and call
_finish_buffer from inside that function.</p>
<div class="refsect3">
<a name="id-1.2.7.2.7.3.7"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElementClass"><span class="type">GstElementClass</span></a> <em class="structfield"><code><a name="GstAggregatorClass.parent-class"></a>parent_class</code></em>;</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> <em class="structfield"><code><a name="GstAggregatorClass.sinkpads-type"></a>sinkpads_type</code></em>;</p></td>
<td class="struct_member_description"><p>Optional.
The type of the pads that should be created when
GstElement.request_new_pad is called.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.flush"></a>flush</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Called after a succesful flushing seek, once all the flush
stops have been received. Flush pad-specific data in
<a class="link" href="gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPad" title="struct GstAggregatorPad"><span class="type">GstAggregatorPad</span></a>->flush.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.clip"></a>clip</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Called when a buffer is received on a sink pad, the task
of clipping it and translating it to the current segment
falls on the subclass.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.sink-event"></a>sink_event</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Called when an event is received on a sink pad, the subclass
should always chain up.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.sink-query"></a>sink_query</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Called when a query is received on a sink pad, the subclass
should always chain up.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.src-event"></a>src_event</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Called when an event is received on the src pad, the subclass
should always chain up.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.src-query"></a>src_query</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Called when a query is received on the src pad, the subclass
should always chain up.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.src-activate"></a>src_activate</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Called when the src pad is activated, it will start/stop its
pad task right after that call.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.aggregate"></a>aggregate</code></em> ()</p></td>
<td class="struct_member_description"><p>Mandatory.
Called when buffers are queued on all sinkpads. Classes
should iterate the GstElement->sinkpads and peek or steal
buffers from the <a href="../gst-plugins-bad-libs-1.0/gst-plugins-bad-libs-GstAggregatorPad.html#GstAggregatorPad"><span class="type">GstAggregatorPads</span></a>. If the subclass returns
GST_FLOW_EOS, sending of the eos event will be taken care
of. Once / if a buffer has been constructed from the
aggregated buffers, the subclass should call _finish_buffer.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.stop"></a>stop</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Should be linked up first. Called when the
element goes from PAUSED to READY. The subclass should free
all resources and reset its state.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAggregatorClass.start"></a>start</code></em> ()</p></td>
<td class="struct_member_description"><p>Optional.
Should be linked up first. Called when the element goes from
READY to PAUSED. The subclass should get ready to process
aggregated buffers.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="gst-plugins-bad-libs-GstAggregator.see-also"></a><h2>See Also</h2>
<p>gstcollectpads for historical reasons.</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.21</div>
</body>
</html>
|