<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>gstmultichannel</title> <meta name="generator" content="DocBook XSL Stylesheets V1.72.0"> <link rel="start" href="index.html" title="GStreamer Base Plugins 0.10 Library Reference Manual"> <link rel="up" href="gstreamer-audio.html" title="Audio Library"> <link rel="prev" href="gst-plugins-base-libs-gstaudiosrc.html" title="gstaudiosrc"> <link rel="next" href="gst-plugins-base-libs-gstringbuffer.html" title="gstringbuffer"> <meta name="generator" content="GTK-Doc V1.8 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> <link rel="part" href="gstreamer-plugins-base.html" title="Part I. GStreamer Base Plugins Libraries"> <link rel="chapter" href="gstreamer-audio.html" title="Audio Library"> <link rel="chapter" href="gstreamer-cdda.html" title="CDDA Library"> <link rel="chapter" href="gstreamer-ffft.html" title="FFT Library"> <link rel="chapter" href="gstreamer-floatcast.html" title="FloatCast Library"> <link rel="chapter" href="gstreamer-interfaces.html" title="Interfaces Library"> <link rel="chapter" href="gstreamer-netbuffer.html" title="Network Buffer Library"> <link rel="chapter" href="gstreamer-riff.html" title="Riff Media Library"> <link rel="chapter" href="gstreamer-rtp.html" title="RTP Library"> <link rel="chapter" href="gstreamer-rtsp.html" title="RTSP Library"> <link rel="chapter" href="gstreamer-sdp.html" title="SDP Library"> <link rel="chapter" href="gstreamer-tag.html" title="Tag Support Library"> <link rel="chapter" href="gstreamer-base-utils.html" title="Base Utils Library"> <link rel="chapter" href="gstreamer-video.html" title="Video Library"> <link rel="part" href="gstreamer-libs-hierarchy.html" title="Part II. Object Hierarchy"> <link rel="index" href="api-index.html" title="Index"> </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="2"> <tr valign="middle"> <td><a accesskey="p" href="gst-plugins-base-libs-gstaudiosrc.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> <td><a accesskey="u" href="gstreamer-audio.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> <th width="100%" align="center">GStreamer Base Plugins 0.10 Library Reference Manual</th> <td><a accesskey="n" href="gst-plugins-base-libs-gstringbuffer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> </tr> <tr><td colspan="5" class="shortcuts"><nobr><a href="#id2569016" class="shortcut">Top</a>  |  <a href="#id2570331" class="shortcut">Description</a></nobr></td></tr> </table> <div class="refentry" lang="en"> <a name="gst-plugins-base-libs-gstmultichannel"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2> <a name="id2569016"></a><span class="refentrytitle">gstmultichannel</span> </h2> <p>gstmultichannel</p> </td> <td valign="top" align="right"></td> </tr></table></div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <pre class="synopsis"> #include <gst/audio/multichannel.h> enum <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a>; <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a>* <a href="gst-plugins-base-libs-gstmultichannel.html#gst-audio-fixate-channel-positions">gst_audio_fixate_channel_positions</a> (GstStructure *str); <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a>* <a href="gst-plugins-base-libs-gstmultichannel.html#gst-audio-get-channel-positions">gst_audio_get_channel_positions</a> (GstStructure *str); void <a href="gst-plugins-base-libs-gstmultichannel.html#gst-audio-set-caps-channel-positions-list">gst_audio_set_caps_channel_positions_list</a> (GstCaps *caps, const <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a> *pos, gint num_positions); void <a href="gst-plugins-base-libs-gstmultichannel.html#gst-audio-set-channel-positions">gst_audio_set_channel_positions</a> (GstStructure *str, const <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a> *pos); void <a href="gst-plugins-base-libs-gstmultichannel.html#gst-audio-set-structure-channel-positions-list">gst_audio_set_structure_channel_positions_list</a> (GstStructure *str, const <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a> *pos, gint num_positions); </pre> </div> <div class="refsect1" lang="en"> <a name="id2570331"></a><h2>Description</h2> <p> </p> </div> <div class="refsect1" lang="en"> <a name="id2570346"></a><h2>Details</h2> <div class="refsect2" lang="en"> <a name="id2570356"></a><h3> <a name="GstAudioChannelPosition"></a>enum GstAudioChannelPosition</h3> <a class="indexterm" name="id2570370"></a><pre class="programlisting">typedef enum { GST_AUDIO_CHANNEL_POSITION_INVALID = -1, /* Main front speakers. Mono and left/right are mututally exclusive! */ GST_AUDIO_CHANNEL_POSITION_FRONT_MONO, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, /* rear. Left/right and center are mututally exclusive! */ GST_AUDIO_CHANNEL_POSITION_REAR_CENTER, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, /* subwoofer/low-frequency */ GST_AUDIO_CHANNEL_POSITION_LFE, /* Center front speakers. Center and left/right_of_center cannot be * used together! */ GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, /* sides */ GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT, /* for multi-channel input and output with more than 8 channels, * incompatible with all other positions, either all positions * are defined or all positions are undefined, but can't mix'n'match */ GST_AUDIO_CHANNEL_POSITION_NONE, /* don't use - counter */ GST_AUDIO_CHANNEL_POSITION_NUM } GstAudioChannelPosition; </pre> <p> </p> </div> <hr> <div class="refsect2" lang="en"> <a name="id2570423"></a><h3> <a name="gst-audio-fixate-channel-positions"></a>gst_audio_fixate_channel_positions ()</h3> <a class="indexterm" name="id2570437"></a><pre class="programlisting"><a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a>* gst_audio_fixate_channel_positions (GstStructure *str);</pre> <p> Custom fixate function. Elements that implement some sort of channel conversion algorhithm should use this function for fixating on GstAudioChannelPosition properties. It will take care of equal channel positioning (left/right). Caller <code class="function">g_free()</code>s the return value. The input properties may be (and are supposed to be) unfixed. Note that this function is mostly a hack because we currently have no way to add default fixation functions for new GTypes.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><span class="term"><em class="parameter"><code>str</code></em> :</span></td> <td> a <span class="type">GstStructure</span> containing a (possibly unfixed) "channel-positions" property. </td> </tr> <tr> <td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> fixed values that the caller could use as a fixed set of <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> values. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id2570536"></a><h3> <a name="gst-audio-get-channel-positions"></a>gst_audio_get_channel_positions ()</h3> <a class="indexterm" name="id2570549"></a><pre class="programlisting"><a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a>* gst_audio_get_channel_positions (GstStructure *str);</pre> <p> Retrieves a number of (fixed!) audio channel positions from the provided <span class="type">GstStructure</span> and returns it as a newly allocated array. The caller should <code class="function">g_free()</code> this array. The caller should also check that the members in this <span class="type">GstStructure</span> are indeed "fixed" before calling this function.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><span class="term"><em class="parameter"><code>str</code></em> :</span></td> <td> A <span class="type">GstStructure</span> to retrieve channel positions from. </td> </tr> <tr> <td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td> <td> a newly allocated array containing the channel positions as provided in the given <span class="type">GstStructure</span>. Returns NULL on error. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id2570661"></a><h3> <a name="gst-audio-set-caps-channel-positions-list"></a>gst_audio_set_caps_channel_positions_list ()</h3> <a class="indexterm" name="id2570675"></a><pre class="programlisting">void gst_audio_set_caps_channel_positions_list (GstCaps *caps, const <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a> *pos, gint num_positions);</pre> <p> Sets a (possibly non-fixed) list of possible audio channel positions (given in pos) on the given caps. Each of the structures of the caps, after this function has been called, will contain a "channel-positions" property with an array. Each value in the array will contain each of the values given in the pos array. Note that the size of the caps might be increased by this, since each structure with a "channel- positions" property needs to have a fixed "channels" property. The input caps is not required to have this.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><span class="term"><em class="parameter"><code>caps</code></em> :</span></td> <td> <span class="type">GstCaps</span> to set the list of channel positions on. </td> </tr> <tr> <td><span class="term"><em class="parameter"><code>pos</code></em> :</span></td> <td> the array containing one or more possible audio channel positions that we should add in each value of the array in the given structure. </td> </tr> <tr> <td><span class="term"><em class="parameter"><code>num_positions</code></em> :</span></td> <td> the number of values in pos. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id2570790"></a><h3> <a name="gst-audio-set-channel-positions"></a>gst_audio_set_channel_positions ()</h3> <a class="indexterm" name="id2570803"></a><pre class="programlisting">void gst_audio_set_channel_positions (GstStructure *str, const <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a> *pos);</pre> <p> Adds a "channel-positions" property to the given <span class="type">GstStructure</span>, which will represent the channel positions as given in the provided <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition"><span class="type">GstAudioChannelPosition</span></a> array.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><span class="term"><em class="parameter"><code>str</code></em> :</span></td> <td> A <span class="type">GstStructure</span> to set channel positions on. </td> </tr> <tr> <td><span class="term"><em class="parameter"><code>pos</code></em> :</span></td> <td> an array of channel positions. The number of members in this array should be equal to the (fixed!) number of the "channels" property in the given <span class="type">GstStructure</span>. </td> </tr> </tbody> </table></div> </div> <hr> <div class="refsect2" lang="en"> <a name="id2570914"></a><h3> <a name="gst-audio-set-structure-channel-positions-list"></a>gst_audio_set_structure_channel_positions_list ()</h3> <a class="indexterm" name="id2570928"></a><pre class="programlisting">void gst_audio_set_structure_channel_positions_list (GstStructure *str, const <a href="gst-plugins-base-libs-gstmultichannel.html#GstAudioChannelPosition">GstAudioChannelPosition</a> *pos, gint num_positions);</pre> <p> Sets a (possibly non-fixed) list of possible audio channel positions (given in pos) on the given structure. The structure, after this function has been called, will contain a "channel-positions" property with an array of the size of the "channels" property value in the given structure (note that this means that the channels property in the provided structure should be fixed!). Each value in the array will contain each of the values given in the pos array.</p> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody> <tr> <td><span class="term"><em class="parameter"><code>str</code></em> :</span></td> <td> <span class="type">GstStructure</span> to set the list of channel positions on. </td> </tr> <tr> <td><span class="term"><em class="parameter"><code>pos</code></em> :</span></td> <td> the array containing one or more possible audio channel positions that we should add in each value of the array in the given structure. </td> </tr> <tr> <td><span class="term"><em class="parameter"><code>num_positions</code></em> :</span></td> <td> the number of values in pos. </td> </tr> </tbody> </table></div> </div> </div> </div> </body> </html>