• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>GstAudioAggregator: GStreamer Base Plugins 1.0 Library Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Base Plugins 1.0 Library Reference Manual">
8<link rel="up" href="gstreamer-audio.html" title="Audio Library">
9<link rel="prev" href="gst-plugins-base-libs-GstAudio-meta.html" title="GstAudio meta">
10<link rel="next" href="GstAudioCdSrc.html" title="GstAudioCdSrc">
11<meta name="generator" content="GTK-Doc V1.28 (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="5"><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">|</span18                  <a href="#GstAudioAggregator.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span19                  <a href="#GstAudioAggregator.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span20                  <a href="#GstAudioAggregator.properties" class="shortcut">Properties</a></span>
21</td>
22<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
23<td><a accesskey="u" href="gstreamer-audio.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24<td><a accesskey="p" href="gst-plugins-base-libs-GstAudio-meta.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25<td><a accesskey="n" href="GstAudioCdSrc.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
26</tr></table>
27<div class="refentry">
28<a name="GstAudioAggregator"></a><div class="titlepage"></div>
29<div class="refnamediv"><table width="100%"><tr>
30<td valign="top">
31<h2><span class="refentrytitle"><a name="GstAudioAggregator.top_of_page"></a>GstAudioAggregator</span></h2>
32<p>GstAudioAggregator — Base class that manages a set of audio input pads
33with the purpose of aggregating or mixing their raw audio input buffers</p>
34</td>
35<td class="gallery_image" valign="top" align="right"></td>
36</tr></table></div>
37<div class="refsect1">
38<a name="GstAudioAggregator.functions"></a><h2>Functions</h2>
39<div class="informaltable"><table class="informaltable" width="100%" border="0">
40<colgroup>
41<col width="150px" class="functions_return">
42<col class="functions_name">
43</colgroup>
44<tbody><tr>
45<td class="function_type">
46<span class="returnvalue">void</span>
47</td>
48<td class="function_name">
49<a class="link" href="GstAudioAggregator.html#gst-audio-aggregator-set-sink-caps" title="gst_audio_aggregator_set_sink_caps ()">gst_audio_aggregator_set_sink_caps</a> <span class="c_punctuation">()</span>
50</td>
51</tr></tbody>
52</table></div>
53</div>
54<div class="refsect1">
55<a name="GstAudioAggregator.properties"></a><h2>Properties</h2>
56<div class="informaltable"><table class="informaltable" border="0">
57<colgroup>
58<col width="150px" class="properties_type">
59<col width="300px" class="properties_name">
60<col width="200px" class="properties_flags">
61</colgroup>
62<tbody>
63<tr>
64<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></td>
65<td class="property_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregator--alignment-threshold" title="The “alignment-threshold” property">alignment-threshold</a></td>
66<td class="property_flags">Read / Write</td>
67</tr>
68<tr>
69<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></td>
70<td class="property_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregator--discont-wait" title="The “discont-wait” property">discont-wait</a></td>
71<td class="property_flags">Read / Write</td>
72</tr>
73<tr>
74<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></td>
75<td class="property_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregator--output-buffer-duration" title="The “output-buffer-duration” property">output-buffer-duration</a></td>
76<td class="property_flags">Read / Write</td>
77</tr>
78<tr>
79<td class="property_type">
80<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstStructure.html#GstStructure-struct"><span class="type">GstStructure</span></a> *</td>
81<td class="property_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregatorConvertPad--converter-config" title="The “converter-config” property">converter-config</a></td>
82<td class="property_flags">Read / Write</td>
83</tr>
84</tbody>
85</table></div>
86</div>
87<a name="GstAudioAggregatorPad"></a><a name="GstAudioAggregatorConvertPad"></a><div class="refsect1">
88<a name="GstAudioAggregator.other"></a><h2>Types and Values</h2>
89<div class="informaltable"><table class="informaltable" width="100%" border="0">
90<colgroup>
91<col width="150px" class="name">
92<col class="description">
93</colgroup>
94<tbody>
95<tr>
96<td class="datatype_keyword">struct</td>
97<td class="function_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregator-struct" title="struct GstAudioAggregator">GstAudioAggregator</a></td>
98</tr>
99<tr>
100<td class="datatype_keyword">struct</td>
101<td class="function_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregatorClass" title="struct GstAudioAggregatorClass">GstAudioAggregatorClass</a></td>
102</tr>
103<tr>
104<td class="datatype_keyword">struct</td>
105<td class="function_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregatorPad-struct" title="struct GstAudioAggregatorPad">GstAudioAggregatorPad</a></td>
106</tr>
107<tr>
108<td class="datatype_keyword">struct</td>
109<td class="function_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregatorPadClass" title="struct GstAudioAggregatorPadClass">GstAudioAggregatorPadClass</a></td>
110</tr>
111<tr>
112<td class="datatype_keyword">struct</td>
113<td class="function_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregatorConvertPad-struct" title="struct GstAudioAggregatorConvertPad">GstAudioAggregatorConvertPad</a></td>
114</tr>
115<tr>
116<td class="datatype_keyword">struct</td>
117<td class="function_name"><a class="link" href="GstAudioAggregator.html#GstAudioAggregatorConvertPadClass" title="struct GstAudioAggregatorConvertPadClass">GstAudioAggregatorConvertPadClass</a></td>
118</tr>
119</tbody>
120</table></div>
121</div>
122<div class="refsect1">
123<a name="GstAudioAggregator.object-hierarchy"></a><h2>Object Hierarchy</h2>
124<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
125    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
126        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
127            <span class="lineart">├──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
128            <span class="lineart">│</span>   <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstAggregator.html#GstAggregator-struct">GstAggregator</a>
129            <span class="lineart">│</span>       <span class="lineart">╰──</span> GstAudioAggregator
130            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstPad-struct">GstPad</a>
131                <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstAggregatorPad.html#GstAggregatorPad-struct">GstAggregatorPad</a>
132                    <span class="lineart">╰──</span> GstAudioAggregatorPad
133                        <span class="lineart">╰──</span> GstAudioAggregatorConvertPad
134</pre>
135</div>
136<div class="refsect1">
137<a name="GstAudioAggregator.includes"></a><h2>Includes</h2>
138<pre class="synopsis">#include &lt;gst/audio/audio.h&gt;
139</pre>
140</div>
141<div class="refsect1">
142<a name="GstAudioAggregator.description"></a><h2>Description</h2>
143<p>Subclasses must use (a subclass of) <a class="link" href="GstAudioAggregator.html#GstAudioAggregatorPad"><span class="type">GstAudioAggregatorPad</span></a> for both
144their source and sink pads,
145<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#gst-element-class-add-static-pad-template-with-gtype"><code class="function">gst_element_class_add_static_pad_template_with_gtype()</code></a> is a convenient
146helper.</p>
147<p><a class="link" href="GstAudioAggregator.html" title="GstAudioAggregator"><span class="type">GstAudioAggregator</span></a> can perform conversion on the data arriving
148on its sink pads, based on the format expected downstream: in order
149to enable that behaviour, the GType of the sink pads must either be
150a (subclass of) <a class="link" href="GstAudioAggregator.html#GstAudioAggregatorConvertPad"><span class="type">GstAudioAggregatorConvertPad</span></a> to use the default
151<a class="link" href="gst-plugins-base-libs-GstAudioConverter.html#GstAudioConverter" title="GstAudioConverter"><span class="type">GstAudioConverter</span></a> implementation, or a subclass of <a class="link" href="GstAudioAggregator.html#GstAudioAggregatorPad"><span class="type">GstAudioAggregatorPad</span></a>
152implementing <a class="link" href="GstAudioAggregator.html#GstAudioAggregatorPadClass.convert-buffer"><span class="type">GstAudioAggregatorPadClass.convert_buffer</span></a>.</p>
153<p>To allow for the output caps to change, the mechanism is the same as
154above, with the GType of the source pad.</p>
155<p>See <a href="/usr/share/gtk-doc/html/gst-plugins-base-plugins-1.0/gst-plugins-base-plugins-audiomixer.html#GstAudioMixer-struct"><span class="type">GstAudioMixer</span></a> for an example.</p>
156<p>When conversion is enabled, <a class="link" href="GstAudioAggregator.html" title="GstAudioAggregator"><span class="type">GstAudioAggregator</span></a> will accept
157any type of raw audio caps and perform conversion
158on the data arriving on its sink pads, with whatever downstream
159expects as the target format.</p>
160<p>In case downstream caps are not fully fixated, it will use
161the first configured sink pad to finish fixating its source pad
162caps.</p>
163<p>A notable exception for now is the sample rate, sink pads must
164have the same sample rate as either the downstream requirement,
165or the first configured pad, or a combination of both (when
166downstream specifies a range or a set of acceptable rates).</p>
167</div>
168<div class="refsect1">
169<a name="GstAudioAggregator.functions_details"></a><h2>Functions</h2>
170<div class="refsect2">
171<a name="gst-audio-aggregator-set-sink-caps"></a><h3>gst_audio_aggregator_set_sink_caps ()</h3>
172<pre class="programlisting"><span class="returnvalue">void</span>
173gst_audio_aggregator_set_sink_caps (<em class="parameter"><code><a class="link" href="GstAudioAggregator.html" title="GstAudioAggregator"><span class="type">GstAudioAggregator</span></a> *aagg</code></em>,
174                                    <em class="parameter"><code><a class="link" href="GstAudioAggregator.html#GstAudioAggregatorPad"><span class="type">GstAudioAggregatorPad</span></a> *pad</code></em>,
175                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>);</pre>
176</div>
177</div>
178<div class="refsect1">
179<a name="GstAudioAggregator.other_details"></a><h2>Types and Values</h2>
180<div class="refsect2">
181<a name="GstAudioAggregator-struct"></a><h3>struct GstAudioAggregator</h3>
182<pre class="programlisting">struct GstAudioAggregator {
183  GstCaps                   *current_caps;
184};
185</pre>
186<p>GstAudioAggregator object</p>
187<div class="refsect3">
188<a name="GstAudioAggregator.members"></a><h4>Members</h4>
189<div class="informaltable"><table class="informaltable" width="100%" border="0">
190<colgroup>
191<col width="300px" class="struct_members_name">
192<col class="struct_members_description">
193<col width="200px" class="struct_members_annotations">
194</colgroup>
195<tbody><tr>
196<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *<em class="structfield"><code><a name="GstAudioAggregator-struct.current-caps"></a>current_caps</code></em>;</p></td>
197<td class="struct_member_description"><p>The caps set by the subclass</p></td>
198<td class="struct_member_annotations"> </td>
199</tr></tbody>
200</table></div>
201</div>
202<p class="since">Since: <a class="link" href="ix04.html#api-index-1.14">1.14</a></p>
203</div>
204<hr>
205<div class="refsect2">
206<a name="GstAudioAggregatorClass"></a><h3>struct GstAudioAggregatorClass</h3>
207<pre class="programlisting">struct GstAudioAggregatorClass {
208  GstAggregatorClass   parent_class;
209
210  GstBuffer * (* create_output_buffer) (GstAudioAggregator * aagg,
211      guint num_frames);
212  gboolean (* aggregate_one_buffer) (GstAudioAggregator * aagg,
213      GstAudioAggregatorPad * pad, GstBuffer * inbuf, guint in_offset,
214      GstBuffer * outbuf, guint out_offset, guint num_frames);
215};
216</pre>
217<div class="refsect3">
218<a name="GstAudioAggregatorClass.members"></a><h4>Members</h4>
219<div class="informaltable"><table class="informaltable" width="100%" border="0">
220<colgroup>
221<col width="300px" class="struct_members_name">
222<col class="struct_members_description">
223<col width="200px" class="struct_members_annotations">
224</colgroup>
225<tbody>
226<tr>
227<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioAggregatorClass.create-output-buffer"></a>create_output_buffer</code></em> ()</p></td>
228<td class="struct_member_description"><p>Create a new output buffer contains num_frames frames.</p></td>
229<td class="struct_member_annotations"> </td>
230</tr>
231<tr>
232<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioAggregatorClass.aggregate-one-buffer"></a>aggregate_one_buffer</code></em> ()</p></td>
233<td class="struct_member_description"><p>Aggregates one input buffer to the output
234buffer.  The in_offset and out_offset are in "frames", which is
235the size of a sample times the number of channels. Returns TRUE if
236any non-silence was added to the buffer</p></td>
237<td class="struct_member_annotations"> </td>
238</tr>
239</tbody>
240</table></div>
241</div>
242<p class="since">Since: <a class="link" href="ix04.html#api-index-1.14">1.14</a></p>
243</div>
244<hr>
245<div class="refsect2">
246<a name="GstAudioAggregatorPad-struct"></a><h3>struct GstAudioAggregatorPad</h3>
247<pre class="programlisting">struct GstAudioAggregatorPad {
248  /* read-only, with OBJECT_LOCK */
249  GstAudioInfo                      info;
250};
251</pre>
252<p>The default implementation of GstPad used with <a class="link" href="GstAudioAggregator.html" title="GstAudioAggregator"><span class="type">GstAudioAggregator</span></a></p>
253<div class="refsect3">
254<a name="GstAudioAggregatorPad.members"></a><h4>Members</h4>
255<div class="informaltable"><table class="informaltable" width="100%" border="0">
256<colgroup>
257<col width="300px" class="struct_members_name">
258<col class="struct_members_description">
259<col width="200px" class="struct_members_annotations">
260</colgroup>
261<tbody><tr>
262<td class="struct_member_name"><p><a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioInfo"><span class="type">GstAudioInfo</span></a> <em class="structfield"><code><a name="GstAudioAggregatorPad-struct.info"></a>info</code></em>;</p></td>
263<td class="struct_member_description"><p>The audio info for this pad set from the incoming caps</p></td>
264<td class="struct_member_annotations"> </td>
265</tr></tbody>
266</table></div>
267</div>
268<p class="since">Since: <a class="link" href="ix04.html#api-index-1.14">1.14</a></p>
269</div>
270<hr>
271<div class="refsect2">
272<a name="GstAudioAggregatorPadClass"></a><h3>struct GstAudioAggregatorPadClass</h3>
273<pre class="programlisting">struct GstAudioAggregatorPadClass {
274  GstAggregatorPadClass   parent_class;
275
276  GstBuffer * (* convert_buffer) (GstAudioAggregatorPad * pad,
277                                  GstAudioInfo *in_info,
278                                  GstAudioInfo *out_info,
279                                  GstBuffer * buffer);
280
281  void        (* update_conversion_info) (GstAudioAggregatorPad *pad);
282};
283</pre>
284<div class="refsect3">
285<a name="GstAudioAggregatorPadClass.members"></a><h4>Members</h4>
286<div class="informaltable"><table class="informaltable" width="100%" border="0">
287<colgroup>
288<col width="300px" class="struct_members_name">
289<col class="struct_members_description">
290<col width="200px" class="struct_members_annotations">
291</colgroup>
292<tbody>
293<tr>
294<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioAggregatorPadClass.convert-buffer"></a>convert_buffer</code></em> ()</p></td>
295<td class="struct_member_description"><p>Convert a buffer from one format to another.</p></td>
296<td class="struct_member_annotations"> </td>
297</tr>
298<tr>
299<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioAggregatorPadClass.update-conversion-info"></a>update_conversion_info</code></em> ()</p></td>
300<td class="struct_member_description"><p>Called when either the input or output
301formats have changed.</p></td>
302<td class="struct_member_annotations"> </td>
303</tr>
304</tbody>
305</table></div>
306</div>
307<p class="since">Since: <a class="link" href="ix04.html#api-index-1.14">1.14</a></p>
308</div>
309<hr>
310<div class="refsect2">
311<a name="GstAudioAggregatorConvertPad-struct"></a><h3>struct GstAudioAggregatorConvertPad</h3>
312<pre class="programlisting">struct GstAudioAggregatorConvertPad;</pre>
313<p>An implementation of GstPad that can be used with <a class="link" href="GstAudioAggregator.html" title="GstAudioAggregator"><span class="type">GstAudioAggregator</span></a>.</p>
314<p>See <a class="link" href="GstAudioAggregator.html" title="GstAudioAggregator"><span class="type">GstAudioAggregator</span></a> for more details.</p>
315<p class="since">Since: <a class="link" href="ix04.html#api-index-1.14">1.14</a></p>
316</div>
317<hr>
318<div class="refsect2">
319<a name="GstAudioAggregatorConvertPadClass"></a><h3>struct GstAudioAggregatorConvertPadClass</h3>
320<pre class="programlisting">struct GstAudioAggregatorConvertPadClass {
321  GstAudioAggregatorPadClass   parent_class;
322};
323</pre>
324<p class="since">Since: <a class="link" href="ix04.html#api-index-1.14">1.14</a></p>
325</div>
326</div>
327<div class="refsect1">
328<a name="GstAudioAggregator.property-details"></a><h2>Property Details</h2>
329<div class="refsect2">
330<a name="GstAudioAggregator--alignment-threshold"></a><h3>The <code class="literal">“alignment-threshold”</code> property</h3>
331<pre class="programlisting">  “alignment-threshold”      <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></pre>
332<p>Timestamp alignment threshold in nanoseconds.</p>
333<p>Flags: Read / Write</p>
334<p>Allowed values: &lt;= 18446744073709551614</p>
335<p>Default value: 40000000</p>
336</div>
337<hr>
338<div class="refsect2">
339<a name="GstAudioAggregator--discont-wait"></a><h3>The <code class="literal">“discont-wait”</code> property</h3>
340<pre class="programlisting">  “discont-wait”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></pre>
341<p>Window of time in nanoseconds to wait before creating a discontinuity.</p>
342<p>Flags: Read / Write</p>
343<p>Allowed values: &lt;= 18446744073709551614</p>
344<p>Default value: 1000000000</p>
345</div>
346<hr>
347<div class="refsect2">
348<a name="GstAudioAggregator--output-buffer-duration"></a><h3>The <code class="literal">“output-buffer-duration”</code> property</h3>
349<pre class="programlisting">  “output-buffer-duration”   <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a></pre>
350<p>Output block size in nanoseconds.</p>
351<p>Flags: Read / Write</p>
352<p>Allowed values: &gt;= 1</p>
353<p>Default value: 10000000</p>
354</div>
355<hr>
356<div class="refsect2">
357<a name="GstAudioAggregatorConvertPad--converter-config"></a><h3>The <code class="literal">“converter-config”</code> property</h3>
358<pre class="programlisting">  “converter-config”         <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstStructure.html#GstStructure-struct"><span class="type">GstStructure</span></a> *</pre>
359<p>A GstStructure describing the configuration that should be used when converting this pad's audio buffers.</p>
360<p>Flags: Read / Write</p>
361</div>
362</div>
363<div class="refsect1">
364<a name="GstAudioAggregator.see-also"></a><h2>See Also</h2>
365<p><a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstAggregator.html#GstAggregator-struct"><span class="type">GstAggregator</span></a>, <a href="/usr/share/gtk-doc/html/gst-plugins-base-plugins-1.0/gst-plugins-base-plugins-audiomixer.html#GstAudioMixer-struct"><span class="type">GstAudioMixer</span></a></p>
366</div>
367</div>
368<div class="footer">
369<hr>Generated by GTK-Doc V1.28</div>
370</body>
371</html>