1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>audioconvert</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GStreamer Base Plugins 0.10 Plugins Reference Manual">
8 <link rel="up" href="ch01.html" title="gst-plugins-base Elements">
9 <link rel="prev" href="gst-plugins-base-plugins-alsasrc.html" title="alsasrc">
10 <link rel="next" href="gst-plugins-base-plugins-audiorate.html" title="audiorate">
11 <meta name="generator" content="GTK-Doc V1.17 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="gst-plugins-base-plugins-alsasrc.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GStreamer Base Plugins 0.10 Plugins Reference Manual</th>
21 <td><a accesskey="n" href="gst-plugins-base-plugins-audiorate.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-plugins-audioconvert.synopsis" class="shortcut">Top</a>
26 <a href="#gst-plugins-base-plugins-audioconvert.description" class="shortcut">Description</a>
28 <a href="#gst-plugins-base-plugins-audioconvert.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#gst-plugins-base-plugins-audioconvert.properties" class="shortcut">Properties</a>
33 <div class="refentry">
34 <a name="gst-plugins-base-plugins-audioconvert"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
37 <h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-audioconvert.top_of_page"></a>audioconvert</span></h2>
38 <p>audioconvert — Convert audio to different formats</p>
40 <td valign="top" align="right"></td>
42 <div class="refsynopsisdiv">
43 <a name="gst-plugins-base-plugins-audioconvert.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstAudioConvert"></a><pre class="synopsis">struct <a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvert-struct" title="struct GstAudioConvert">GstAudioConvert</a>;
45 enum <a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvertDithering" title="enum GstAudioConvertDithering">GstAudioConvertDithering</a>;
46 enum <a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvertNoiseShaping" title="enum GstAudioConvertNoiseShaping">GstAudioConvertNoiseShaping</a>;
49 <div class="refsect1">
50 <a name="gst-plugins-base-plugins-audioconvert.object-hierarchy"></a><h2>Object Hierarchy</h2>
51 <pre class="synopsis">
52 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
53 +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
54 +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
55 +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseTransform.html">GstBaseTransform</a>
59 <div class="refsect1">
60 <a name="gst-plugins-base-plugins-audioconvert.properties"></a><h2>Properties</h2>
61 <pre class="synopsis">
62 "<a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvert--dithering" title='The "dithering" property'>dithering</a>" <a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvertDithering" title="enum GstAudioConvertDithering"><span class="type">GstAudioConvertDithering</span></a> : Read / Write
63 "<a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvert--noise-shaping" title='The "noise-shaping" property'>noise-shaping</a>" <a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvertNoiseShaping" title="enum GstAudioConvertNoiseShaping"><span class="type">GstAudioConvertNoiseShaping</span></a> : Read / Write
66 <div class="refsect1">
67 <a name="gst-plugins-base-plugins-audioconvert.description"></a><h2>Description</h2>
69 Audioconvert converts raw audio buffers between various possible formats.
70 It supports integer to float conversion, width/depth conversion,
71 signedness and endianness conversion and channel transformations.
75 <div class="refsect2">
76 <a name="idp9937248"></a><h3>Example launch line</h3>
77 <div class="informalexample">
78 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
81 <td class="listing_lines" align="right"><pre>1</pre></td>
82 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v <span class="gtkdoc opt">-</span>m audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> audio<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>raw<span class="gtkdoc opt">-</span><span class="gtkdoc kwb">int</span><span class="gtkdoc opt">,</span>channels<span class="gtkdoc opt">=</span><span class="number">2</span><span class="gtkdoc opt">,</span>width<span class="gtkdoc opt">=</span><span class="number">8</span><span class="gtkdoc opt">,</span>depth<span class="gtkdoc opt">=</span><span class="number">8</span> <span class="gtkdoc opt">!</span> level <span class="gtkdoc opt">!</span> fakesink silent<span class="gtkdoc opt">=</span>TRUE</pre></td>
87 This pipeline converts audio to 8-bit. The level element shows that
88 the output levels still match the one for a sine wave.
89 <div class="informalexample">
90 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
93 <td class="listing_lines" align="right"><pre>1</pre></td>
94 <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v <span class="gtkdoc opt">-</span>m audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> vorbisenc <span class="gtkdoc opt">!</span> fakesink silent<span class="gtkdoc opt">=</span>TRUE</pre></td>
99 The vorbis encoder takes float audio data instead of the integer data
100 generated by audiotestsrc.
105 Last reviewed on 2006-03-02 (0.10.4)
107 <div class="refsynopsisdiv">
109 <div class="refsect2">
110 <a name="idp7421920"></a><h3>Element Information</h3>
111 <div class="variablelist"><table border="0">
112 <col align="left" valign="top">
115 <td><p><span class="term">plugin</span></p></td>
117 <a class="link" href="gst-plugins-base-plugins-plugin-audioconvert.html#plugin-audioconvert">audioconvert</a>
121 <td><p><span class="term">author</span></p></td>
122 <td>Benjamin Otte <otte@gnome.org></td>
125 <td><p><span class="term">class</span></p></td>
126 <td>Filter/Converter/Audio</td>
132 <div class="refsect2">
133 <a name="idp7007232"></a><h3>Element Pads</h3>
134 <div class="variablelist"><table border="0">
135 <col align="left" valign="top">
138 <td><p><span class="term">name</span></p></td>
142 <td><p><span class="term">direction</span></p></td>
146 <td><p><span class="term">presence</span></p></td>
150 <td><p><span class="term">details</span></p></td>
151 <td>audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)64</td>
154 <td><p><span class="term"></span></p></td>
155 <td> audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)32</td>
158 <td><p><span class="term"></span></p></td>
159 <td> audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)32, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }</td>
162 <td><p><span class="term"></span></p></td>
163 <td> audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)24, depth=(int)[ 1, 24 ], signed=(boolean){ true, false }</td>
166 <td><p><span class="term"></span></p></td>
167 <td> audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)16, depth=(int)[ 1, 16 ], signed=(boolean){ true, false }</td>
170 <td><p><span class="term"></span></p></td>
171 <td> audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)8, depth=(int)[ 1, 8 ], signed=(boolean){ true, false }</td>
175 <div class="variablelist"><table border="0">
176 <col align="left" valign="top">
179 <td><p><span class="term">name</span></p></td>
183 <td><p><span class="term">direction</span></p></td>
187 <td><p><span class="term">presence</span></p></td>
191 <td><p><span class="term">details</span></p></td>
192 <td>audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)64</td>
195 <td><p><span class="term"></span></p></td>
196 <td> audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)32</td>
199 <td><p><span class="term"></span></p></td>
200 <td> audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)32, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }</td>
203 <td><p><span class="term"></span></p></td>
204 <td> audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)24, depth=(int)[ 1, 24 ], signed=(boolean){ true, false }</td>
207 <td><p><span class="term"></span></p></td>
208 <td> audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)16, depth=(int)[ 1, 16 ], signed=(boolean){ true, false }</td>
211 <td><p><span class="term"></span></p></td>
212 <td> audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int)8, depth=(int)[ 1, 8 ], signed=(boolean){ true, false }</td>
221 <div class="refsect1">
222 <a name="gst-plugins-base-plugins-audioconvert.details"></a><h2>Details</h2>
223 <div class="refsect2">
224 <a name="GstAudioConvert-struct"></a><h3>struct GstAudioConvert</h3>
225 <pre class="programlisting">struct GstAudioConvert;</pre>
227 The audioconvert object structure.
231 <div class="refsect2">
232 <a name="GstAudioConvertDithering"></a><h3>enum GstAudioConvertDithering</h3>
233 <pre class="programlisting">typedef enum
239 } GstAudioConvertDithering;
242 Set of available dithering methods when converting audio.
244 <div class="variablelist"><table border="0">
245 <col align="left" valign="top">
248 <td><p><a name="DITHER-NONE:CAPS"></a><span class="term"><code class="literal">DITHER_NONE</code></span></p></td>
253 <td><p><a name="DITHER-RPDF:CAPS"></a><span class="term"><code class="literal">DITHER_RPDF</code></span></p></td>
254 <td>Rectangular dithering
258 <td><p><a name="DITHER-TPDF:CAPS"></a><span class="term"><code class="literal">DITHER_TPDF</code></span></p></td>
259 <td>Triangular dithering (default)
263 <td><p><a name="DITHER-TPDF-HF:CAPS"></a><span class="term"><code class="literal">DITHER_TPDF_HF</code></span></p></td>
264 <td>High frequency triangular dithering
271 <div class="refsect2">
272 <a name="GstAudioConvertNoiseShaping"></a><h3>enum GstAudioConvertNoiseShaping</h3>
273 <pre class="programlisting">typedef enum
275 NOISE_SHAPING_NONE = 0,
276 NOISE_SHAPING_ERROR_FEEDBACK,
277 NOISE_SHAPING_SIMPLE,
278 NOISE_SHAPING_MEDIUM,
280 } GstAudioConvertNoiseShaping;
283 Set of available noise shaping methods
285 <div class="variablelist"><table border="0">
286 <col align="left" valign="top">
289 <td><p><a name="NOISE-SHAPING-NONE:CAPS"></a><span class="term"><code class="literal">NOISE_SHAPING_NONE</code></span></p></td>
290 <td>No noise shaping (default)
294 <td><p><a name="NOISE-SHAPING-ERROR-FEEDBACK:CAPS"></a><span class="term"><code class="literal">NOISE_SHAPING_ERROR_FEEDBACK</code></span></p></td>
299 <td><p><a name="NOISE-SHAPING-SIMPLE:CAPS"></a><span class="term"><code class="literal">NOISE_SHAPING_SIMPLE</code></span></p></td>
300 <td>Simple 2-pole noise shaping
304 <td><p><a name="NOISE-SHAPING-MEDIUM:CAPS"></a><span class="term"><code class="literal">NOISE_SHAPING_MEDIUM</code></span></p></td>
305 <td>Medium 5-pole noise shaping
309 <td><p><a name="NOISE-SHAPING-HIGH:CAPS"></a><span class="term"><code class="literal">NOISE_SHAPING_HIGH</code></span></p></td>
310 <td>High 8-pole noise shaping
317 <div class="refsect1">
318 <a name="gst-plugins-base-plugins-audioconvert.property-details"></a><h2>Property Details</h2>
319 <div class="refsect2">
320 <a name="GstAudioConvert--dithering"></a><h3>The <code class="literal">"dithering"</code> property</h3>
321 <pre class="programlisting"> "dithering" <a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvertDithering" title="enum GstAudioConvertDithering"><span class="type">GstAudioConvertDithering</span></a> : Read / Write</pre>
322 <p>Selects between different dithering methods.</p>
323 <p>Default value: Triangular dithering (default)</p>
326 <div class="refsect2">
327 <a name="GstAudioConvert--noise-shaping"></a><h3>The <code class="literal">"noise-shaping"</code> property</h3>
328 <pre class="programlisting"> "noise-shaping" <a class="link" href="gst-plugins-base-plugins-audioconvert.html#GstAudioConvertNoiseShaping" title="enum GstAudioConvertNoiseShaping"><span class="type">GstAudioConvertNoiseShaping</span></a> : Read / Write</pre>
329 <p>Selects between different noise shaping methods.</p>
330 <p>Default value: No noise shaping (default)</p>
336 Generated by GTK-Doc V1.17</div>