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>Audio-channels: 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="GstAudioBaseSrc.html" title="GstAudioBaseSrc"> 10<link rel="next" href="gst-plugins-base-libs-GstAudioConverter.html" title="GstAudioConverter"> 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">|</span> 18 <a href="#gst-plugins-base-libs-Audio-channels.description" class="shortcut">Description</a></span> 19</td> 20<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 21<td><a accesskey="u" href="gstreamer-audio.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 22<td><a accesskey="p" href="GstAudioBaseSrc.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 23<td><a accesskey="n" href="gst-plugins-base-libs-GstAudioConverter.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 24</tr></table> 25<div class="refentry"> 26<a name="gst-plugins-base-libs-Audio-channels"></a><div class="titlepage"></div> 27<div class="refnamediv"><table width="100%"><tr> 28<td valign="top"> 29<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-Audio-channels.top_of_page"></a>Audio-channels</span></h2> 30<p>Audio-channels — Support library for audio channel handling</p> 31</td> 32<td class="gallery_image" valign="top" align="right"></td> 33</tr></table></div> 34<div class="refsect1"> 35<a name="gst-plugins-base-libs-Audio-channels.functions"></a><h2>Functions</h2> 36<div class="informaltable"><table class="informaltable" width="100%" border="0"> 37<colgroup> 38<col width="150px" class="functions_return"> 39<col class="functions_name"> 40</colgroup> 41<tbody> 42<tr> 43<td class="define_keyword">#define</td> 44<td class="function_name"> 45<a class="link" href="gst-plugins-base-libs-Audio-channels.html#GST-AUDIO-CHANNEL-POSITION-MASK:CAPS" title="GST_AUDIO_CHANNEL_POSITION_MASK()">GST_AUDIO_CHANNEL_POSITION_MASK</a><span class="c_punctuation">()</span> 46</td> 47</tr> 48<tr> 49<td class="function_type"> 50<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 51</td> 52<td class="function_name"> 53<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-positions-to-mask" title="gst_audio_channel_positions_to_mask ()">gst_audio_channel_positions_to_mask</a> <span class="c_punctuation">()</span> 54</td> 55</tr> 56<tr> 57<td class="function_type"> 58<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 59</td> 60<td class="function_name"> 61<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-positions-from-mask" title="gst_audio_channel_positions_from_mask ()">gst_audio_channel_positions_from_mask</a> <span class="c_punctuation">()</span> 62</td> 63</tr> 64<tr> 65<td class="function_type"> 66<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 67</td> 68<td class="function_name"> 69<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-positions-to-valid-order" title="gst_audio_channel_positions_to_valid_order ()">gst_audio_channel_positions_to_valid_order</a> <span class="c_punctuation">()</span> 70</td> 71</tr> 72<tr> 73<td class="function_type"> 74<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a> 75</td> 76<td class="function_name"> 77<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-get-fallback-mask" title="gst_audio_channel_get_fallback_mask ()">gst_audio_channel_get_fallback_mask</a> <span class="c_punctuation">()</span> 78</td> 79</tr> 80<tr> 81<td class="function_type"> 82<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 83</td> 84<td class="function_name"> 85<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-check-valid-channel-positions" title="gst_audio_check_valid_channel_positions ()">gst_audio_check_valid_channel_positions</a> <span class="c_punctuation">()</span> 86</td> 87</tr> 88<tr> 89<td class="function_type"> 90<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 91</td> 92<td class="function_name"> 93<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-buffer-reorder-channels" title="gst_audio_buffer_reorder_channels ()">gst_audio_buffer_reorder_channels</a> <span class="c_punctuation">()</span> 94</td> 95</tr> 96<tr> 97<td class="function_type"> 98<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 99</td> 100<td class="function_name"> 101<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-reorder-channels" title="gst_audio_reorder_channels ()">gst_audio_reorder_channels</a> <span class="c_punctuation">()</span> 102</td> 103</tr> 104<tr> 105<td class="function_type"> 106<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 107</td> 108<td class="function_name"> 109<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-get-channel-reorder-map" title="gst_audio_get_channel_reorder_map ()">gst_audio_get_channel_reorder_map</a> <span class="c_punctuation">()</span> 110</td> 111</tr> 112<tr> 113<td class="function_type"> 114<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 115</td> 116<td class="function_name"> 117<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-positions-to-string" title="gst_audio_channel_positions_to_string ()">gst_audio_channel_positions_to_string</a> <span class="c_punctuation">()</span> 118</td> 119</tr> 120<tr> 121<td class="function_type"> 122<a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="returnvalue">GstAudioChannelMixer</span></a> * 123</td> 124<td class="function_name"> 125<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-mixer-new" title="gst_audio_channel_mixer_new ()">gst_audio_channel_mixer_new</a> <span class="c_punctuation">()</span> 126</td> 127</tr> 128<tr> 129<td class="function_type"> 130<a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="returnvalue">GstAudioChannelMixer</span></a> * 131</td> 132<td class="function_name"> 133<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-mixer-new-with-matrix" title="gst_audio_channel_mixer_new_with_matrix ()">gst_audio_channel_mixer_new_with_matrix</a> <span class="c_punctuation">()</span> 134</td> 135</tr> 136<tr> 137<td class="function_type"> 138<span class="returnvalue">void</span> 139</td> 140<td class="function_name"> 141<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-mixer-free" title="gst_audio_channel_mixer_free ()">gst_audio_channel_mixer_free</a> <span class="c_punctuation">()</span> 142</td> 143</tr> 144<tr> 145<td class="function_type"> 146<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 147</td> 148<td class="function_name"> 149<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-mixer-is-passthrough" title="gst_audio_channel_mixer_is_passthrough ()">gst_audio_channel_mixer_is_passthrough</a> <span class="c_punctuation">()</span> 150</td> 151</tr> 152<tr> 153<td class="function_type"> 154<span class="returnvalue">void</span> 155</td> 156<td class="function_name"> 157<a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-mixer-samples" title="gst_audio_channel_mixer_samples ()">gst_audio_channel_mixer_samples</a> <span class="c_punctuation">()</span> 158</td> 159</tr> 160</tbody> 161</table></div> 162</div> 163<div class="refsect1"> 164<a name="gst-plugins-base-libs-Audio-channels.other"></a><h2>Types and Values</h2> 165<div class="informaltable"><table class="informaltable" width="100%" border="0"> 166<colgroup> 167<col width="150px" class="name"> 168<col class="description"> 169</colgroup> 170<tbody> 171<tr> 172<td class="datatype_keyword">enum</td> 173<td class="function_name"><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition">GstAudioChannelPosition</a></td> 174</tr> 175<tr> 176<td class="datatype_keyword"> </td> 177<td class="function_name"><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer">GstAudioChannelMixer</a></td> 178</tr> 179<tr> 180<td class="datatype_keyword">enum</td> 181<td class="function_name"><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixerFlags" title="enum GstAudioChannelMixerFlags">GstAudioChannelMixerFlags</a></td> 182</tr> 183</tbody> 184</table></div> 185</div> 186<div class="refsect1"> 187<a name="gst-plugins-base-libs-Audio-channels.includes"></a><h2>Includes</h2> 188<pre class="synopsis">#include <gst/audio/audio.h> 189</pre> 190</div> 191<div class="refsect1"> 192<a name="gst-plugins-base-libs-Audio-channels.description"></a><h2>Description</h2> 193<p>This library contains some helper functions for multichannel audio.</p> 194</div> 195<div class="refsect1"> 196<a name="gst-plugins-base-libs-Audio-channels.functions_details"></a><h2>Functions</h2> 197<div class="refsect2"> 198<a name="GST-AUDIO-CHANNEL-POSITION-MASK:CAPS"></a><h3>GST_AUDIO_CHANNEL_POSITION_MASK()</h3> 199<pre class="programlisting">#define GST_AUDIO_CHANNEL_POSITION_MASK(pos) (G_GUINT64_CONSTANT(1)<< GST_AUDIO_CHANNEL_POSITION_ ## pos) 200</pre> 201</div> 202<hr> 203<div class="refsect2"> 204<a name="gst-audio-channel-positions-to-mask"></a><h3>gst_audio_channel_positions_to_mask ()</h3> 205<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 206gst_audio_channel_positions_to_mask (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *position</code></em>, 207 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>, 208 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> force_order</code></em>, 209 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> *channel_mask</code></em>);</pre> 210<p>Convert the <em class="parameter"><code>position</code></em> 211 array of <em class="parameter"><code>channels</code></em> 212 channels to a bitmask.</p> 213<p>If <em class="parameter"><code>force_order</code></em> 214 is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> it additionally checks if the channels are 215in the order required by GStreamer.</p> 216<div class="refsect3"> 217<a name="gst-audio-channel-positions-to-mask.parameters"></a><h4>Parameters</h4> 218<div class="informaltable"><table class="informaltable" width="100%" border="0"> 219<colgroup> 220<col width="150px" class="parameters_name"> 221<col class="parameters_description"> 222<col width="200px" class="parameters_annotations"> 223</colgroup> 224<tbody> 225<tr> 226<td class="parameter_name"><p>position</p></td> 227<td class="parameter_description"><p>The <a href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition"><code class="literal">GstAudioChannelPositions</code></a>. </p></td> 228<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 229</tr> 230<tr> 231<td class="parameter_name"><p>channels</p></td> 232<td class="parameter_description"><p>The number of channels.</p></td> 233<td class="parameter_annotations"> </td> 234</tr> 235<tr> 236<td class="parameter_name"><p>force_order</p></td> 237<td class="parameter_description"><p>Only consider the GStreamer channel order.</p></td> 238<td class="parameter_annotations"> </td> 239</tr> 240<tr> 241<td class="parameter_name"><p>channel_mask</p></td> 242<td class="parameter_description"><p>the output channel mask. </p></td> 243<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> 244</tr> 245</tbody> 246</table></div> 247</div> 248<div class="refsect3"> 249<a name="gst-audio-channel-positions-to-mask.returns"></a><h4>Returns</h4> 250<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the channel positions are valid and could be converted.</p> 251</div> 252</div> 253<hr> 254<div class="refsect2"> 255<a name="gst-audio-channel-positions-from-mask"></a><h3>gst_audio_channel_positions_from_mask ()</h3> 256<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 257gst_audio_channel_positions_from_mask (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>, 258 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="type">guint64</span></a> channel_mask</code></em>, 259 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *position</code></em>);</pre> 260<p>Convert the <em class="parameter"><code>channels</code></em> 261 present in <em class="parameter"><code>channel_mask</code></em> 262 to a <em class="parameter"><code>position</code></em> 263 array 264(which should have at least <em class="parameter"><code>channels</code></em> 265 entries ensured by caller). 266If <em class="parameter"><code>channel_mask</code></em> 267 is set to 0, it is considered as 'not present' for purpose 268of conversion. 269A partially valid <em class="parameter"><code>channel_mask</code></em> 270 with less bits set than the number 271of channels is considered valid.</p> 272<div class="refsect3"> 273<a name="gst-audio-channel-positions-from-mask.parameters"></a><h4>Parameters</h4> 274<div class="informaltable"><table class="informaltable" width="100%" border="0"> 275<colgroup> 276<col width="150px" class="parameters_name"> 277<col class="parameters_description"> 278<col width="200px" class="parameters_annotations"> 279</colgroup> 280<tbody> 281<tr> 282<td class="parameter_name"><p>channels</p></td> 283<td class="parameter_description"><p>The number of channels</p></td> 284<td class="parameter_annotations"> </td> 285</tr> 286<tr> 287<td class="parameter_name"><p>channel_mask</p></td> 288<td class="parameter_description"><p>The input channel_mask</p></td> 289<td class="parameter_annotations"> </td> 290</tr> 291<tr> 292<td class="parameter_name"><p>position</p></td> 293<td class="parameter_description"><p>The 294<a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><code class="literal">GstAudioChannelPosition</code></a>s. </p></td> 295<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 296</tr> 297</tbody> 298</table></div> 299</div> 300<div class="refsect3"> 301<a name="gst-audio-channel-positions-from-mask.returns"></a><h4>Returns</h4> 302<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if channel and channel mask are valid and could be converted</p> 303</div> 304</div> 305<hr> 306<div class="refsect2"> 307<a name="gst-audio-channel-positions-to-valid-order"></a><h3>gst_audio_channel_positions_to_valid_order ()</h3> 308<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 309gst_audio_channel_positions_to_valid_order 310 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *position</code></em>, 311 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>);</pre> 312<p>Reorders the channel positions in <em class="parameter"><code>position</code></em> 313 from any order to 314the GStreamer channel order.</p> 315<div class="refsect3"> 316<a name="gst-audio-channel-positions-to-valid-order.parameters"></a><h4>Parameters</h4> 317<div class="informaltable"><table class="informaltable" width="100%" border="0"> 318<colgroup> 319<col width="150px" class="parameters_name"> 320<col class="parameters_description"> 321<col width="200px" class="parameters_annotations"> 322</colgroup> 323<tbody> 324<tr> 325<td class="parameter_name"><p>position</p></td> 326<td class="parameter_description"><p>The channel positions to 327reorder to. </p></td> 328<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 329</tr> 330<tr> 331<td class="parameter_name"><p>channels</p></td> 332<td class="parameter_description"><p>The number of channels.</p></td> 333<td class="parameter_annotations"> </td> 334</tr> 335</tbody> 336</table></div> 337</div> 338<div class="refsect3"> 339<a name="gst-audio-channel-positions-to-valid-order.returns"></a><h4>Returns</h4> 340<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the channel positions are valid and reordering 341was successful.</p> 342</div> 343</div> 344<hr> 345<div class="refsect2"> 346<a name="gst-audio-channel-get-fallback-mask"></a><h3>gst_audio_channel_get_fallback_mask ()</h3> 347<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint64"><span class="returnvalue">guint64</span></a> 348gst_audio_channel_get_fallback_mask (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>);</pre> 349<p>Get the fallback channel-mask for the given number of channels.</p> 350<p>This function returns a reasonable fallback channel-mask and should be 351called as a last resort when the specific channel map is unknown.</p> 352<div class="refsect3"> 353<a name="gst-audio-channel-get-fallback-mask.parameters"></a><h4>Parameters</h4> 354<div class="informaltable"><table class="informaltable" width="100%" border="0"> 355<colgroup> 356<col width="150px" class="parameters_name"> 357<col class="parameters_description"> 358<col width="200px" class="parameters_annotations"> 359</colgroup> 360<tbody><tr> 361<td class="parameter_name"><p>channels</p></td> 362<td class="parameter_description"><p>the number of channels</p></td> 363<td class="parameter_annotations"> </td> 364</tr></tbody> 365</table></div> 366</div> 367<div class="refsect3"> 368<a name="gst-audio-channel-get-fallback-mask.returns"></a><h4>Returns</h4> 369<p> a fallback channel-mask for <em class="parameter"><code>channels</code></em> 370or 0 when there is no 371mask and mono.</p> 372</div> 373<p class="since">Since: <a class="link" href="ix08.html#api-index-1.8">1.8</a></p> 374</div> 375<hr> 376<div class="refsect2"> 377<a name="gst-audio-check-valid-channel-positions"></a><h3>gst_audio_check_valid_channel_positions ()</h3> 378<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 379gst_audio_check_valid_channel_positions 380 (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *position</code></em>, 381 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>, 382 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> force_order</code></em>);</pre> 383<p>Checks if <em class="parameter"><code>position</code></em> 384 contains valid channel positions for 385<em class="parameter"><code>channels</code></em> 386 channels. If <em class="parameter"><code>force_order</code></em> 387 is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> it additionally 388checks if the channels are in the order required by GStreamer.</p> 389<div class="refsect3"> 390<a name="gst-audio-check-valid-channel-positions.parameters"></a><h4>Parameters</h4> 391<div class="informaltable"><table class="informaltable" width="100%" border="0"> 392<colgroup> 393<col width="150px" class="parameters_name"> 394<col class="parameters_description"> 395<col width="200px" class="parameters_annotations"> 396</colgroup> 397<tbody> 398<tr> 399<td class="parameter_name"><p>position</p></td> 400<td class="parameter_description"><p>The <a href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition"><code class="literal">GstAudioChannelPositions</code></a> 401to check. </p></td> 402<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 403</tr> 404<tr> 405<td class="parameter_name"><p>channels</p></td> 406<td class="parameter_description"><p>The number of channels.</p></td> 407<td class="parameter_annotations"> </td> 408</tr> 409<tr> 410<td class="parameter_name"><p>force_order</p></td> 411<td class="parameter_description"><p>Only consider the GStreamer channel order.</p></td> 412<td class="parameter_annotations"> </td> 413</tr> 414</tbody> 415</table></div> 416</div> 417<div class="refsect3"> 418<a name="gst-audio-check-valid-channel-positions.returns"></a><h4>Returns</h4> 419<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the channel positions are valid.</p> 420</div> 421</div> 422<hr> 423<div class="refsect2"> 424<a name="gst-audio-buffer-reorder-channels"></a><h3>gst_audio_buffer_reorder_channels ()</h3> 425<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 426gst_audio_buffer_reorder_channels (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *buffer</code></em>, 427 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioFormat" title="enum GstAudioFormat"><span class="type">GstAudioFormat</span></a> format</code></em>, 428 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>, 429 <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *from</code></em>, 430 <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *to</code></em>);</pre> 431<p>Reorders <em class="parameter"><code>buffer</code></em> 432 from the channel positions <em class="parameter"><code>from</code></em> 433 to the channel 434positions <em class="parameter"><code>to</code></em> 435. <em class="parameter"><code>from</code></em> 436 and <em class="parameter"><code>to</code></em> 437 must contain the same number of 438positions and the same positions, only in a different order. 439<em class="parameter"><code>buffer</code></em> 440 must be writable.</p> 441<div class="refsect3"> 442<a name="gst-audio-buffer-reorder-channels.parameters"></a><h4>Parameters</h4> 443<div class="informaltable"><table class="informaltable" width="100%" border="0"> 444<colgroup> 445<col width="150px" class="parameters_name"> 446<col class="parameters_description"> 447<col width="200px" class="parameters_annotations"> 448</colgroup> 449<tbody> 450<tr> 451<td class="parameter_name"><p>buffer</p></td> 452<td class="parameter_description"><p>The buffer to reorder.</p></td> 453<td class="parameter_annotations"> </td> 454</tr> 455<tr> 456<td class="parameter_name"><p>format</p></td> 457<td class="parameter_description"><p>The <a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioFormat" title="enum GstAudioFormat"><code class="literal">GstAudioFormat</code></a> of the buffer.</p></td> 458<td class="parameter_annotations"> </td> 459</tr> 460<tr> 461<td class="parameter_name"><p>channels</p></td> 462<td class="parameter_description"><p>The number of channels.</p></td> 463<td class="parameter_annotations"> </td> 464</tr> 465<tr> 466<td class="parameter_name"><p>from</p></td> 467<td class="parameter_description"><p>The channel positions in the buffer. </p></td> 468<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 469</tr> 470<tr> 471<td class="parameter_name"><p>to</p></td> 472<td class="parameter_description"><p>The channel positions to convert to. </p></td> 473<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 474</tr> 475</tbody> 476</table></div> 477</div> 478<div class="refsect3"> 479<a name="gst-audio-buffer-reorder-channels.returns"></a><h4>Returns</h4> 480<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the reordering was possible.</p> 481</div> 482</div> 483<hr> 484<div class="refsect2"> 485<a name="gst-audio-reorder-channels"></a><h3>gst_audio_reorder_channels ()</h3> 486<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 487gst_audio_reorder_channels (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>, 488 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>, 489 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioFormat" title="enum GstAudioFormat"><span class="type">GstAudioFormat</span></a> format</code></em>, 490 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>, 491 <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *from</code></em>, 492 <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *to</code></em>);</pre> 493<p>Reorders <em class="parameter"><code>data</code></em> 494 from the channel positions <em class="parameter"><code>from</code></em> 495 to the channel 496positions <em class="parameter"><code>to</code></em> 497. <em class="parameter"><code>from</code></em> 498 and <em class="parameter"><code>to</code></em> 499 must contain the same number of 500positions and the same positions, only in a different order.</p> 501<p>Note: this function assumes the audio data is in interleaved layout</p> 502<div class="refsect3"> 503<a name="gst-audio-reorder-channels.parameters"></a><h4>Parameters</h4> 504<div class="informaltable"><table class="informaltable" width="100%" border="0"> 505<colgroup> 506<col width="150px" class="parameters_name"> 507<col class="parameters_description"> 508<col width="200px" class="parameters_annotations"> 509</colgroup> 510<tbody> 511<tr> 512<td class="parameter_name"><p>data</p></td> 513<td class="parameter_description"><p>The pointer to 514the memory. </p></td> 515<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td> 516</tr> 517<tr> 518<td class="parameter_name"><p>size</p></td> 519<td class="parameter_description"><p>The size of the memory.</p></td> 520<td class="parameter_annotations"> </td> 521</tr> 522<tr> 523<td class="parameter_name"><p>format</p></td> 524<td class="parameter_description"><p>The <a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioFormat" title="enum GstAudioFormat"><code class="literal">GstAudioFormat</code></a> of the buffer.</p></td> 525<td class="parameter_annotations"> </td> 526</tr> 527<tr> 528<td class="parameter_name"><p>channels</p></td> 529<td class="parameter_description"><p>The number of channels.</p></td> 530<td class="parameter_annotations"> </td> 531</tr> 532<tr> 533<td class="parameter_name"><p>from</p></td> 534<td class="parameter_description"><p>The channel positions in the buffer. </p></td> 535<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 536</tr> 537<tr> 538<td class="parameter_name"><p>to</p></td> 539<td class="parameter_description"><p>The channel positions to convert to. </p></td> 540<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 541</tr> 542</tbody> 543</table></div> 544</div> 545<div class="refsect3"> 546<a name="gst-audio-reorder-channels.returns"></a><h4>Returns</h4> 547<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the reordering was possible.</p> 548</div> 549</div> 550<hr> 551<div class="refsect2"> 552<a name="gst-audio-get-channel-reorder-map"></a><h3>gst_audio_get_channel_reorder_map ()</h3> 553<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 554gst_audio_get_channel_reorder_map (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>, 555 <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *from</code></em>, 556 <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *to</code></em>, 557 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *reorder_map</code></em>);</pre> 558<p>Returns a reorder map for <em class="parameter"><code>from</code></em> 559 to <em class="parameter"><code>to</code></em> 560 that can be used in 561custom channel reordering code, e.g. to convert from or to the 562GStreamer channel order. <em class="parameter"><code>from</code></em> 563 and <em class="parameter"><code>to</code></em> 564 must contain the same 565number of positions and the same positions, only in a 566different order.</p> 567<p>The resulting <em class="parameter"><code>reorder_map</code></em> 568 can be used for reordering by assigning 569channel i of the input to channel reorder_map[i] of the output.</p> 570<div class="refsect3"> 571<a name="gst-audio-get-channel-reorder-map.parameters"></a><h4>Parameters</h4> 572<div class="informaltable"><table class="informaltable" width="100%" border="0"> 573<colgroup> 574<col width="150px" class="parameters_name"> 575<col class="parameters_description"> 576<col width="200px" class="parameters_annotations"> 577</colgroup> 578<tbody> 579<tr> 580<td class="parameter_name"><p>channels</p></td> 581<td class="parameter_description"><p>The number of channels.</p></td> 582<td class="parameter_annotations"> </td> 583</tr> 584<tr> 585<td class="parameter_name"><p>from</p></td> 586<td class="parameter_description"><p>The channel positions to reorder from. </p></td> 587<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 588</tr> 589<tr> 590<td class="parameter_name"><p>to</p></td> 591<td class="parameter_description"><p>The channel positions to reorder to. </p></td> 592<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 593</tr> 594<tr> 595<td class="parameter_name"><p>reorder_map</p></td> 596<td class="parameter_description"><p>Pointer to the reorder map. </p></td> 597<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 598</tr> 599</tbody> 600</table></div> 601</div> 602<div class="refsect3"> 603<a name="gst-audio-get-channel-reorder-map.returns"></a><h4>Returns</h4> 604<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the channel positions are valid and reordering 605is possible.</p> 606</div> 607</div> 608<hr> 609<div class="refsect2"> 610<a name="gst-audio-channel-positions-to-string"></a><h3>gst_audio_channel_positions_to_string ()</h3> 611<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * 612gst_audio_channel_positions_to_string (<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *position</code></em>, 613 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> channels</code></em>);</pre> 614<p>Converts <em class="parameter"><code>position</code></em> 615 to a human-readable string representation for 616debugging purposes.</p> 617<div class="refsect3"> 618<a name="gst-audio-channel-positions-to-string.parameters"></a><h4>Parameters</h4> 619<div class="informaltable"><table class="informaltable" width="100%" border="0"> 620<colgroup> 621<col width="150px" class="parameters_name"> 622<col class="parameters_description"> 623<col width="200px" class="parameters_annotations"> 624</colgroup> 625<tbody> 626<tr> 627<td class="parameter_name"><p>position</p></td> 628<td class="parameter_description"><p>The <a href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition"><code class="literal">GstAudioChannelPositions</code></a> 629to convert. </p></td> 630<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=channels]</span></td> 631</tr> 632<tr> 633<td class="parameter_name"><p>channels</p></td> 634<td class="parameter_description"><p>The number of channels.</p></td> 635<td class="parameter_annotations"> </td> 636</tr> 637</tbody> 638</table></div> 639</div> 640<div class="refsect3"> 641<a name="gst-audio-channel-positions-to-string.returns"></a><h4>Returns</h4> 642<p>a newly allocated string representing 643<em class="parameter"><code>position</code></em> 644. </p> 645<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 646</div> 647<p class="since">Since: <a class="link" href="ix06.html#api-index-1.10">1.10</a></p> 648</div> 649<hr> 650<div class="refsect2"> 651<a name="gst-audio-channel-mixer-new"></a><h3>gst_audio_channel_mixer_new ()</h3> 652<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="returnvalue">GstAudioChannelMixer</span></a> * 653gst_audio_channel_mixer_new (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixerFlags" title="enum GstAudioChannelMixerFlags"><span class="type">GstAudioChannelMixerFlags</span></a> flags</code></em>, 654 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioFormat" title="enum GstAudioFormat"><span class="type">GstAudioFormat</span></a> format</code></em>, 655 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> in_channels</code></em>, 656 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *in_position</code></em>, 657 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> out_channels</code></em>, 658 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelPosition" title="enum GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> *out_position</code></em>);</pre> 659</div> 660<hr> 661<div class="refsect2"> 662<a name="gst-audio-channel-mixer-new-with-matrix"></a><h3>gst_audio_channel_mixer_new_with_matrix ()</h3> 663<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="returnvalue">GstAudioChannelMixer</span></a> * 664gst_audio_channel_mixer_new_with_matrix 665 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixerFlags" title="enum GstAudioChannelMixerFlags"><span class="type">GstAudioChannelMixerFlags</span></a> flags</code></em>, 666 <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioFormat" title="enum GstAudioFormat"><span class="type">GstAudioFormat</span></a> format</code></em>, 667 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> in_channels</code></em>, 668 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> out_channels</code></em>, 669 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> **matrix</code></em>);</pre> 670</div> 671<hr> 672<div class="refsect2"> 673<a name="gst-audio-channel-mixer-free"></a><h3>gst_audio_channel_mixer_free ()</h3> 674<pre class="programlisting"><span class="returnvalue">void</span> 675gst_audio_channel_mixer_free (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="type">GstAudioChannelMixer</span></a> *mix</code></em>);</pre> 676<p>Free memory allocated by <em class="parameter"><code>mix</code></em> 677.</p> 678<div class="refsect3"> 679<a name="gst-audio-channel-mixer-free.parameters"></a><h4>Parameters</h4> 680<div class="informaltable"><table class="informaltable" width="100%" border="0"> 681<colgroup> 682<col width="150px" class="parameters_name"> 683<col class="parameters_description"> 684<col width="200px" class="parameters_annotations"> 685</colgroup> 686<tbody><tr> 687<td class="parameter_name"><p>mix</p></td> 688<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="type">GstAudioChannelMixer</span></a></p></td> 689<td class="parameter_annotations"> </td> 690</tr></tbody> 691</table></div> 692</div> 693</div> 694<hr> 695<div class="refsect2"> 696<a name="gst-audio-channel-mixer-is-passthrough"></a><h3>gst_audio_channel_mixer_is_passthrough ()</h3> 697<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 698gst_audio_channel_mixer_is_passthrough 699 (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="type">GstAudioChannelMixer</span></a> *mix</code></em>);</pre> 700<p>Check if <em class="parameter"><code>mix</code></em> 701 is in passthrough.</p> 702<p>Only N x N mix identity matrices are considered passthrough, 703this is determined by comparing the contents of the matrix 704with 0.0 and 1.0.</p> 705<p>As this is floating point comparisons, if the values have been 706generated, they should be rounded up or down by explicit 707assignment of 0.0 or 1.0 to values within a user-defined 708epsilon, this code doesn't make assumptions as to what may 709constitute an appropriate epsilon.</p> 710<div class="refsect3"> 711<a name="gst-audio-channel-mixer-is-passthrough.parameters"></a><h4>Parameters</h4> 712<div class="informaltable"><table class="informaltable" width="100%" border="0"> 713<colgroup> 714<col width="150px" class="parameters_name"> 715<col class="parameters_description"> 716<col width="200px" class="parameters_annotations"> 717</colgroup> 718<tbody><tr> 719<td class="parameter_name"><p>mix</p></td> 720<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="type">GstAudioChannelMixer</span></a></p></td> 721<td class="parameter_annotations"> </td> 722</tr></tbody> 723</table></div> 724</div> 725<div class="refsect3"> 726<a name="gst-audio-channel-mixer-is-passthrough.returns"></a><h4>Returns</h4> 727<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> is <em class="parameter"><code>mix</code></em> 728is passthrough.</p> 729</div> 730</div> 731<hr> 732<div class="refsect2"> 733<a name="gst-audio-channel-mixer-samples"></a><h3>gst_audio_channel_mixer_samples ()</h3> 734<pre class="programlisting"><span class="returnvalue">void</span> 735gst_audio_channel_mixer_samples (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="type">GstAudioChannelMixer</span></a> *mix</code></em>, 736 <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> in[]</code></em>, 737 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> out[]</code></em>, 738 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> samples</code></em>);</pre> 739<p>In case the samples are interleaved, <em class="parameter"><code>in</code></em> 740 and <em class="parameter"><code>out</code></em> 741 must point to an 742array with a single element pointing to a block of interleaved samples.</p> 743<p>If non-interleaved samples are used, <em class="parameter"><code>in</code></em> 744 and <em class="parameter"><code>out</code></em> 745 must point to an 746array with pointers to memory blocks, one for each channel.</p> 747<p>Perform channel mixing on <em class="parameter"><code>in_data</code></em> 748 and write the result to <em class="parameter"><code>out_data</code></em> 749. 750<em class="parameter"><code>in_data</code></em> 751 and <em class="parameter"><code>out_data</code></em> 752 need to be in <em class="parameter"><code>format</code></em> 753 and <em class="parameter"><code>layout</code></em> 754.</p> 755<div class="refsect3"> 756<a name="gst-audio-channel-mixer-samples.parameters"></a><h4>Parameters</h4> 757<div class="informaltable"><table class="informaltable" width="100%" border="0"> 758<colgroup> 759<col width="150px" class="parameters_name"> 760<col class="parameters_description"> 761<col width="200px" class="parameters_annotations"> 762</colgroup> 763<tbody> 764<tr> 765<td class="parameter_name"><p>mix</p></td> 766<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-Audio-channels.html#GstAudioChannelMixer" title="GstAudioChannelMixer"><span class="type">GstAudioChannelMixer</span></a></p></td> 767<td class="parameter_annotations"> </td> 768</tr> 769<tr> 770<td class="parameter_name"><p>in</p></td> 771<td class="parameter_description"><p>input samples</p></td> 772<td class="parameter_annotations"> </td> 773</tr> 774<tr> 775<td class="parameter_name"><p>out</p></td> 776<td class="parameter_description"><p>output samples</p></td> 777<td class="parameter_annotations"> </td> 778</tr> 779<tr> 780<td class="parameter_name"><p>samples</p></td> 781<td class="parameter_description"><p>number of samples</p></td> 782<td class="parameter_annotations"> </td> 783</tr> 784</tbody> 785</table></div> 786</div> 787</div> 788</div> 789<div class="refsect1"> 790<a name="gst-plugins-base-libs-Audio-channels.other_details"></a><h2>Types and Values</h2> 791<div class="refsect2"> 792<a name="GstAudioChannelPosition"></a><h3>enum GstAudioChannelPosition</h3> 793<p>Audio channel positions.</p> 794<p>These are the channels defined in SMPTE 2036-2-2008 795Table 1 for 22.2 audio systems with the Surround and Wide channels from 796DTS Coherent Acoustics (v.1.3.1) and 10.2 and 7.1 layouts. In the caps the 797actual channel layout is expressed with a channel count and a channel mask, 798which describes the existing channels. The positions in the bit mask correspond 799to the enum values. 800For negotiation it is allowed to have more bits set in the channel mask than 801the number of channels to specify the allowed channel positions but this is 802not allowed in negotiated caps. It is not allowed in any situation other 803than the one mentioned below to have less bits set in the channel mask than 804the number of channels.</p> 805<p><em class="parameter"><code>GST_AUDIO_CHANNEL_POSITION_MONO</code></em> 806 can only be used with a single mono channel that 807has no direction information and would be mixed into all directional channels. 808This is expressed in caps by having a single channel and no channel mask.</p> 809<p><em class="parameter"><code>GST_AUDIO_CHANNEL_POSITION_NONE</code></em> 810 can only be used if all channels have this position. 811This is expressed in caps by having a channel mask with no bits set.</p> 812<p>As another special case it is allowed to have two channels without a channel mask. 813This implicitely means that this is a stereo stream with a front left and front right 814channel.</p> 815<div class="refsect3"> 816<a name="GstAudioChannelPosition.members"></a><h4>Members</h4> 817<div class="informaltable"><table class="informaltable" width="100%" border="0"> 818<colgroup> 819<col width="300px" class="enum_members_name"> 820<col class="enum_members_description"> 821<col width="200px" class="enum_members_annotations"> 822</colgroup> 823<tbody> 824<tr> 825<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-NONE:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_NONE</p></td> 826<td class="enum_member_description"> 827<p>used for position-less channels, e.g. 828 from a sound card that records 1024 channels; mutually exclusive with 829 any other channel position</p> 830</td> 831<td class="enum_member_annotations"> </td> 832</tr> 833<tr> 834<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-MONO:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_MONO</p></td> 835<td class="enum_member_description"> 836<p>Mono without direction; 837 can only be used with 1 channel</p> 838</td> 839<td class="enum_member_annotations"> </td> 840</tr> 841<tr> 842<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-INVALID:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_INVALID</p></td> 843<td class="enum_member_description"> 844<p>invalid position</p> 845</td> 846<td class="enum_member_annotations"> </td> 847</tr> 848<tr> 849<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-FRONT-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT</p></td> 850<td class="enum_member_description"> 851<p>Front left</p> 852</td> 853<td class="enum_member_annotations"> </td> 854</tr> 855<tr> 856<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-FRONT-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT</p></td> 857<td class="enum_member_description"> 858<p>Front right</p> 859</td> 860<td class="enum_member_annotations"> </td> 861</tr> 862<tr> 863<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-FRONT-CENTER:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER</p></td> 864<td class="enum_member_description"> 865<p>Front center</p> 866</td> 867<td class="enum_member_annotations"> </td> 868</tr> 869<tr> 870<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-LFE1:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_LFE1</p></td> 871<td class="enum_member_description"> 872<p>Low-frequency effects 1 (subwoofer)</p> 873</td> 874<td class="enum_member_annotations"> </td> 875</tr> 876<tr> 877<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-REAR-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_REAR_LEFT</p></td> 878<td class="enum_member_description"> 879<p>Rear left</p> 880</td> 881<td class="enum_member_annotations"> </td> 882</tr> 883<tr> 884<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-REAR-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT</p></td> 885<td class="enum_member_description"> 886<p>Rear right</p> 887</td> 888<td class="enum_member_annotations"> </td> 889</tr> 890<tr> 891<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-FRONT-LEFT-OF-CENTER:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER</p></td> 892<td class="enum_member_description"> 893<p>Front left of center</p> 894</td> 895<td class="enum_member_annotations"> </td> 896</tr> 897<tr> 898<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-FRONT-RIGHT-OF-CENTER:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER</p></td> 899<td class="enum_member_description"> 900<p>Front right of center</p> 901</td> 902<td class="enum_member_annotations"> </td> 903</tr> 904<tr> 905<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-REAR-CENTER:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_REAR_CENTER</p></td> 906<td class="enum_member_description"> 907<p>Rear center</p> 908</td> 909<td class="enum_member_annotations"> </td> 910</tr> 911<tr> 912<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-LFE2:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_LFE2</p></td> 913<td class="enum_member_description"> 914<p>Low-frequency effects 2 (subwoofer)</p> 915</td> 916<td class="enum_member_annotations"> </td> 917</tr> 918<tr> 919<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-SIDE-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT</p></td> 920<td class="enum_member_description"> 921<p>Side left</p> 922</td> 923<td class="enum_member_annotations"> </td> 924</tr> 925<tr> 926<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-SIDE-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT</p></td> 927<td class="enum_member_description"> 928<p>Side right</p> 929</td> 930<td class="enum_member_annotations"> </td> 931</tr> 932<tr> 933<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-FRONT-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_LEFT</p></td> 934<td class="enum_member_description"> 935<p>Top front left</p> 936</td> 937<td class="enum_member_annotations"> </td> 938</tr> 939<tr> 940<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-FRONT-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_RIGHT</p></td> 941<td class="enum_member_description"> 942<p>Top front right</p> 943</td> 944<td class="enum_member_annotations"> </td> 945</tr> 946<tr> 947<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-FRONT-CENTER:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_FRONT_CENTER</p></td> 948<td class="enum_member_description"> 949<p>Top front center</p> 950</td> 951<td class="enum_member_annotations"> </td> 952</tr> 953<tr> 954<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-CENTER:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_CENTER</p></td> 955<td class="enum_member_description"> 956<p>Top center</p> 957</td> 958<td class="enum_member_annotations"> </td> 959</tr> 960<tr> 961<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-REAR-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_REAR_LEFT</p></td> 962<td class="enum_member_description"> 963<p>Top rear left</p> 964</td> 965<td class="enum_member_annotations"> </td> 966</tr> 967<tr> 968<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-REAR-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_REAR_RIGHT</p></td> 969<td class="enum_member_description"> 970<p>Top rear right</p> 971</td> 972<td class="enum_member_annotations"> </td> 973</tr> 974<tr> 975<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-SIDE-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_LEFT</p></td> 976<td class="enum_member_description"> 977<p>Top side right</p> 978</td> 979<td class="enum_member_annotations"> </td> 980</tr> 981<tr> 982<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-SIDE-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_SIDE_RIGHT</p></td> 983<td class="enum_member_description"> 984<p>Top rear right</p> 985</td> 986<td class="enum_member_annotations"> </td> 987</tr> 988<tr> 989<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-TOP-REAR-CENTER:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_TOP_REAR_CENTER</p></td> 990<td class="enum_member_description"> 991<p>Top rear center</p> 992</td> 993<td class="enum_member_annotations"> </td> 994</tr> 995<tr> 996<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-BOTTOM-FRONT-CENTER:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_CENTER</p></td> 997<td class="enum_member_description"> 998<p>Bottom front center</p> 999</td> 1000<td class="enum_member_annotations"> </td> 1001</tr> 1002<tr> 1003<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-BOTTOM-FRONT-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_LEFT</p></td> 1004<td class="enum_member_description"> 1005<p>Bottom front left</p> 1006</td> 1007<td class="enum_member_annotations"> </td> 1008</tr> 1009<tr> 1010<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-BOTTOM-FRONT-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_BOTTOM_FRONT_RIGHT</p></td> 1011<td class="enum_member_description"> 1012<p>Bottom front right</p> 1013</td> 1014<td class="enum_member_annotations"> </td> 1015</tr> 1016<tr> 1017<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-WIDE-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_WIDE_LEFT</p></td> 1018<td class="enum_member_description"> 1019<p>Wide left (between front left and side left)</p> 1020</td> 1021<td class="enum_member_annotations"> </td> 1022</tr> 1023<tr> 1024<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-WIDE-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_WIDE_RIGHT</p></td> 1025<td class="enum_member_description"> 1026<p>Wide right (between front right and side right)</p> 1027</td> 1028<td class="enum_member_annotations"> </td> 1029</tr> 1030<tr> 1031<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-SURROUND-LEFT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_SURROUND_LEFT</p></td> 1032<td class="enum_member_description"> 1033<p>Surround left (between rear left and side left)</p> 1034</td> 1035<td class="enum_member_annotations"> </td> 1036</tr> 1037<tr> 1038<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-POSITION-SURROUND-RIGHT:CAPS"></a>GST_AUDIO_CHANNEL_POSITION_SURROUND_RIGHT</p></td> 1039<td class="enum_member_description"> 1040<p>Surround right (between rear right and side right)</p> 1041</td> 1042<td class="enum_member_annotations"> </td> 1043</tr> 1044</tbody> 1045</table></div> 1046</div> 1047</div> 1048<hr> 1049<div class="refsect2"> 1050<a name="GstAudioChannelMixer"></a><h3>GstAudioChannelMixer</h3> 1051<pre class="programlisting">typedef struct _GstAudioChannelMixer GstAudioChannelMixer;</pre> 1052</div> 1053<hr> 1054<div class="refsect2"> 1055<a name="GstAudioChannelMixerFlags"></a><h3>enum GstAudioChannelMixerFlags</h3> 1056<p>Flags passed to <a class="link" href="gst-plugins-base-libs-Audio-channels.html#gst-audio-channel-mixer-new" title="gst_audio_channel_mixer_new ()"><code class="function">gst_audio_channel_mixer_new()</code></a></p> 1057<div class="refsect3"> 1058<a name="GstAudioChannelMixerFlags.members"></a><h4>Members</h4> 1059<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1060<colgroup> 1061<col width="300px" class="enum_members_name"> 1062<col class="enum_members_description"> 1063<col width="200px" class="enum_members_annotations"> 1064</colgroup> 1065<tbody> 1066<tr> 1067<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-MIXER-FLAGS-NONE:CAPS"></a>GST_AUDIO_CHANNEL_MIXER_FLAGS_NONE</p></td> 1068<td class="enum_member_description"> 1069<p>no flag</p> 1070</td> 1071<td class="enum_member_annotations"> </td> 1072</tr> 1073<tr> 1074<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-MIXER-FLAGS-NON-INTERLEAVED-IN:CAPS"></a>GST_AUDIO_CHANNEL_MIXER_FLAGS_NON_INTERLEAVED_IN</p></td> 1075<td class="enum_member_description"> 1076<p>input channels are not interleaved</p> 1077</td> 1078<td class="enum_member_annotations"> </td> 1079</tr> 1080<tr> 1081<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-MIXER-FLAGS-NON-INTERLEAVED-OUT:CAPS"></a>GST_AUDIO_CHANNEL_MIXER_FLAGS_NON_INTERLEAVED_OUT</p></td> 1082<td class="enum_member_description"> 1083<p>output channels are not interleaved</p> 1084</td> 1085<td class="enum_member_annotations"> </td> 1086</tr> 1087<tr> 1088<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-MIXER-FLAGS-UNPOSITIONED-IN:CAPS"></a>GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_IN</p></td> 1089<td class="enum_member_description"> 1090<p>input channels are explicitly unpositioned</p> 1091</td> 1092<td class="enum_member_annotations"> </td> 1093</tr> 1094<tr> 1095<td class="enum_member_name"><p><a name="GST-AUDIO-CHANNEL-MIXER-FLAGS-UNPOSITIONED-OUT:CAPS"></a>GST_AUDIO_CHANNEL_MIXER_FLAGS_UNPOSITIONED_OUT</p></td> 1096<td class="enum_member_description"> 1097<p>output channels are explicitly unpositioned</p> 1098</td> 1099<td class="enum_member_annotations"> </td> 1100</tr> 1101</tbody> 1102</table></div> 1103</div> 1104</div> 1105</div> 1106</div> 1107<div class="footer"> 1108<hr>Generated by GTK-Doc V1.28</div> 1109</body> 1110</html>