• 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>GstAudioQuantize: 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-GstAudioConverter.html" title="GstAudioConverter">
10<link rel="next" href="GstAudioRingBuffer.html" title="GstAudioRingBuffer">
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="#gst-plugins-base-libs-GstAudioQuantize.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="gst-plugins-base-libs-GstAudioConverter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23<td><a accesskey="n" href="GstAudioRingBuffer.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-GstAudioQuantize"></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-GstAudioQuantize.top_of_page"></a>GstAudioQuantize</span></h2>
30<p>GstAudioQuantize</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-GstAudioQuantize.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="function_type">
44<span class="returnvalue">void</span>
45</td>
46<td class="function_name">
47<a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#gst-audio-quantize-free" title="gst_audio_quantize_free ()">gst_audio_quantize_free</a> <span class="c_punctuation">()</span>
48</td>
49</tr>
50<tr>
51<td class="function_type">
52<a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="returnvalue">GstAudioQuantize</span></a> *
53</td>
54<td class="function_name">
55<a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#gst-audio-quantize-new" title="gst_audio_quantize_new ()">gst_audio_quantize_new</a> <span class="c_punctuation">()</span>
56</td>
57</tr>
58<tr>
59<td class="function_type">
60<span class="returnvalue">void</span>
61</td>
62<td class="function_name">
63<a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#gst-audio-quantize-samples" title="gst_audio_quantize_samples ()">gst_audio_quantize_samples</a> <span class="c_punctuation">()</span>
64</td>
65</tr>
66<tr>
67<td class="function_type">
68<span class="returnvalue">void</span>
69</td>
70<td class="function_name">
71<a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#gst-audio-quantize-reset" title="gst_audio_quantize_reset ()">gst_audio_quantize_reset</a> <span class="c_punctuation">()</span>
72</td>
73</tr>
74</tbody>
75</table></div>
76</div>
77<div class="refsect1">
78<a name="gst-plugins-base-libs-GstAudioQuantize.other"></a><h2>Types and Values</h2>
79<div class="informaltable"><table class="informaltable" width="100%" border="0">
80<colgroup>
81<col width="150px" class="name">
82<col class="description">
83</colgroup>
84<tbody>
85<tr>
86<td class="datatype_keyword"> </td>
87<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize">GstAudioQuantize</a></td>
88</tr>
89<tr>
90<td class="datatype_keyword">enum</td>
91<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantizeFlags" title="enum GstAudioQuantizeFlags">GstAudioQuantizeFlags</a></td>
92</tr>
93<tr>
94<td class="datatype_keyword">enum</td>
95<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioDitherMethod" title="enum GstAudioDitherMethod">GstAudioDitherMethod</a></td>
96</tr>
97<tr>
98<td class="datatype_keyword">enum</td>
99<td class="function_name"><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioNoiseShapingMethod" title="enum GstAudioNoiseShapingMethod">GstAudioNoiseShapingMethod</a></td>
100</tr>
101</tbody>
102</table></div>
103</div>
104<div class="refsect1">
105<a name="gst-plugins-base-libs-GstAudioQuantize.includes"></a><h2>Includes</h2>
106<pre class="synopsis">#include &lt;gst/audio/audio.h&gt;
107</pre>
108</div>
109<div class="refsect1">
110<a name="gst-plugins-base-libs-GstAudioQuantize.description"></a><h2>Description</h2>
111</div>
112<div class="refsect1">
113<a name="gst-plugins-base-libs-GstAudioQuantize.functions_details"></a><h2>Functions</h2>
114<div class="refsect2">
115<a name="gst-audio-quantize-free"></a><h3>gst_audio_quantize_free ()</h3>
116<pre class="programlisting"><span class="returnvalue">void</span>
117gst_audio_quantize_free (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="type">GstAudioQuantize</span></a> *quant</code></em>);</pre>
118<p>Free a <a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="type">GstAudioQuantize</span></a>.</p>
119<div class="refsect3">
120<a name="gst-audio-quantize-free.parameters"></a><h4>Parameters</h4>
121<div class="informaltable"><table class="informaltable" width="100%" border="0">
122<colgroup>
123<col width="150px" class="parameters_name">
124<col class="parameters_description">
125<col width="200px" class="parameters_annotations">
126</colgroup>
127<tbody><tr>
128<td class="parameter_name"><p>quant</p></td>
129<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="type">GstAudioQuantize</span></a></p></td>
130<td class="parameter_annotations"> </td>
131</tr></tbody>
132</table></div>
133</div>
134</div>
135<hr>
136<div class="refsect2">
137<a name="gst-audio-quantize-new"></a><h3>gst_audio_quantize_new ()</h3>
138<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="returnvalue">GstAudioQuantize</span></a> *
139gst_audio_quantize_new (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioDitherMethod" title="enum GstAudioDitherMethod"><span class="type">GstAudioDitherMethod</span></a> dither</code></em>,
140                        <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioNoiseShapingMethod" title="enum GstAudioNoiseShapingMethod"><span class="type">GstAudioNoiseShapingMethod</span></a> ns</code></em>,
141                        <em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantizeFlags" title="enum GstAudioQuantizeFlags"><span class="type">GstAudioQuantizeFlags</span></a> flags</code></em>,
142                        <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>,
143                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> channels</code></em>,
144                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> quantizer</code></em>);</pre>
145</div>
146<hr>
147<div class="refsect2">
148<a name="gst-audio-quantize-samples"></a><h3>gst_audio_quantize_samples ()</h3>
149<pre class="programlisting"><span class="returnvalue">void</span>
150gst_audio_quantize_samples (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="type">GstAudioQuantize</span></a> *quant</code></em>,
151                            <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>,
152                            <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>,
153                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> samples</code></em>);</pre>
154<p>Perform quantization on <em class="parameter"><code>samples</code></em>
155 in <em class="parameter"><code>in</code></em>
156 and write the result to <em class="parameter"><code>out</code></em>
157.</p>
158<p>In case the samples are interleaved, <em class="parameter"><code>in</code></em>
159 and <em class="parameter"><code>out</code></em>
160 must point to an
161array with a single element pointing to a block of interleaved samples.</p>
162<p>If non-interleaved samples are used, <em class="parameter"><code>in</code></em>
163 and <em class="parameter"><code>out</code></em>
164 must point to an
165array with pointers to memory blocks, one for each channel.</p>
166<p><em class="parameter"><code>in</code></em>
167 and <em class="parameter"><code>out</code></em>
168 may point to the same memory location, in which case samples will be
169modified in-place.</p>
170<div class="refsect3">
171<a name="gst-audio-quantize-samples.parameters"></a><h4>Parameters</h4>
172<div class="informaltable"><table class="informaltable" width="100%" border="0">
173<colgroup>
174<col width="150px" class="parameters_name">
175<col class="parameters_description">
176<col width="200px" class="parameters_annotations">
177</colgroup>
178<tbody>
179<tr>
180<td class="parameter_name"><p>quant</p></td>
181<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="type">GstAudioQuantize</span></a></p></td>
182<td class="parameter_annotations"> </td>
183</tr>
184<tr>
185<td class="parameter_name"><p>in</p></td>
186<td class="parameter_description"><p>input samples</p></td>
187<td class="parameter_annotations"> </td>
188</tr>
189<tr>
190<td class="parameter_name"><p>out</p></td>
191<td class="parameter_description"><p>output samples</p></td>
192<td class="parameter_annotations"> </td>
193</tr>
194<tr>
195<td class="parameter_name"><p>samples</p></td>
196<td class="parameter_description"><p>number of samples</p></td>
197<td class="parameter_annotations"> </td>
198</tr>
199</tbody>
200</table></div>
201</div>
202</div>
203<hr>
204<div class="refsect2">
205<a name="gst-audio-quantize-reset"></a><h3>gst_audio_quantize_reset ()</h3>
206<pre class="programlisting"><span class="returnvalue">void</span>
207gst_audio_quantize_reset (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="type">GstAudioQuantize</span></a> *quant</code></em>);</pre>
208<p>Reset <em class="parameter"><code>quant</code></em>
209 to the state is was when created, clearing any
210history it might have.</p>
211<div class="refsect3">
212<a name="gst-audio-quantize-reset.parameters"></a><h4>Parameters</h4>
213<div class="informaltable"><table class="informaltable" width="100%" border="0">
214<colgroup>
215<col width="150px" class="parameters_name">
216<col class="parameters_description">
217<col width="200px" class="parameters_annotations">
218</colgroup>
219<tbody><tr>
220<td class="parameter_name"><p>quant</p></td>
221<td class="parameter_description"><p>a <a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#GstAudioQuantize" title="GstAudioQuantize"><span class="type">GstAudioQuantize</span></a></p></td>
222<td class="parameter_annotations"> </td>
223</tr></tbody>
224</table></div>
225</div>
226</div>
227</div>
228<div class="refsect1">
229<a name="gst-plugins-base-libs-GstAudioQuantize.other_details"></a><h2>Types and Values</h2>
230<div class="refsect2">
231<a name="GstAudioQuantize"></a><h3>GstAudioQuantize</h3>
232<pre class="programlisting">typedef struct _GstAudioQuantize GstAudioQuantize;</pre>
233</div>
234<hr>
235<div class="refsect2">
236<a name="GstAudioQuantizeFlags"></a><h3>enum GstAudioQuantizeFlags</h3>
237<p>Extra flags that can be passed to <a class="link" href="gst-plugins-base-libs-GstAudioQuantize.html#gst-audio-quantize-new" title="gst_audio_quantize_new ()"><code class="function">gst_audio_quantize_new()</code></a></p>
238<div class="refsect3">
239<a name="GstAudioQuantizeFlags.members"></a><h4>Members</h4>
240<div class="informaltable"><table class="informaltable" width="100%" border="0">
241<colgroup>
242<col width="300px" class="enum_members_name">
243<col class="enum_members_description">
244<col width="200px" class="enum_members_annotations">
245</colgroup>
246<tbody>
247<tr>
248<td class="enum_member_name"><p><a name="GST-AUDIO-QUANTIZE-FLAG-NONE:CAPS"></a>GST_AUDIO_QUANTIZE_FLAG_NONE</p></td>
249<td class="enum_member_description">
250<p>no flags</p>
251</td>
252<td class="enum_member_annotations"> </td>
253</tr>
254<tr>
255<td class="enum_member_name"><p><a name="GST-AUDIO-QUANTIZE-FLAG-NON-INTERLEAVED:CAPS"></a>GST_AUDIO_QUANTIZE_FLAG_NON_INTERLEAVED</p></td>
256<td class="enum_member_description">
257<p>samples are non-interleaved</p>
258</td>
259<td class="enum_member_annotations"> </td>
260</tr>
261</tbody>
262</table></div>
263</div>
264</div>
265<hr>
266<div class="refsect2">
267<a name="GstAudioDitherMethod"></a><h3>enum GstAudioDitherMethod</h3>
268<p>Set of available dithering methods.</p>
269<div class="refsect3">
270<a name="GstAudioDitherMethod.members"></a><h4>Members</h4>
271<div class="informaltable"><table class="informaltable" width="100%" border="0">
272<colgroup>
273<col width="300px" class="enum_members_name">
274<col class="enum_members_description">
275<col width="200px" class="enum_members_annotations">
276</colgroup>
277<tbody>
278<tr>
279<td class="enum_member_name"><p><a name="GST-AUDIO-DITHER-NONE:CAPS"></a>GST_AUDIO_DITHER_NONE</p></td>
280<td class="enum_member_description">
281<p>No dithering</p>
282</td>
283<td class="enum_member_annotations"> </td>
284</tr>
285<tr>
286<td class="enum_member_name"><p><a name="GST-AUDIO-DITHER-RPDF:CAPS"></a>GST_AUDIO_DITHER_RPDF</p></td>
287<td class="enum_member_description">
288<p>Rectangular dithering</p>
289</td>
290<td class="enum_member_annotations"> </td>
291</tr>
292<tr>
293<td class="enum_member_name"><p><a name="GST-AUDIO-DITHER-TPDF:CAPS"></a>GST_AUDIO_DITHER_TPDF</p></td>
294<td class="enum_member_description">
295<p>Triangular dithering (default)</p>
296</td>
297<td class="enum_member_annotations"> </td>
298</tr>
299<tr>
300<td class="enum_member_name"><p><a name="GST-AUDIO-DITHER-TPDF-HF:CAPS"></a>GST_AUDIO_DITHER_TPDF_HF</p></td>
301<td class="enum_member_description">
302<p>High frequency triangular dithering</p>
303</td>
304<td class="enum_member_annotations"> </td>
305</tr>
306</tbody>
307</table></div>
308</div>
309</div>
310<hr>
311<div class="refsect2">
312<a name="GstAudioNoiseShapingMethod"></a><h3>enum GstAudioNoiseShapingMethod</h3>
313<p>Set of available noise shaping methods</p>
314<div class="refsect3">
315<a name="GstAudioNoiseShapingMethod.members"></a><h4>Members</h4>
316<div class="informaltable"><table class="informaltable" width="100%" border="0">
317<colgroup>
318<col width="300px" class="enum_members_name">
319<col class="enum_members_description">
320<col width="200px" class="enum_members_annotations">
321</colgroup>
322<tbody>
323<tr>
324<td class="enum_member_name"><p><a name="GST-AUDIO-NOISE-SHAPING-NONE:CAPS"></a>GST_AUDIO_NOISE_SHAPING_NONE</p></td>
325<td class="enum_member_description">
326<p>No noise shaping (default)</p>
327</td>
328<td class="enum_member_annotations"> </td>
329</tr>
330<tr>
331<td class="enum_member_name"><p><a name="GST-AUDIO-NOISE-SHAPING-ERROR-FEEDBACK:CAPS"></a>GST_AUDIO_NOISE_SHAPING_ERROR_FEEDBACK</p></td>
332<td class="enum_member_description">
333<p>Error feedback</p>
334</td>
335<td class="enum_member_annotations"> </td>
336</tr>
337<tr>
338<td class="enum_member_name"><p><a name="GST-AUDIO-NOISE-SHAPING-SIMPLE:CAPS"></a>GST_AUDIO_NOISE_SHAPING_SIMPLE</p></td>
339<td class="enum_member_description">
340<p>Simple 2-pole noise shaping</p>
341</td>
342<td class="enum_member_annotations"> </td>
343</tr>
344<tr>
345<td class="enum_member_name"><p><a name="GST-AUDIO-NOISE-SHAPING-MEDIUM:CAPS"></a>GST_AUDIO_NOISE_SHAPING_MEDIUM</p></td>
346<td class="enum_member_description">
347<p>Medium 5-pole noise shaping</p>
348</td>
349<td class="enum_member_annotations"> </td>
350</tr>
351<tr>
352<td class="enum_member_name"><p><a name="GST-AUDIO-NOISE-SHAPING-HIGH:CAPS"></a>GST_AUDIO_NOISE_SHAPING_HIGH</p></td>
353<td class="enum_member_description">
354<p>High 8-pole noise shaping</p>
355</td>
356<td class="enum_member_annotations"> </td>
357</tr>
358</tbody>
359</table></div>
360</div>
361</div>
362</div>
363</div>
364<div class="footer">
365<hr>Generated by GTK-Doc V1.28</div>
366</body>
367</html>