Initialize Tizen 2.3
[framework/multimedia/gst-plugins-base0.10.git] / mobile / docs / plugins / html / gst-plugins-base-plugins-audiorate.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>audiorate</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-audioconvert.html" title="audioconvert">
10 <link rel="next" href="gst-plugins-base-plugins-audioresample.html" title="audioresample">
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-audioconvert.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-audioresample.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-audiorate.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#gst-plugins-base-plugins-audiorate.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#gst-plugins-base-plugins-audiorate.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#gst-plugins-base-plugins-audiorate.properties" class="shortcut">Properties</a>
31 </td></tr>
32 </table>
33 <div class="refentry">
34 <a name="gst-plugins-base-plugins-audiorate"></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-audiorate.top_of_page"></a>audiorate</span></h2>
38 <p>audiorate — Drops/duplicates/adjusts timestamps on audio samples to make a perfect stream</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-audiorate.synopsis"></a><h2>Synopsis</h2>
44 <a name="GstAudioRate"></a><pre class="synopsis">struct              <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate-struct" title="struct GstAudioRate">GstAudioRate</a>;
45 </pre>
46 </div>
47 <div class="refsect1">
48 <a name="gst-plugins-base-plugins-audiorate.object-hierarchy"></a><h2>Object Hierarchy</h2>
49 <pre class="synopsis">
50   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
51    +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html">GstObject</a>
52          +----<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html">GstElement</a>
53                +----GstAudioRate
54 </pre>
55 </div>
56 <div class="refsect1">
57 <a name="gst-plugins-base-plugins-audiorate.properties"></a><h2>Properties</h2>
58 <pre class="synopsis">
59   "<a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--add" title='The "add" property'>add</a>"                      <span class="type">guint64</span>               : Read
60   "<a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--drop" title='The "drop" property'>drop</a>"                     <span class="type">guint64</span>               : Read
61   "<a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--in" title='The "in" property'>in</a>"                       <span class="type">guint64</span>               : Read
62   "<a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--out" title='The "out" property'>out</a>"                      <span class="type">guint64</span>               : Read
63   "<a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--silent" title='The "silent" property'>silent</a>"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
64   "<a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--tolerance" title='The "tolerance" property'>tolerance</a>"                <span class="type">guint64</span>               : Read / Write
65   "<a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--skip-to-first" title='The "skip-to-first" property'>skip-to-first</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
66 </pre>
67 </div>
68 <div class="refsect1">
69 <a name="gst-plugins-base-plugins-audiorate.description"></a><h2>Description</h2>
70 <p>
71 This element takes an incoming stream of timestamped raw audio frames and
72 produces a perfect stream by inserting or dropping samples as needed.
73 </p>
74 <p>
75 This operation may be of use to link to elements that require or otherwise
76 implicitly assume a perfect stream as they do not store timestamps,
77 but derive this by some means (e.g. bitrate for some AVI cases).
78 </p>
79 <p>
80 The properties <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--in" title='The "in" property'><span class="type">"in"</span></a>, <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--out" title='The "out" property'><span class="type">"out"</span></a>, <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--add" title='The "add" property'><span class="type">"add"</span></a>
81 and <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--drop" title='The "drop" property'><span class="type">"drop"</span></a> can be read to obtain information about number of
82 input samples, output samples, dropped samples (i.e. the number of unused
83 input samples) and inserted samples (i.e. the number of samples added to
84 stream).
85 </p>
86 <p>
87 When the <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--silent" title='The "silent" property'><span class="type">"silent"</span></a> property is set to FALSE, a GObject property
88 notification will be emitted whenever one of the <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--add" title='The "add" property'><span class="type">"add"</span></a> or
89 <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--drop" title='The "drop" property'><span class="type">"drop"</span></a> values changes.
90 This can potentially cause performance degradation.
91 Note that property notification will happen from the streaming thread, so
92 applications should be prepared for this.
93 </p>
94 <p>
95 If the <a class="link" href="gst-plugins-base-plugins-audiorate.html#GstAudioRate--tolerance" title='The "tolerance" property'><span class="type">"tolerance"</span></a> property is non-zero, and an incoming buffer's
96 timestamp deviates less than the property indicates from what would make a
97 'perfect time', then no samples will be added or dropped.
98 Note that the output is still guaranteed to be a perfect stream, which means
99 that the incoming data is then simply shifted (by less than the indicated
100 tolerance) to a perfect time.
101 </p>
102 <p>
103 </p>
104 <div class="refsect2">
105 <a name="idp10065952"></a><h3>Example pipelines</h3>
106 <div class="informalexample">
107   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
108     <tbody>
109       <tr>
110         <td class="listing_lines" align="right"><pre>1</pre></td>
111         <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch <span class="gtkdoc opt">-</span>v alsasrc <span class="gtkdoc opt">!</span> audiorate <span class="gtkdoc opt">!</span> wavenc <span class="gtkdoc opt">!</span> filesink location<span class="gtkdoc opt">=</span>alsa<span class="gtkdoc opt">.</span>wav</pre></td>
112       </tr>
113     </tbody>
114   </table>
115 </div>
116  Capture audio from an ALSA device, and turn it into a perfect stream
117 for saving in a raw audio file.
118 </div>
119 <p>
120 </p>
121 <div class="refsynopsisdiv">
122 <h2>Synopsis</h2>
123 <div class="refsect2">
124 <a name="idp10068672"></a><h3>Element Information</h3>
125 <div class="variablelist"><table border="0">
126 <col align="left" valign="top">
127 <tbody>
128 <tr>
129 <td><p><span class="term">plugin</span></p></td>
130 <td>
131             <a class="link" href="gst-plugins-base-plugins-plugin-audiorate.html#plugin-audiorate">audiorate</a>
132           </td>
133 </tr>
134 <tr>
135 <td><p><span class="term">author</span></p></td>
136 <td>Wim Taymans &lt;wim@fluendo.com&gt;</td>
137 </tr>
138 <tr>
139 <td><p><span class="term">class</span></p></td>
140 <td>Filter/Effect/Audio</td>
141 </tr>
142 </tbody>
143 </table></div>
144 </div>
145 <hr>
146 <div class="refsect2">
147 <a name="idp10076128"></a><h3>Element Pads</h3>
148 <div class="variablelist"><table border="0">
149 <col align="left" valign="top">
150 <tbody>
151 <tr>
152 <td><p><span class="term">name</span></p></td>
153 <td>sink</td>
154 </tr>
155 <tr>
156 <td><p><span class="term">direction</span></p></td>
157 <td>sink</td>
158 </tr>
159 <tr>
160 <td><p><span class="term">presence</span></p></td>
161 <td>always</td>
162 </tr>
163 <tr>
164 <td><p><span class="term">details</span></p></td>
165 <td>audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 8, 16, 24, 32 }, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }</td>
166 </tr>
167 <tr>
168 <td><p><span class="term"></span></p></td>
169 <td> audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 32, 64 }</td>
170 </tr>
171 </tbody>
172 </table></div>
173 <div class="variablelist"><table border="0">
174 <col align="left" valign="top">
175 <tbody>
176 <tr>
177 <td><p><span class="term">name</span></p></td>
178 <td>src</td>
179 </tr>
180 <tr>
181 <td><p><span class="term">direction</span></p></td>
182 <td>source</td>
183 </tr>
184 <tr>
185 <td><p><span class="term">presence</span></p></td>
186 <td>always</td>
187 </tr>
188 <tr>
189 <td><p><span class="term">details</span></p></td>
190 <td>audio/x-raw-int, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 8, 16, 24, 32 }, depth=(int)[ 1, 32 ], signed=(boolean){ true, false }</td>
191 </tr>
192 <tr>
193 <td><p><span class="term"></span></p></td>
194 <td> audio/x-raw-float, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], endianness=(int){ 1234, 4321 }, width=(int){ 32, 64 }</td>
195 </tr>
196 </tbody>
197 </table></div>
198 </div>
199 </div>
200 <p>
201 </p>
202 </div>
203 <div class="refsect1">
204 <a name="gst-plugins-base-plugins-audiorate.details"></a><h2>Details</h2>
205 <div class="refsect2">
206 <a name="GstAudioRate-struct"></a><h3>struct GstAudioRate</h3>
207 <pre class="programlisting">struct GstAudioRate;</pre>
208 <p>
209 Opaque data structure.
210 </p>
211 </div>
212 </div>
213 <div class="refsect1">
214 <a name="gst-plugins-base-plugins-audiorate.property-details"></a><h2>Property Details</h2>
215 <div class="refsect2">
216 <a name="GstAudioRate--add"></a><h3>The <code class="literal">"add"</code> property</h3>
217 <pre class="programlisting">  "add"                      <span class="type">guint64</span>               : Read</pre>
218 <p>Number of added samples.</p>
219 <p>Default value: 0</p>
220 </div>
221 <hr>
222 <div class="refsect2">
223 <a name="GstAudioRate--drop"></a><h3>The <code class="literal">"drop"</code> property</h3>
224 <pre class="programlisting">  "drop"                     <span class="type">guint64</span>               : Read</pre>
225 <p>Number of dropped samples.</p>
226 <p>Default value: 0</p>
227 </div>
228 <hr>
229 <div class="refsect2">
230 <a name="GstAudioRate--in"></a><h3>The <code class="literal">"in"</code> property</h3>
231 <pre class="programlisting">  "in"                       <span class="type">guint64</span>               : Read</pre>
232 <p>Number of input samples.</p>
233 <p>Default value: 0</p>
234 </div>
235 <hr>
236 <div class="refsect2">
237 <a name="GstAudioRate--out"></a><h3>The <code class="literal">"out"</code> property</h3>
238 <pre class="programlisting">  "out"                      <span class="type">guint64</span>               : Read</pre>
239 <p>Number of output samples.</p>
240 <p>Default value: 0</p>
241 </div>
242 <hr>
243 <div class="refsect2">
244 <a name="GstAudioRate--silent"></a><h3>The <code class="literal">"silent"</code> property</h3>
245 <pre class="programlisting">  "silent"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
246 <p>Don't emit notify for dropped and duplicated frames.</p>
247 <p>Default value: TRUE</p>
248 </div>
249 <hr>
250 <div class="refsect2">
251 <a name="GstAudioRate--tolerance"></a><h3>The <code class="literal">"tolerance"</code> property</h3>
252 <pre class="programlisting">  "tolerance"                <span class="type">guint64</span>               : Read / Write</pre>
253 <p>
254 The difference between incoming timestamp and next timestamp must exceed
255 the given value for audiorate to add or drop samples.
256 </p>
257 <p>Default value: 0</p>
258 <p class="since">Since 0.10.26</p>
259 </div>
260 <hr>
261 <div class="refsect2">
262 <a name="GstAudioRate--skip-to-first"></a><h3>The <code class="literal">"skip-to-first"</code> property</h3>
263 <pre class="programlisting">  "skip-to-first"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
264 <p>
265 Don't produce buffers before the first one we receive.
266 </p>
267 <p>Default value: FALSE</p>
268 <p class="since">Since 0.10.33</p>
269 </div>
270 </div>
271 <div class="refsect1">
272 <a name="gst-plugins-base-plugins-audiorate.see-also"></a><h2>See Also</h2>
273 <a class="link" href="gst-plugins-base-plugins-videorate.html#GstVideoRate"><span class="type">GstVideoRate</span></a>
274 </div>
275 </div>
276 <div class="footer">
277 <hr>
278           Generated by GTK-Doc V1.18</div>
279 </body>
280 </html>