tizen 2.3 release
[framework/multimedia/gst-plugins-base0.10.git] / docs / plugins / html / gst-plugins-base-plugins-audiotestsrc.html
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>audiotestsrc</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
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-audioresample.html" title="audioresample">
10 <link rel="next" href="gst-plugins-base-plugins-cdparanoiasrc.html" title="cdparanoiasrc">
11 <meta name="generator" content="GTK-Doc V1.18 (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="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="gst-plugins-base-plugins-audioresample.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-cdparanoiasrc.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#gst-plugins-base-plugins-audiotestsrc.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-plugins-audiotestsrc.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-base-plugins-audiotestsrc.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-base-plugins-audiotestsrc.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="gst-plugins-base-plugins-audiotestsrc"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
36 <td valign="top">
37 <h2><span class="refentrytitle"><a name="gst-plugins-base-plugins-audiotestsrc.top_of_page"></a>audiotestsrc</span></h2>
38 <p>audiotestsrc — Creates audio test signals of given frequency and volume</p>
39 </td>
40 <td valign="top" align="right"></td>
41 </tr></table></div>
42 <div class="refsynopsisdiv">
43 <a name="gst-plugins-base-plugins-audiotestsrc.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstAudioTestSrc"></a><pre class="synopsis">struct              <a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc-struct" title="struct GstAudioTestSrc">GstAudioTestSrc</a>;
45 enum                <a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave" title="enum GstAudioTestSrcWave">GstAudioTestSrcWave</a>;
46 </pre>
47 </div>
48 <div class="refsect1">
49 <a name="gst-plugins-base-plugins-audiotestsrc.object-hierarchy"></a><h2>Object Hierarchy</h2>
50 <pre class="synopsis">
51   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
52    +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
53          +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
54                +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/GstBaseSrc.html">GstBaseSrc</a>
55                      +----GstAudioTestSrc
56 </pre>
57 </div>
58 <div class="refsect1">
59 <a name="gst-plugins-base-plugins-audiotestsrc.properties"></a><h2>Properties</h2>
60 <pre class="synopsis">
61   "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--freq" title='The "freq" property'>freq</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write
62   "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--is-live" title='The "is-live" property'>is-live</a>"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
63   "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--samplesperbuffer" title='The "samplesperbuffer" property'>samplesperbuffer</a>"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write
64   "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--timestamp-offset" title='The "timestamp-offset" property'>timestamp-offset</a>"         <span class="type">gint64</span>                : Read / Write
65   "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--volume" title='The "volume" property'>volume</a>"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write
66   "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--wave" title='The "wave" property'>wave</a>"                     <a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave" title="enum GstAudioTestSrcWave"><span class="type">GstAudioTestSrcWave</span></a>   : Read / Write
67   "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--can-activate-pull" title='The "can-activate-pull" property'>can-activate-pull</a>"        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
68   "<a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrc--can-activate-push" title='The "can-activate-push" property'>can-activate-push</a>"        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
69 </pre>
70 </div>
71 <div class="refsect1">
72 <a name="gst-plugins-base-plugins-audiotestsrc.description"></a><h2>Description</h2>
73 <p>
74 AudioTestSrc can be used to generate basic audio signals. It support several
75 different waveforms and allows to set the base frequency and volume.
76 </p>
77 <p>
78 </p>
79 <div class="refsect2">
80 <a name="idp10528400"></a><h3>Example launch line</h3>
81 <div class="informalexample">
82   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
83     <tbody>
84       <tr>
85         <td class="listing_lines" align="right"><pre>1</pre></td>
86         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> alsasink</pre></td>
87       </tr>
88     </tbody>
89   </table>
90 </div>
91  This pipeline produces a sine with default frequency, 440 Hz, and the
92 default volume, 0.8 (relative to a maximum 1.0).
93 <div class="informalexample">
94   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
95     <tbody>
96       <tr>
97         <td class="listing_lines" align="right"><pre>1</pre></td>
98         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch audiotestsrc wave<span class="gtkdoc opt">=</span><span class="number">2</span> freq<span class="gtkdoc opt">=</span><span class="number">200</span> <span class="gtkdoc opt">!</span> audioconvert <span class="gtkdoc opt">!</span> tee name<span class="gtkdoc opt">=</span>t <span class="gtkdoc opt">!</span> queue <span class="gtkdoc opt">!</span> alsasink t<span class="gtkdoc opt">. !</span> queue <span class="gtkdoc opt">!</span> libvisual_lv_scope <span class="gtkdoc opt">!</span> ffmpegcolorspace <span class="gtkdoc opt">!</span> xvimagesink</pre></td>
99       </tr>
100     </tbody>
101   </table>
102 </div>
103  In this example a saw wave is generated. The wave is shown using a
104 scope visualizer from libvisual, allowing you to visually verify that
105 the saw wave is correct.
106 </div>
107 <p>
108 </p>
109 <div class="refsynopsisdiv">
110 <h2>Synopsis</h2>
111 <div class="refsect2">
112 <a name="idp10222736"></a><h3>Element Information</h3>
113 <div class="variablelist"><table border="0">
114 <col align="left" valign="top">
115 <tbody>
116 <tr>
117 <td><p><span class="term">plugin</span></p></td>
118 <td>
119             <a class="link" href="gst-plugins-base-plugins-plugin-audiotestsrc.html#plugin-audiotestsrc">audiotestsrc</a>
120           </td>
121 </tr>
122 <tr>
123 <td><p><span class="term">author</span></p></td>
124 <td>Stefan Kost &lt;ensonic@users.sf.net&gt;</td>
125 </tr>
126 <tr>
127 <td><p><span class="term">class</span></p></td>
128 <td>Source/Audio</td>
129 </tr>
130 </tbody>
131 </table></div>
132 </div>
133 <hr>
134 <div class="refsect2">
135 <a name="idp10230192"></a><h3>Element Pads</h3>
136 <div class="variablelist"><table border="0">
137 <col align="left" valign="top">
138 <tbody>
139 <tr>
140 <td><p><span class="term">name</span></p></td>
141 <td>src</td>
142 </tr>
143 <tr>
144 <td><p><span class="term">direction</span></p></td>
145 <td>source</td>
146 </tr>
147 <tr>
148 <td><p><span class="term">presence</span></p></td>
149 <td>always</td>
150 </tr>
151 <tr>
152 <td><p><span class="term">details</span></p></td>
153 <td>audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</td>
154 </tr>
155 <tr>
156 <td><p><span class="term"></span></p></td>
157 <td> audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</td>
158 </tr>
159 <tr>
160 <td><p><span class="term"></span></p></td>
161 <td> audio/x-raw-float, endianness=(int)1234, width=(int){ 32, 64 }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</td>
162 </tr>
163 </tbody>
164 </table></div>
165 </div>
166 </div>
167 <p>
168 </p>
169 </div>
170 <div class="refsect1">
171 <a name="gst-plugins-base-plugins-audiotestsrc.details"></a><h2>Details</h2>
172 <div class="refsect2">
173 <a name="GstAudioTestSrc-struct"></a><h3>struct GstAudioTestSrc</h3>
174 <pre class="programlisting">struct GstAudioTestSrc;</pre>
175 <p>
176 audiotestsrc object structure.
177 </p>
178 </div>
179 <hr>
180 <div class="refsect2">
181 <a name="GstAudioTestSrcWave"></a><h3>enum GstAudioTestSrcWave</h3>
182 <pre class="programlisting">typedef enum {
183   GST_AUDIO_TEST_SRC_WAVE_SINE,
184   GST_AUDIO_TEST_SRC_WAVE_SQUARE,
185   GST_AUDIO_TEST_SRC_WAVE_SAW,
186   GST_AUDIO_TEST_SRC_WAVE_TRIANGLE,
187   GST_AUDIO_TEST_SRC_WAVE_SILENCE,
188   GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE,
189   GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE,
190   GST_AUDIO_TEST_SRC_WAVE_SINE_TAB,
191   GST_AUDIO_TEST_SRC_WAVE_TICKS,
192   GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE,
193   GST_AUDIO_TEST_SRC_WAVE_RED_NOISE,
194   GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE,
195   GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE
196 } GstAudioTestSrcWave;
197 </pre>
198 <p>
199 Different types of supported sound waves.
200 </p>
201 <div class="variablelist"><table border="0">
202 <col align="left" valign="top">
203 <tbody>
204 <tr>
205 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SINE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SINE</code></span></p></td>
206 <td>a sine wave
207 </td>
208 </tr>
209 <tr>
210 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SQUARE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SQUARE</code></span></p></td>
211 <td>a square wave
212 </td>
213 </tr>
214 <tr>
215 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SAW:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SAW</code></span></p></td>
216 <td>a saw wave
217 </td>
218 </tr>
219 <tr>
220 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-TRIANGLE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_TRIANGLE</code></span></p></td>
221 <td>a tringle wave
222 </td>
223 </tr>
224 <tr>
225 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SILENCE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SILENCE</code></span></p></td>
226 <td>silence
227 </td>
228 </tr>
229 <tr>
230 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-WHITE-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_WHITE_NOISE</code></span></p></td>
231 <td>white uniform noise
232 </td>
233 </tr>
234 <tr>
235 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-PINK-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_PINK_NOISE</code></span></p></td>
236 <td>pink noise
237 </td>
238 </tr>
239 <tr>
240 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-SINE-TAB:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_SINE_TAB</code></span></p></td>
241 <td>sine wave using a table
242 </td>
243 </tr>
244 <tr>
245 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-TICKS:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_TICKS</code></span></p></td>
246 <td>periodic ticks
247 </td>
248 </tr>
249 <tr>
250 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-GAUSSIAN-WHITE-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_GAUSSIAN_WHITE_NOISE</code></span></p></td>
251 <td>white (zero mean) Gaussian noise;  volume sets the standard deviation of the noise in units of the range of values of the sample type, e.g. volume=0.1 produces noise with a standard deviation of 0.1*32767=3277 with 16-bit integer samples, or 0.1*1.0=0.1 with floating-point samples.
252 </td>
253 </tr>
254 <tr>
255 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-RED-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_RED_NOISE</code></span></p></td>
256 <td>red (brownian) noise
257 </td>
258 </tr>
259 <tr>
260 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-BLUE-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_BLUE_NOISE</code></span></p></td>
261 <td>spectraly inverted pink noise
262 </td>
263 </tr>
264 <tr>
265 <td><p><a name="GST-AUDIO-TEST-SRC-WAVE-VIOLET-NOISE:CAPS"></a><span class="term"><code class="literal">GST_AUDIO_TEST_SRC_WAVE_VIOLET_NOISE</code></span></p></td>
266 <td>spectraly inverted red (brownian) noise
267 </td>
268 </tr>
269 </tbody>
270 </table></div>
271 </div>
272 </div>
273 <div class="refsect1">
274 <a name="gst-plugins-base-plugins-audiotestsrc.property-details"></a><h2>Property Details</h2>
275 <div class="refsect2">
276 <a name="GstAudioTestSrc--freq"></a><h3>The <code class="literal">"freq"</code> property</h3>
277 <pre class="programlisting">  "freq"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write</pre>
278 <p>Frequency of test signal.</p>
279 <p>Allowed values: [0,20000]</p>
280 <p>Default value: 440</p>
281 </div>
282 <hr>
283 <div class="refsect2">
284 <a name="GstAudioTestSrc--is-live"></a><h3>The <code class="literal">"is-live"</code> property</h3>
285 <pre class="programlisting">  "is-live"                  <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
286 <p>Whether to act as a live source.</p>
287 <p>Default value: FALSE</p>
288 </div>
289 <hr>
290 <div class="refsect2">
291 <a name="GstAudioTestSrc--samplesperbuffer"></a><h3>The <code class="literal">"samplesperbuffer"</code> property</h3>
292 <pre class="programlisting">  "samplesperbuffer"         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write</pre>
293 <p>Number of samples in each outgoing buffer.</p>
294 <p>Allowed values: &gt;= 1</p>
295 <p>Default value: 1024</p>
296 </div>
297 <hr>
298 <div class="refsect2">
299 <a name="GstAudioTestSrc--timestamp-offset"></a><h3>The <code class="literal">"timestamp-offset"</code> property</h3>
300 <pre class="programlisting">  "timestamp-offset"         <span class="type">gint64</span>                : Read / Write</pre>
301 <p>An offset added to timestamps set on buffers (in ns).</p>
302 <p>Default value: 0</p>
303 </div>
304 <hr>
305 <div class="refsect2">
306 <a name="GstAudioTestSrc--volume"></a><h3>The <code class="literal">"volume"</code> property</h3>
307 <pre class="programlisting">  "volume"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>               : Read / Write</pre>
308 <p>Volume of test signal.</p>
309 <p>Allowed values: [0,1]</p>
310 <p>Default value: 0.8</p>
311 </div>
312 <hr>
313 <div class="refsect2">
314 <a name="GstAudioTestSrc--wave"></a><h3>The <code class="literal">"wave"</code> property</h3>
315 <pre class="programlisting">  "wave"                     <a class="link" href="gst-plugins-base-plugins-audiotestsrc.html#GstAudioTestSrcWave" title="enum GstAudioTestSrcWave"><span class="type">GstAudioTestSrcWave</span></a>   : Read / Write</pre>
316 <p>Oscillator waveform.</p>
317 <p>Default value: Sine</p>
318 </div>
319 <hr>
320 <div class="refsect2">
321 <a name="GstAudioTestSrc--can-activate-pull"></a><h3>The <code class="literal">"can-activate-pull"</code> property</h3>
322 <pre class="programlisting">  "can-activate-pull"        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
323 <p>Can activate in pull mode.</p>
324 <p>Default value: FALSE</p>
325 </div>
326 <hr>
327 <div class="refsect2">
328 <a name="GstAudioTestSrc--can-activate-push"></a><h3>The <code class="literal">"can-activate-push"</code> property</h3>
329 <pre class="programlisting">  "can-activate-push"        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
330 <p>Can activate in push mode.</p>
331 <p>Default value: TRUE</p>
332 </div>
333 </div>
334 </div>
335 <div class="footer">
336 <hr>
337           Generated by GTK-Doc V1.18</div>
338 </body>
339 </html>