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>GstAudioDecoder: 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="GstAudioClock.html" title="GstAudioClock"> 10<link rel="next" href="GstAudioEncoder.html" title="GstAudioEncoder"> 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">|</span> 18 <a href="#GstAudioDecoder.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#GstAudioDecoder.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 20 <a href="#GstAudioDecoder.properties" class="shortcut">Properties</a></span> 21</td> 22<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 23<td><a accesskey="u" href="gstreamer-audio.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 24<td><a accesskey="p" href="GstAudioClock.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 25<td><a accesskey="n" href="GstAudioEncoder.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 26</tr></table> 27<div class="refentry"> 28<a name="GstAudioDecoder"></a><div class="titlepage"></div> 29<div class="refnamediv"><table width="100%"><tr> 30<td valign="top"> 31<h2><span class="refentrytitle"><a name="GstAudioDecoder.top_of_page"></a>GstAudioDecoder</span></h2> 32<p>GstAudioDecoder — Base class for audio decoders</p> 33</td> 34<td class="gallery_image" valign="top" align="right"></td> 35</tr></table></div> 36<div class="refsect1"> 37<a name="GstAudioDecoder.functions"></a><h2>Functions</h2> 38<div class="informaltable"><table class="informaltable" width="100%" border="0"> 39<colgroup> 40<col width="150px" class="functions_return"> 41<col class="functions_name"> 42</colgroup> 43<tbody> 44<tr> 45<td class="define_keyword">#define</td> 46<td class="function_name"> 47<a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-ERROR:CAPS" title="GST_AUDIO_DECODER_ERROR()">GST_AUDIO_DECODER_ERROR</a><span class="c_punctuation">()</span> 48</td> 49</tr> 50<tr> 51<td class="define_keyword">#define</td> 52<td class="function_name"> 53<a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-SINK-PAD:CAPS" title="GST_AUDIO_DECODER_SINK_PAD()">GST_AUDIO_DECODER_SINK_PAD</a><span class="c_punctuation">()</span> 54</td> 55</tr> 56<tr> 57<td class="define_keyword">#define</td> 58<td class="function_name"> 59<a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-SRC-PAD:CAPS" title="GST_AUDIO_DECODER_SRC_PAD()">GST_AUDIO_DECODER_SRC_PAD</a><span class="c_punctuation">()</span> 60</td> 61</tr> 62<tr> 63<td class="define_keyword">#define</td> 64<td class="function_name"> 65<a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-INPUT-SEGMENT:CAPS" title="GST_AUDIO_DECODER_INPUT_SEGMENT()">GST_AUDIO_DECODER_INPUT_SEGMENT</a><span class="c_punctuation">()</span> 66</td> 67</tr> 68<tr> 69<td class="define_keyword">#define</td> 70<td class="function_name"> 71<a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-OUTPUT-SEGMENT:CAPS" title="GST_AUDIO_DECODER_OUTPUT_SEGMENT()">GST_AUDIO_DECODER_OUTPUT_SEGMENT</a><span class="c_punctuation">()</span> 72</td> 73</tr> 74<tr> 75<td class="define_keyword">#define</td> 76<td class="function_name"> 77<a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-STREAM-LOCK:CAPS" title="GST_AUDIO_DECODER_STREAM_LOCK()">GST_AUDIO_DECODER_STREAM_LOCK</a><span class="c_punctuation">()</span> 78</td> 79</tr> 80<tr> 81<td class="define_keyword">#define</td> 82<td class="function_name"> 83<a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-STREAM-UNLOCK:CAPS" title="GST_AUDIO_DECODER_STREAM_UNLOCK()">GST_AUDIO_DECODER_STREAM_UNLOCK</a><span class="c_punctuation">()</span> 84</td> 85</tr> 86<tr> 87<td class="function_type"> 88<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 89</td> 90<td class="function_name"> 91<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-finish-frame" title="gst_audio_decoder_finish_frame ()">gst_audio_decoder_finish_frame</a> <span class="c_punctuation">()</span> 92</td> 93</tr> 94<tr> 95<td class="function_type"> 96<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 97</td> 98<td class="function_name"> 99<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-finish-subframe" title="gst_audio_decoder_finish_subframe ()">gst_audio_decoder_finish_subframe</a> <span class="c_punctuation">()</span> 100</td> 101</tr> 102<tr> 103<td class="function_type"> 104<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 105</td> 106<td class="function_name"> 107<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-output-format" title="gst_audio_decoder_set_output_format ()">gst_audio_decoder_set_output_format</a> <span class="c_punctuation">()</span> 108</td> 109</tr> 110<tr> 111<td class="function_type"> 112<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 113</td> 114<td class="function_name"> 115<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-output-caps" title="gst_audio_decoder_set_output_caps ()">gst_audio_decoder_set_output_caps</a> <span class="c_punctuation">()</span> 116</td> 117</tr> 118<tr> 119<td class="function_type"> 120<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 121</td> 122<td class="function_name"> 123<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-negotiate" title="gst_audio_decoder_negotiate ()">gst_audio_decoder_negotiate</a> <span class="c_punctuation">()</span> 124</td> 125</tr> 126<tr> 127<td class="function_type"> 128<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 129</td> 130<td class="function_name"> 131<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-allocate-output-buffer" title="gst_audio_decoder_allocate_output_buffer ()">gst_audio_decoder_allocate_output_buffer</a> <span class="c_punctuation">()</span> 132</td> 133</tr> 134<tr> 135<td class="function_type"> 136<span class="returnvalue">void</span> 137</td> 138<td class="function_name"> 139<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-allocator" title="gst_audio_decoder_get_allocator ()">gst_audio_decoder_get_allocator</a> <span class="c_punctuation">()</span> 140</td> 141</tr> 142<tr> 143<td class="function_type"> 144<a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioInfo"><span class="returnvalue">GstAudioInfo</span></a> * 145</td> 146<td class="function_name"> 147<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-audio-info" title="gst_audio_decoder_get_audio_info ()">gst_audio_decoder_get_audio_info</a> <span class="c_punctuation">()</span> 148</td> 149</tr> 150<tr> 151<td class="function_type"> 152<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 153</td> 154<td class="function_name"> 155<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-estimate-rate" title="gst_audio_decoder_get_estimate_rate ()">gst_audio_decoder_get_estimate_rate</a> <span class="c_punctuation">()</span> 156</td> 157</tr> 158<tr> 159<td class="function_type"> 160<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 161</td> 162<td class="function_name"> 163<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-delay" title="gst_audio_decoder_get_delay ()">gst_audio_decoder_get_delay</a> <span class="c_punctuation">()</span> 164</td> 165</tr> 166<tr> 167<td class="function_type"> 168<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 169</td> 170<td class="function_name"> 171<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-drainable" title="gst_audio_decoder_get_drainable ()">gst_audio_decoder_get_drainable</a> <span class="c_punctuation">()</span> 172</td> 173</tr> 174<tr> 175<td class="function_type"> 176<span class="returnvalue">void</span> 177</td> 178<td class="function_name"> 179<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-latency" title="gst_audio_decoder_get_latency ()">gst_audio_decoder_get_latency</a> <span class="c_punctuation">()</span> 180</td> 181</tr> 182<tr> 183<td class="function_type"> 184<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 185</td> 186<td class="function_name"> 187<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-max-errors" title="gst_audio_decoder_get_max_errors ()">gst_audio_decoder_get_max_errors</a> <span class="c_punctuation">()</span> 188</td> 189</tr> 190<tr> 191<td class="function_type"> 192<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a> 193</td> 194<td class="function_name"> 195<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-min-latency" title="gst_audio_decoder_get_min_latency ()">gst_audio_decoder_get_min_latency</a> <span class="c_punctuation">()</span> 196</td> 197</tr> 198<tr> 199<td class="function_type"> 200<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 201</td> 202<td class="function_name"> 203<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-needs-format" title="gst_audio_decoder_get_needs_format ()">gst_audio_decoder_get_needs_format</a> <span class="c_punctuation">()</span> 204</td> 205</tr> 206<tr> 207<td class="function_type"> 208<span class="returnvalue">void</span> 209</td> 210<td class="function_name"> 211<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-parse-state" title="gst_audio_decoder_get_parse_state ()">gst_audio_decoder_get_parse_state</a> <span class="c_punctuation">()</span> 212</td> 213</tr> 214<tr> 215<td class="function_type"> 216<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 217</td> 218<td class="function_name"> 219<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-plc" title="gst_audio_decoder_get_plc ()">gst_audio_decoder_get_plc</a> <span class="c_punctuation">()</span> 220</td> 221</tr> 222<tr> 223<td class="function_type"> 224<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 225</td> 226<td class="function_name"> 227<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-plc-aware" title="gst_audio_decoder_get_plc_aware ()">gst_audio_decoder_get_plc_aware</a> <span class="c_punctuation">()</span> 228</td> 229</tr> 230<tr> 231<td class="function_type"> 232<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a> 233</td> 234<td class="function_name"> 235<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-get-tolerance" title="gst_audio_decoder_get_tolerance ()">gst_audio_decoder_get_tolerance</a> <span class="c_punctuation">()</span> 236</td> 237</tr> 238<tr> 239<td class="function_type"> 240<span class="returnvalue">void</span> 241</td> 242<td class="function_name"> 243<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-estimate-rate" title="gst_audio_decoder_set_estimate_rate ()">gst_audio_decoder_set_estimate_rate</a> <span class="c_punctuation">()</span> 244</td> 245</tr> 246<tr> 247<td class="function_type"> 248<span class="returnvalue">void</span> 249</td> 250<td class="function_name"> 251<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-drainable" title="gst_audio_decoder_set_drainable ()">gst_audio_decoder_set_drainable</a> <span class="c_punctuation">()</span> 252</td> 253</tr> 254<tr> 255<td class="function_type"> 256<span class="returnvalue">void</span> 257</td> 258<td class="function_name"> 259<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-latency" title="gst_audio_decoder_set_latency ()">gst_audio_decoder_set_latency</a> <span class="c_punctuation">()</span> 260</td> 261</tr> 262<tr> 263<td class="function_type"> 264<span class="returnvalue">void</span> 265</td> 266<td class="function_name"> 267<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-max-errors" title="gst_audio_decoder_set_max_errors ()">gst_audio_decoder_set_max_errors</a> <span class="c_punctuation">()</span> 268</td> 269</tr> 270<tr> 271<td class="function_type"> 272<span class="returnvalue">void</span> 273</td> 274<td class="function_name"> 275<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-min-latency" title="gst_audio_decoder_set_min_latency ()">gst_audio_decoder_set_min_latency</a> <span class="c_punctuation">()</span> 276</td> 277</tr> 278<tr> 279<td class="function_type"> 280<span class="returnvalue">void</span> 281</td> 282<td class="function_name"> 283<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-needs-format" title="gst_audio_decoder_set_needs_format ()">gst_audio_decoder_set_needs_format</a> <span class="c_punctuation">()</span> 284</td> 285</tr> 286<tr> 287<td class="function_type"> 288<span class="returnvalue">void</span> 289</td> 290<td class="function_name"> 291<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-plc" title="gst_audio_decoder_set_plc ()">gst_audio_decoder_set_plc</a> <span class="c_punctuation">()</span> 292</td> 293</tr> 294<tr> 295<td class="function_type"> 296<span class="returnvalue">void</span> 297</td> 298<td class="function_name"> 299<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-plc-aware" title="gst_audio_decoder_set_plc_aware ()">gst_audio_decoder_set_plc_aware</a> <span class="c_punctuation">()</span> 300</td> 301</tr> 302<tr> 303<td class="function_type"> 304<span class="returnvalue">void</span> 305</td> 306<td class="function_name"> 307<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-tolerance" title="gst_audio_decoder_set_tolerance ()">gst_audio_decoder_set_tolerance</a> <span class="c_punctuation">()</span> 308</td> 309</tr> 310<tr> 311<td class="function_type"> 312<span class="returnvalue">void</span> 313</td> 314<td class="function_name"> 315<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-allocation-caps" title="gst_audio_decoder_set_allocation_caps ()">gst_audio_decoder_set_allocation_caps</a> <span class="c_punctuation">()</span> 316</td> 317</tr> 318<tr> 319<td class="function_type"> 320<span class="returnvalue">void</span> 321</td> 322<td class="function_name"> 323<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-use-default-pad-acceptcaps" title="gst_audio_decoder_set_use_default_pad_acceptcaps ()">gst_audio_decoder_set_use_default_pad_acceptcaps</a> <span class="c_punctuation">()</span> 324</td> 325</tr> 326<tr> 327<td class="function_type"> 328<span class="returnvalue">void</span> 329</td> 330<td class="function_name"> 331<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-merge-tags" title="gst_audio_decoder_merge_tags ()">gst_audio_decoder_merge_tags</a> <span class="c_punctuation">()</span> 332</td> 333</tr> 334<tr> 335<td class="function_type"> 336<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="returnvalue">GstCaps</span></a> * 337</td> 338<td class="function_name"> 339<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-proxy-getcaps" title="gst_audio_decoder_proxy_getcaps ()">gst_audio_decoder_proxy_getcaps</a> <span class="c_punctuation">()</span> 340</td> 341</tr> 342</tbody> 343</table></div> 344</div> 345<div class="refsect1"> 346<a name="GstAudioDecoder.properties"></a><h2>Properties</h2> 347<div class="informaltable"><table class="informaltable" border="0"> 348<colgroup> 349<col width="150px" class="properties_type"> 350<col width="300px" class="properties_name"> 351<col width="200px" class="properties_flags"> 352</colgroup> 353<tbody> 354<tr> 355<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a></td> 356<td class="property_name"><a class="link" href="GstAudioDecoder.html#GstAudioDecoder--min-latency" title="The “min-latency” property">min-latency</a></td> 357<td class="property_flags">Read / Write</td> 358</tr> 359<tr> 360<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 361<td class="property_name"><a class="link" href="GstAudioDecoder.html#GstAudioDecoder--plc" title="The “plc” property">plc</a></td> 362<td class="property_flags">Read / Write</td> 363</tr> 364<tr> 365<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a></td> 366<td class="property_name"><a class="link" href="GstAudioDecoder.html#GstAudioDecoder--tolerance" title="The “tolerance” property">tolerance</a></td> 367<td class="property_flags">Read / Write</td> 368</tr> 369</tbody> 370</table></div> 371</div> 372<div class="refsect1"> 373<a name="GstAudioDecoder.other"></a><h2>Types and Values</h2> 374<div class="informaltable"><table class="informaltable" width="100%" border="0"> 375<colgroup> 376<col width="150px" class="name"> 377<col class="description"> 378</colgroup> 379<tbody> 380<tr> 381<td class="datatype_keyword">struct</td> 382<td class="function_name"><a class="link" href="GstAudioDecoder.html#GstAudioDecoder-struct" title="struct GstAudioDecoder">GstAudioDecoder</a></td> 383</tr> 384<tr> 385<td class="datatype_keyword">struct</td> 386<td class="function_name"><a class="link" href="GstAudioDecoder.html#GstAudioDecoderClass" title="struct GstAudioDecoderClass">GstAudioDecoderClass</a></td> 387</tr> 388<tr> 389<td class="define_keyword">#define</td> 390<td class="function_name"><a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-SINK-NAME:CAPS" title="GST_AUDIO_DECODER_SINK_NAME">GST_AUDIO_DECODER_SINK_NAME</a></td> 391</tr> 392<tr> 393<td class="define_keyword">#define</td> 394<td class="function_name"><a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-SRC-NAME:CAPS" title="GST_AUDIO_DECODER_SRC_NAME">GST_AUDIO_DECODER_SRC_NAME</a></td> 395</tr> 396<tr> 397<td class="define_keyword">#define</td> 398<td class="function_name"><a class="link" href="GstAudioDecoder.html#GST-AUDIO-DECODER-MAX-ERRORS:CAPS" title="GST_AUDIO_DECODER_MAX_ERRORS">GST_AUDIO_DECODER_MAX_ERRORS</a></td> 399</tr> 400</tbody> 401</table></div> 402</div> 403<div class="refsect1"> 404<a name="GstAudioDecoder.object-hierarchy"></a><h2>Object Hierarchy</h2> 405<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 406 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 407 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 408 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 409 <span class="lineart">╰──</span> GstAudioDecoder 410</pre> 411</div> 412<div class="refsect1"> 413<a name="GstAudioDecoder.includes"></a><h2>Includes</h2> 414<pre class="synopsis">#include <gst/audio/audio.h> 415</pre> 416</div> 417<div class="refsect1"> 418<a name="GstAudioDecoder.description"></a><h2>Description</h2> 419<p>This base class is for audio decoders turning encoded data into 420raw audio samples.</p> 421<p>GstAudioDecoder and subclass should cooperate as follows.</p> 422<div class="refsect3"> 423<a name="id-1.2.6.8.8.4"></a><h4>Configuration</h4> 424<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 425<li class="listitem"><p>Initially, GstAudioDecoder calls <em class="parameter"><code>start</code></em> 426 when the decoder element 427is activated, which allows subclass to perform any global setup. 428Base class (context) parameters can already be set according to subclass 429capabilities (or possibly upon receive more information in subsequent 430<em class="parameter"><code>set_format</code></em> 431).</p></li> 432<li class="listitem"><p>GstAudioDecoder calls <em class="parameter"><code>set_format</code></em> 433 to inform subclass of the format 434of input audio data that it is about to receive. 435While unlikely, it might be called more than once, if changing input 436parameters require reconfiguration.</p></li> 437<li class="listitem"><p>GstAudioDecoder calls <em class="parameter"><code>stop</code></em> 438 at end of all processing.</p></li> 439</ul></div> 440<p>As of configuration stage, and throughout processing, GstAudioDecoder 441provides various (context) parameters, e.g. describing the format of 442output audio data (valid when output caps have been set) or current parsing state. 443Conversely, subclass can and should configure context to inform 444base class of its expectation w.r.t. buffer handling.</p> 445</div> 446<div class="refsect3"> 447<a name="id-1.2.6.8.8.5"></a><h4>Data processing</h4> 448<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 449<p>Base class gathers input data, and optionally allows subclass 450 to parse this into subsequently manageable (as defined by subclass) 451 chunks. Such chunks are subsequently referred to as 'frames', 452 though they may or may not correspond to 1 (or more) audio format frame.</p> 453<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "> 454<li class="listitem"><p>Input frame is provided to subclass' <em class="parameter"><code>handle_frame</code></em> 455.</p></li> 456<li class="listitem"><p>If codec processing results in decoded data, subclass should call 457<em class="parameter"><code>gst_audio_decoder_finish_frame</code></em> 458 to have decoded data pushed 459downstream.</p></li> 460<li class="listitem"><p>Just prior to actually pushing a buffer downstream, 461it is passed to <em class="parameter"><code>pre_push</code></em> 462. Subclass should either use this callback 463to arrange for additional downstream pushing or otherwise ensure such 464custom pushing occurs after at least a method call has finished since 465setting src pad caps.</p></li> 466<li class="listitem"><p>During the parsing process GstAudioDecoderClass will handle both 467srcpad and sinkpad events. Sink events will be passed to subclass 468if <em class="parameter"><code>event</code></em> 469 callback has been provided.</p></li> 470</ul></div> 471</li></ul></div> 472</div> 473<div class="refsect3"> 474<a name="id-1.2.6.8.8.6"></a><h4>Shutdown phase</h4> 475<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>GstAudioDecoder class calls <em class="parameter"><code>stop</code></em> 476 to inform the subclass that data 477parsing will be stopped.</p></li></ul></div> 478<p>Subclass is responsible for providing pad template caps for 479source and sink pads. The pads need to be named "sink" and "src". It also 480needs to set the fixed caps on srcpad, when the format is ensured. This 481is typically when base class calls subclass' <em class="parameter"><code>set_format</code></em> 482 function, though 483it might be delayed until calling <em class="parameter"><code>gst_audio_decoder_finish_frame</code></em> 484.</p> 485<p>In summary, above process should have subclass concentrating on 486codec data processing while leaving other matters to base class, 487such as most notably timestamp handling. While it may exert more control 488in this area (see e.g. <em class="parameter"><code>pre_push</code></em> 489), it is very much not recommended.</p> 490<p>In particular, base class will try to arrange for perfect output timestamps 491as much as possible while tracking upstream timestamps. 492To this end, if deviation between the next ideal expected perfect timestamp 493and upstream exceeds <a class="link" href="GstAudioDecoder.html#GstAudioDecoder--tolerance" title="The “tolerance” property"><span class="type">“tolerance”</span></a>, then resync to upstream 494occurs (which would happen always if the tolerance mechanism is disabled).</p> 495<p>In non-live pipelines, baseclass can also (configurably) arrange for 496output buffer aggregation which may help to redue large(r) numbers of 497small(er) buffers being pushed and processed downstream. Note that this 498feature is only available if the buffer layout is interleaved. For planar 499buffers, the decoder implementation is fully responsible for the output 500buffer size.</p> 501<p>On the other hand, it should be noted that baseclass only provides limited 502seeking support (upon explicit subclass request), as full-fledged support 503should rather be left to upstream demuxer, parser or alike. This simple 504approach caters for seeking and duration reporting using estimated input 505bitrates.</p> 506<p>Things that subclass need to take care of:</p> 507<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 508<li class="listitem"><p>Provide pad templates</p></li> 509<li class="listitem"><p>Set source pad caps when appropriate</p></li> 510<li class="listitem"><p>Set user-configurable properties to sane defaults for format and 511 implementing codec at hand, and convey some subclass capabilities and 512 expectations in context.</p></li> 513<li class="listitem"><p>Accept data in <em class="parameter"><code>handle_frame</code></em> 514 and provide encoded results to 515 <em class="parameter"><code>gst_audio_decoder_finish_frame</code></em> 516. If it is prepared to perform 517 PLC, it should also accept NULL data in <em class="parameter"><code>handle_frame</code></em> 518 and provide for 519 data for indicated duration.</p></li> 520</ul></div> 521</div> 522</div> 523<div class="refsect1"> 524<a name="GstAudioDecoder.functions_details"></a><h2>Functions</h2> 525<div class="refsect2"> 526<a name="GST-AUDIO-DECODER-ERROR:CAPS"></a><h3>GST_AUDIO_DECODER_ERROR()</h3> 527<pre class="programlisting">#define GST_AUDIO_DECODER_ERROR(el, weight, domain, code, text, debug, ret)</pre> 528<p>Utility function that audio decoder elements can use in case they encountered 529a data processing error that may be fatal for the current "data unit" but 530need not prevent subsequent decoding. Such errors are counted and if there 531are too many, as configured in the context's max_errors, the pipeline will 532post an error message and the application will be requested to stop further 533media processing. Otherwise, it is considered a "glitch" and only a warning 534is logged. In either case, <em class="parameter"><code>ret</code></em> 535 is set to the proper value to 536return to upstream/caller (indicating either GST_FLOW_ERROR or GST_FLOW_OK).</p> 537<div class="refsect3"> 538<a name="GST-AUDIO-DECODER-ERROR.parameters"></a><h4>Parameters</h4> 539<div class="informaltable"><table class="informaltable" width="100%" border="0"> 540<colgroup> 541<col width="150px" class="parameters_name"> 542<col class="parameters_description"> 543<col width="200px" class="parameters_annotations"> 544</colgroup> 545<tbody> 546<tr> 547<td class="parameter_name"><p>el</p></td> 548<td class="parameter_description"><p>the base audio decoder element that generates the error</p></td> 549<td class="parameter_annotations"> </td> 550</tr> 551<tr> 552<td class="parameter_name"><p>weight</p></td> 553<td class="parameter_description"><p>element defined weight of the error, added to error count</p></td> 554<td class="parameter_annotations"> </td> 555</tr> 556<tr> 557<td class="parameter_name"><p>domain</p></td> 558<td class="parameter_description"><p>like CORE, LIBRARY, RESOURCE or STREAM (see <span class="type">gstreamer-GstGError</span>)</p></td> 559<td class="parameter_annotations"> </td> 560</tr> 561<tr> 562<td class="parameter_name"><p>code</p></td> 563<td class="parameter_description"><p>error code defined for that domain (see <span class="type">gstreamer-GstGError</span>)</p></td> 564<td class="parameter_annotations"> </td> 565</tr> 566<tr> 567<td class="parameter_name"><p>text</p></td> 568<td class="parameter_description"><p>the message to display (format string and args enclosed in 569parentheses)</p></td> 570<td class="parameter_annotations"> </td> 571</tr> 572<tr> 573<td class="parameter_name"><p>debug</p></td> 574<td class="parameter_description"><p>debugging information for the message (format string and args 575enclosed in parentheses)</p></td> 576<td class="parameter_annotations"> </td> 577</tr> 578<tr> 579<td class="parameter_name"><p>ret</p></td> 580<td class="parameter_description"><p>variable to receive return value</p></td> 581<td class="parameter_annotations"> </td> 582</tr> 583</tbody> 584</table></div> 585</div> 586</div> 587<hr> 588<div class="refsect2"> 589<a name="GST-AUDIO-DECODER-SINK-PAD:CAPS"></a><h3>GST_AUDIO_DECODER_SINK_PAD()</h3> 590<pre class="programlisting">#define GST_AUDIO_DECODER_SINK_PAD(obj) (((GstAudioDecoder *) (obj))->sinkpad) 591</pre> 592<p>Gives the pointer to the sink <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> object of the element.</p> 593<div class="refsect3"> 594<a name="GST-AUDIO-DECODER-SINK-PAD.parameters"></a><h4>Parameters</h4> 595<div class="informaltable"><table class="informaltable" width="100%" border="0"> 596<colgroup> 597<col width="150px" class="parameters_name"> 598<col class="parameters_description"> 599<col width="200px" class="parameters_annotations"> 600</colgroup> 601<tbody><tr> 602<td class="parameter_name"><p>obj</p></td> 603<td class="parameter_description"><p>base audio codec instance</p></td> 604<td class="parameter_annotations"> </td> 605</tr></tbody> 606</table></div> 607</div> 608</div> 609<hr> 610<div class="refsect2"> 611<a name="GST-AUDIO-DECODER-SRC-PAD:CAPS"></a><h3>GST_AUDIO_DECODER_SRC_PAD()</h3> 612<pre class="programlisting">#define GST_AUDIO_DECODER_SRC_PAD(obj) (((GstAudioDecoder *) (obj))->srcpad) 613</pre> 614<p>Gives the pointer to the source <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> object of the element.</p> 615<div class="refsect3"> 616<a name="GST-AUDIO-DECODER-SRC-PAD.parameters"></a><h4>Parameters</h4> 617<div class="informaltable"><table class="informaltable" width="100%" border="0"> 618<colgroup> 619<col width="150px" class="parameters_name"> 620<col class="parameters_description"> 621<col width="200px" class="parameters_annotations"> 622</colgroup> 623<tbody><tr> 624<td class="parameter_name"><p>obj</p></td> 625<td class="parameter_description"><p>base audio codec instance</p></td> 626<td class="parameter_annotations"> </td> 627</tr></tbody> 628</table></div> 629</div> 630</div> 631<hr> 632<div class="refsect2"> 633<a name="GST-AUDIO-DECODER-INPUT-SEGMENT:CAPS"></a><h3>GST_AUDIO_DECODER_INPUT_SEGMENT()</h3> 634<pre class="programlisting">#define GST_AUDIO_DECODER_INPUT_SEGMENT(obj) (GST_AUDIO_DECODER_CAST (obj)->input_segment) 635</pre> 636<p>Gives the input segment of the element.</p> 637<div class="refsect3"> 638<a name="GST-AUDIO-DECODER-INPUT-SEGMENT.parameters"></a><h4>Parameters</h4> 639<div class="informaltable"><table class="informaltable" width="100%" border="0"> 640<colgroup> 641<col width="150px" class="parameters_name"> 642<col class="parameters_description"> 643<col width="200px" class="parameters_annotations"> 644</colgroup> 645<tbody><tr> 646<td class="parameter_name"><p>obj</p></td> 647<td class="parameter_description"><p>audio decoder instance</p></td> 648<td class="parameter_annotations"> </td> 649</tr></tbody> 650</table></div> 651</div> 652</div> 653<hr> 654<div class="refsect2"> 655<a name="GST-AUDIO-DECODER-OUTPUT-SEGMENT:CAPS"></a><h3>GST_AUDIO_DECODER_OUTPUT_SEGMENT()</h3> 656<pre class="programlisting">#define GST_AUDIO_DECODER_OUTPUT_SEGMENT(obj) (GST_AUDIO_DECODER_CAST (obj)->output_segment) 657</pre> 658<p>Gives the output segment of the element.</p> 659<div class="refsect3"> 660<a name="GST-AUDIO-DECODER-OUTPUT-SEGMENT.parameters"></a><h4>Parameters</h4> 661<div class="informaltable"><table class="informaltable" width="100%" border="0"> 662<colgroup> 663<col width="150px" class="parameters_name"> 664<col class="parameters_description"> 665<col width="200px" class="parameters_annotations"> 666</colgroup> 667<tbody><tr> 668<td class="parameter_name"><p>obj</p></td> 669<td class="parameter_description"><p>audio decoder instance</p></td> 670<td class="parameter_annotations"> </td> 671</tr></tbody> 672</table></div> 673</div> 674</div> 675<hr> 676<div class="refsect2"> 677<a name="GST-AUDIO-DECODER-STREAM-LOCK:CAPS"></a><h3>GST_AUDIO_DECODER_STREAM_LOCK()</h3> 678<pre class="programlisting">#define GST_AUDIO_DECODER_STREAM_LOCK(dec) g_rec_mutex_lock (&GST_AUDIO_DECODER (dec)->stream_lock) 679</pre> 680</div> 681<hr> 682<div class="refsect2"> 683<a name="GST-AUDIO-DECODER-STREAM-UNLOCK:CAPS"></a><h3>GST_AUDIO_DECODER_STREAM_UNLOCK()</h3> 684<pre class="programlisting">#define GST_AUDIO_DECODER_STREAM_UNLOCK(dec) g_rec_mutex_unlock (&GST_AUDIO_DECODER (dec)->stream_lock) 685</pre> 686</div> 687<hr> 688<div class="refsect2"> 689<a name="gst-audio-decoder-finish-frame"></a><h3>gst_audio_decoder_finish_frame ()</h3> 690<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 691gst_audio_decoder_finish_frame (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 692 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *buf</code></em>, 693 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> frames</code></em>);</pre> 694<p>Collects decoded data and pushes it downstream.</p> 695<p><em class="parameter"><code>buf</code></em> 696 may be NULL in which case the indicated number of frames 697are discarded and considered to have produced no output 698(e.g. lead-in or setup frames). 699Otherwise, source pad caps must be set when it is called with valid 700data in <em class="parameter"><code>buf</code></em> 701.</p> 702<p>Note that a frame received in <a class="link" href="GstAudioDecoder.html#GstAudioDecoderClass.handle-frame"><code class="function">GstAudioDecoderClass.handle_frame()</code></a> may be 703invalidated by a call to this function.</p> 704<div class="refsect3"> 705<a name="gst-audio-decoder-finish-frame.parameters"></a><h4>Parameters</h4> 706<div class="informaltable"><table class="informaltable" width="100%" border="0"> 707<colgroup> 708<col width="150px" class="parameters_name"> 709<col class="parameters_description"> 710<col width="200px" class="parameters_annotations"> 711</colgroup> 712<tbody> 713<tr> 714<td class="parameter_name"><p>dec</p></td> 715<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 716<td class="parameter_annotations"> </td> 717</tr> 718<tr> 719<td class="parameter_name"><p>buf</p></td> 720<td class="parameter_description"><p>decoded data</p></td> 721<td class="parameter_annotations"> </td> 722</tr> 723<tr> 724<td class="parameter_name"><p>frames</p></td> 725<td class="parameter_description"><p>number of decoded frames represented by decoded data</p></td> 726<td class="parameter_annotations"> </td> 727</tr> 728</tbody> 729</table></div> 730</div> 731<div class="refsect3"> 732<a name="gst-audio-decoder-finish-frame.returns"></a><h4>Returns</h4> 733<p> a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a> that should be escalated to caller (of caller)</p> 734</div> 735</div> 736<hr> 737<div class="refsect2"> 738<a name="gst-audio-decoder-finish-subframe"></a><h3>gst_audio_decoder_finish_subframe ()</h3> 739<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 740gst_audio_decoder_finish_subframe (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 741 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffer</span></a> *buf</code></em>);</pre> 742<p>Collects decoded data and pushes it downstream. This function may be called 743multiple times for a given input frame.</p> 744<p><em class="parameter"><code>buf</code></em> 745 may be NULL in which case it is assumed that the current input frame is 746finished. This is equivalent to calling <a class="link" href="GstAudioDecoder.html#gst-audio-decoder-finish-subframe" title="gst_audio_decoder_finish_subframe ()"><code class="function">gst_audio_decoder_finish_subframe()</code></a> 747with a NULL buffer and frames=1 after having pushed out all decoded audio 748subframes using this function.</p> 749<p>When called with valid data in <em class="parameter"><code>buf</code></em> 750 the source pad caps must have been set 751already.</p> 752<p>Note that a frame received in <a class="link" href="GstAudioDecoder.html#GstAudioDecoderClass.handle-frame"><code class="function">GstAudioDecoderClass.handle_frame()</code></a> may be 753invalidated by a call to this function.</p> 754<div class="refsect3"> 755<a name="gst-audio-decoder-finish-subframe.parameters"></a><h4>Parameters</h4> 756<div class="informaltable"><table class="informaltable" width="100%" border="0"> 757<colgroup> 758<col width="150px" class="parameters_name"> 759<col class="parameters_description"> 760<col width="200px" class="parameters_annotations"> 761</colgroup> 762<tbody> 763<tr> 764<td class="parameter_name"><p>dec</p></td> 765<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 766<td class="parameter_annotations"> </td> 767</tr> 768<tr> 769<td class="parameter_name"><p>buf</p></td> 770<td class="parameter_description"><p>decoded data</p></td> 771<td class="parameter_annotations"> </td> 772</tr> 773</tbody> 774</table></div> 775</div> 776<div class="refsect3"> 777<a name="gst-audio-decoder-finish-subframe.returns"></a><h4>Returns</h4> 778<p> a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a> that should be escalated to caller (of caller)</p> 779</div> 780<p class="since">Since: <a class="link" href="ix03.html#api-index-1.16">1.16</a></p> 781</div> 782<hr> 783<div class="refsect2"> 784<a name="gst-audio-decoder-set-output-format"></a><h3>gst_audio_decoder_set_output_format ()</h3> 785<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 786gst_audio_decoder_set_output_format (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 787 <em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioInfo"><span class="type">GstAudioInfo</span></a> *info</code></em>);</pre> 788<p>Configure output info on the srcpad of <em class="parameter"><code>dec</code></em> 789.</p> 790<div class="refsect3"> 791<a name="gst-audio-decoder-set-output-format.parameters"></a><h4>Parameters</h4> 792<div class="informaltable"><table class="informaltable" width="100%" border="0"> 793<colgroup> 794<col width="150px" class="parameters_name"> 795<col class="parameters_description"> 796<col width="200px" class="parameters_annotations"> 797</colgroup> 798<tbody> 799<tr> 800<td class="parameter_name"><p>dec</p></td> 801<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 802<td class="parameter_annotations"> </td> 803</tr> 804<tr> 805<td class="parameter_name"><p>info</p></td> 806<td class="parameter_description"><p><a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioInfo"><span class="type">GstAudioInfo</span></a></p></td> 807<td class="parameter_annotations"> </td> 808</tr> 809</tbody> 810</table></div> 811</div> 812<div class="refsect3"> 813<a name="gst-audio-decoder-set-output-format.returns"></a><h4>Returns</h4> 814<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</p> 815</div> 816</div> 817<hr> 818<div class="refsect2"> 819<a name="gst-audio-decoder-set-output-caps"></a><h3>gst_audio_decoder_set_output_caps ()</h3> 820<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 821gst_audio_decoder_set_output_caps (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 822 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>);</pre> 823<p>Configure output caps on the srcpad of <em class="parameter"><code>dec</code></em> 824. Similar to 825<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-set-output-format" title="gst_audio_decoder_set_output_format ()"><code class="function">gst_audio_decoder_set_output_format()</code></a>, but allows subclasses to specify 826output caps that can't be expressed via <a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioInfo"><span class="type">GstAudioInfo</span></a> e.g. caps that have 827caps features.</p> 828<div class="refsect3"> 829<a name="gst-audio-decoder-set-output-caps.parameters"></a><h4>Parameters</h4> 830<div class="informaltable"><table class="informaltable" width="100%" border="0"> 831<colgroup> 832<col width="150px" class="parameters_name"> 833<col class="parameters_description"> 834<col width="200px" class="parameters_annotations"> 835</colgroup> 836<tbody> 837<tr> 838<td class="parameter_name"><p>dec</p></td> 839<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 840<td class="parameter_annotations"> </td> 841</tr> 842<tr> 843<td class="parameter_name"><p>caps</p></td> 844<td class="parameter_description"><p>(fixed) <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a>. </p></td> 845<td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td> 846</tr> 847</tbody> 848</table></div> 849</div> 850<div class="refsect3"> 851<a name="gst-audio-decoder-set-output-caps.returns"></a><h4>Returns</h4> 852<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</p> 853</div> 854<p class="since">Since: <a class="link" href="ix03.html#api-index-1.16">1.16</a></p> 855</div> 856<hr> 857<div class="refsect2"> 858<a name="gst-audio-decoder-negotiate"></a><h3>gst_audio_decoder_negotiate ()</h3> 859<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 860gst_audio_decoder_negotiate (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 861<p>Negotiate with downstream elements to currently configured <a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioInfo"><span class="type">GstAudioInfo</span></a>. 862Unmark GST_PAD_FLAG_NEED_RECONFIGURE in any case. But mark it again if 863negotiate fails.</p> 864<div class="refsect3"> 865<a name="gst-audio-decoder-negotiate.parameters"></a><h4>Parameters</h4> 866<div class="informaltable"><table class="informaltable" width="100%" border="0"> 867<colgroup> 868<col width="150px" class="parameters_name"> 869<col class="parameters_description"> 870<col width="200px" class="parameters_annotations"> 871</colgroup> 872<tbody><tr> 873<td class="parameter_name"><p>dec</p></td> 874<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 875<td class="parameter_annotations"> </td> 876</tr></tbody> 877</table></div> 878</div> 879<div class="refsect3"> 880<a name="gst-audio-decoder-negotiate.returns"></a><h4>Returns</h4> 881<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the negotiation succeeded, else <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p> 882</div> 883</div> 884<hr> 885<div class="refsect2"> 886<a name="gst-audio-decoder-allocate-output-buffer"></a><h3>gst_audio_decoder_allocate_output_buffer ()</h3> 887<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GstBuffer-struct"><span class="returnvalue">GstBuffer</span></a> * 888gst_audio_decoder_allocate_output_buffer 889 (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 890 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre> 891<p>Helper function that allocates a buffer to hold an audio frame 892for <em class="parameter"><code>dec</code></em> 893's current output format.</p> 894<div class="refsect3"> 895<a name="gst-audio-decoder-allocate-output-buffer.parameters"></a><h4>Parameters</h4> 896<div class="informaltable"><table class="informaltable" width="100%" border="0"> 897<colgroup> 898<col width="150px" class="parameters_name"> 899<col class="parameters_description"> 900<col width="200px" class="parameters_annotations"> 901</colgroup> 902<tbody> 903<tr> 904<td class="parameter_name"><p>dec</p></td> 905<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 906<td class="parameter_annotations"> </td> 907</tr> 908<tr> 909<td class="parameter_name"><p>size</p></td> 910<td class="parameter_description"><p>size of the buffer</p></td> 911<td class="parameter_annotations"> </td> 912</tr> 913</tbody> 914</table></div> 915</div> 916<div class="refsect3"> 917<a name="gst-audio-decoder-allocate-output-buffer.returns"></a><h4>Returns</h4> 918<p>allocated buffer. </p> 919<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 920</div> 921</div> 922<hr> 923<div class="refsect2"> 924<a name="gst-audio-decoder-get-allocator"></a><h3>gst_audio_decoder_get_allocator ()</h3> 925<pre class="programlisting"><span class="returnvalue">void</span> 926gst_audio_decoder_get_allocator (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 927 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocator-struct"><span class="type">GstAllocator</span></a> **allocator</code></em>, 928 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> *params</code></em>);</pre> 929<p>Lets <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> sub-classes to know the memory <em class="parameter"><code>allocator</code></em> 930 931used by the base class and its <em class="parameter"><code>params</code></em> 932.</p> 933<p>Unref the <em class="parameter"><code>allocator</code></em> 934 after use it.</p> 935<div class="refsect3"> 936<a name="gst-audio-decoder-get-allocator.parameters"></a><h4>Parameters</h4> 937<div class="informaltable"><table class="informaltable" width="100%" border="0"> 938<colgroup> 939<col width="150px" class="parameters_name"> 940<col class="parameters_description"> 941<col width="200px" class="parameters_annotations"> 942</colgroup> 943<tbody> 944<tr> 945<td class="parameter_name"><p>dec</p></td> 946<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 947<td class="parameter_annotations"> </td> 948</tr> 949<tr> 950<td class="parameter_name"><p>allocator</p></td> 951<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocator-struct"><span class="type">GstAllocator</span></a> 952used. </p></td> 953<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 954</tr> 955<tr> 956<td class="parameter_name"><p>params</p></td> 957<td class="parameter_description"><p>the 958<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a> of <em class="parameter"><code>allocator</code></em> 959. </p></td> 960<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td> 961</tr> 962</tbody> 963</table></div> 964</div> 965</div> 966<hr> 967<div class="refsect2"> 968<a name="gst-audio-decoder-get-audio-info"></a><h3>gst_audio_decoder_get_audio_info ()</h3> 969<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioInfo"><span class="returnvalue">GstAudioInfo</span></a> * 970gst_audio_decoder_get_audio_info (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 971<div class="refsect3"> 972<a name="gst-audio-decoder-get-audio-info.parameters"></a><h4>Parameters</h4> 973<div class="informaltable"><table class="informaltable" width="100%" border="0"> 974<colgroup> 975<col width="150px" class="parameters_name"> 976<col class="parameters_description"> 977<col width="200px" class="parameters_annotations"> 978</colgroup> 979<tbody><tr> 980<td class="parameter_name"><p>dec</p></td> 981<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 982<td class="parameter_annotations"> </td> 983</tr></tbody> 984</table></div> 985</div> 986<div class="refsect3"> 987<a name="gst-audio-decoder-get-audio-info.returns"></a><h4>Returns</h4> 988<p> a <a class="link" href="gst-plugins-base-libs-GstAudio.html#GstAudioInfo"><span class="type">GstAudioInfo</span></a> describing the input audio format</p> 989</div> 990</div> 991<hr> 992<div class="refsect2"> 993<a name="gst-audio-decoder-get-estimate-rate"></a><h3>gst_audio_decoder_get_estimate_rate ()</h3> 994<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 995gst_audio_decoder_get_estimate_rate (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 996<div class="refsect3"> 997<a name="gst-audio-decoder-get-estimate-rate.parameters"></a><h4>Parameters</h4> 998<div class="informaltable"><table class="informaltable" width="100%" border="0"> 999<colgroup> 1000<col width="150px" class="parameters_name"> 1001<col class="parameters_description"> 1002<col width="200px" class="parameters_annotations"> 1003</colgroup> 1004<tbody><tr> 1005<td class="parameter_name"><p>dec</p></td> 1006<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1007<td class="parameter_annotations"> </td> 1008</tr></tbody> 1009</table></div> 1010</div> 1011<div class="refsect3"> 1012<a name="gst-audio-decoder-get-estimate-rate.returns"></a><h4>Returns</h4> 1013<p> currently configured byte to time conversion setting</p> 1014</div> 1015</div> 1016<hr> 1017<div class="refsect2"> 1018<a name="gst-audio-decoder-get-delay"></a><h3>gst_audio_decoder_get_delay ()</h3> 1019<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 1020gst_audio_decoder_get_delay (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 1021<div class="refsect3"> 1022<a name="gst-audio-decoder-get-delay.parameters"></a><h4>Parameters</h4> 1023<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1024<colgroup> 1025<col width="150px" class="parameters_name"> 1026<col class="parameters_description"> 1027<col width="200px" class="parameters_annotations"> 1028</colgroup> 1029<tbody><tr> 1030<td class="parameter_name"><p>dec</p></td> 1031<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1032<td class="parameter_annotations"> </td> 1033</tr></tbody> 1034</table></div> 1035</div> 1036<div class="refsect3"> 1037<a name="gst-audio-decoder-get-delay.returns"></a><h4>Returns</h4> 1038<p> currently configured decoder delay</p> 1039</div> 1040</div> 1041<hr> 1042<div class="refsect2"> 1043<a name="gst-audio-decoder-get-drainable"></a><h3>gst_audio_decoder_get_drainable ()</h3> 1044<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 1045gst_audio_decoder_get_drainable (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 1046<p>Queries decoder drain handling.</p> 1047<div class="refsect3"> 1048<a name="gst-audio-decoder-get-drainable.parameters"></a><h4>Parameters</h4> 1049<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1050<colgroup> 1051<col width="150px" class="parameters_name"> 1052<col class="parameters_description"> 1053<col width="200px" class="parameters_annotations"> 1054</colgroup> 1055<tbody><tr> 1056<td class="parameter_name"><p>dec</p></td> 1057<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1058<td class="parameter_annotations"> </td> 1059</tr></tbody> 1060</table></div> 1061</div> 1062<div class="refsect3"> 1063<a name="gst-audio-decoder-get-drainable.returns"></a><h4>Returns</h4> 1064<p> TRUE if drainable handling is enabled.</p> 1065<p>MT safe.</p> 1066</div> 1067</div> 1068<hr> 1069<div class="refsect2"> 1070<a name="gst-audio-decoder-get-latency"></a><h3>gst_audio_decoder_get_latency ()</h3> 1071<pre class="programlisting"><span class="returnvalue">void</span> 1072gst_audio_decoder_get_latency (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1073 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *min</code></em>, 1074 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> *max</code></em>);</pre> 1075<p>Sets the variables pointed to by <em class="parameter"><code>min</code></em> 1076 and <em class="parameter"><code>max</code></em> 1077 to the currently configured 1078latency.</p> 1079<div class="refsect3"> 1080<a name="gst-audio-decoder-get-latency.parameters"></a><h4>Parameters</h4> 1081<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1082<colgroup> 1083<col width="150px" class="parameters_name"> 1084<col class="parameters_description"> 1085<col width="200px" class="parameters_annotations"> 1086</colgroup> 1087<tbody> 1088<tr> 1089<td class="parameter_name"><p>dec</p></td> 1090<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1091<td class="parameter_annotations"> </td> 1092</tr> 1093<tr> 1094<td class="parameter_name"><p>min</p></td> 1095<td class="parameter_description"><p>a pointer to storage to hold minimum latency. </p></td> 1096<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1097</tr> 1098<tr> 1099<td class="parameter_name"><p>max</p></td> 1100<td class="parameter_description"><p>a pointer to storage to hold maximum latency. </p></td> 1101<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1102</tr> 1103</tbody> 1104</table></div> 1105</div> 1106</div> 1107<hr> 1108<div class="refsect2"> 1109<a name="gst-audio-decoder-get-max-errors"></a><h3>gst_audio_decoder_get_max_errors ()</h3> 1110<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 1111gst_audio_decoder_get_max_errors (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 1112<div class="refsect3"> 1113<a name="gst-audio-decoder-get-max-errors.parameters"></a><h4>Parameters</h4> 1114<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1115<colgroup> 1116<col width="150px" class="parameters_name"> 1117<col class="parameters_description"> 1118<col width="200px" class="parameters_annotations"> 1119</colgroup> 1120<tbody><tr> 1121<td class="parameter_name"><p>dec</p></td> 1122<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1123<td class="parameter_annotations"> </td> 1124</tr></tbody> 1125</table></div> 1126</div> 1127<div class="refsect3"> 1128<a name="gst-audio-decoder-get-max-errors.returns"></a><h4>Returns</h4> 1129<p> currently configured decoder tolerated error count.</p> 1130</div> 1131</div> 1132<hr> 1133<div class="refsect2"> 1134<a name="gst-audio-decoder-get-min-latency"></a><h3>gst_audio_decoder_get_min_latency ()</h3> 1135<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a> 1136gst_audio_decoder_get_min_latency (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 1137<p>Queries decoder's latency aggregation.</p> 1138<div class="refsect3"> 1139<a name="gst-audio-decoder-get-min-latency.parameters"></a><h4>Parameters</h4> 1140<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1141<colgroup> 1142<col width="150px" class="parameters_name"> 1143<col class="parameters_description"> 1144<col width="200px" class="parameters_annotations"> 1145</colgroup> 1146<tbody><tr> 1147<td class="parameter_name"><p>dec</p></td> 1148<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1149<td class="parameter_annotations"> </td> 1150</tr></tbody> 1151</table></div> 1152</div> 1153<div class="refsect3"> 1154<a name="gst-audio-decoder-get-min-latency.returns"></a><h4>Returns</h4> 1155<p> aggregation latency.</p> 1156<p>MT safe.</p> 1157</div> 1158</div> 1159<hr> 1160<div class="refsect2"> 1161<a name="gst-audio-decoder-get-needs-format"></a><h3>gst_audio_decoder_get_needs_format ()</h3> 1162<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 1163gst_audio_decoder_get_needs_format (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 1164<p>Queries decoder required format handling.</p> 1165<div class="refsect3"> 1166<a name="gst-audio-decoder-get-needs-format.parameters"></a><h4>Parameters</h4> 1167<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1168<colgroup> 1169<col width="150px" class="parameters_name"> 1170<col class="parameters_description"> 1171<col width="200px" class="parameters_annotations"> 1172</colgroup> 1173<tbody><tr> 1174<td class="parameter_name"><p>dec</p></td> 1175<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1176<td class="parameter_annotations"> </td> 1177</tr></tbody> 1178</table></div> 1179</div> 1180<div class="refsect3"> 1181<a name="gst-audio-decoder-get-needs-format.returns"></a><h4>Returns</h4> 1182<p> TRUE if required format handling is enabled.</p> 1183<p>MT safe.</p> 1184</div> 1185</div> 1186<hr> 1187<div class="refsect2"> 1188<a name="gst-audio-decoder-get-parse-state"></a><h3>gst_audio_decoder_get_parse_state ()</h3> 1189<pre class="programlisting"><span class="returnvalue">void</span> 1190gst_audio_decoder_get_parse_state (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1191 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *sync</code></em>, 1192 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> *eos</code></em>);</pre> 1193<p>Return current parsing (sync and eos) state.</p> 1194<div class="refsect3"> 1195<a name="gst-audio-decoder-get-parse-state.parameters"></a><h4>Parameters</h4> 1196<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1197<colgroup> 1198<col width="150px" class="parameters_name"> 1199<col class="parameters_description"> 1200<col width="200px" class="parameters_annotations"> 1201</colgroup> 1202<tbody> 1203<tr> 1204<td class="parameter_name"><p>dec</p></td> 1205<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1206<td class="parameter_annotations"> </td> 1207</tr> 1208<tr> 1209<td class="parameter_name"><p>sync</p></td> 1210<td class="parameter_description"><p>a pointer to a variable to hold the current sync state. </p></td> 1211<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td> 1212</tr> 1213<tr> 1214<td class="parameter_name"><p>eos</p></td> 1215<td class="parameter_description"><p>a pointer to a variable to hold the current eos state. </p></td> 1216<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed instead of a pointer to a location."><span class="acronym">optional</span></acronym>]</span></td> 1217</tr> 1218</tbody> 1219</table></div> 1220</div> 1221</div> 1222<hr> 1223<div class="refsect2"> 1224<a name="gst-audio-decoder-get-plc"></a><h3>gst_audio_decoder_get_plc ()</h3> 1225<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 1226gst_audio_decoder_get_plc (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 1227<p>Queries decoder packet loss concealment handling.</p> 1228<div class="refsect3"> 1229<a name="gst-audio-decoder-get-plc.parameters"></a><h4>Parameters</h4> 1230<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1231<colgroup> 1232<col width="150px" class="parameters_name"> 1233<col class="parameters_description"> 1234<col width="200px" class="parameters_annotations"> 1235</colgroup> 1236<tbody><tr> 1237<td class="parameter_name"><p>dec</p></td> 1238<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1239<td class="parameter_annotations"> </td> 1240</tr></tbody> 1241</table></div> 1242</div> 1243<div class="refsect3"> 1244<a name="gst-audio-decoder-get-plc.returns"></a><h4>Returns</h4> 1245<p> TRUE if packet loss concealment is enabled.</p> 1246<p>MT safe.</p> 1247</div> 1248</div> 1249<hr> 1250<div class="refsect2"> 1251<a name="gst-audio-decoder-get-plc-aware"></a><h3>gst_audio_decoder_get_plc_aware ()</h3> 1252<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> 1253gst_audio_decoder_get_plc_aware (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 1254<div class="refsect3"> 1255<a name="gst-audio-decoder-get-plc-aware.parameters"></a><h4>Parameters</h4> 1256<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1257<colgroup> 1258<col width="150px" class="parameters_name"> 1259<col class="parameters_description"> 1260<col width="200px" class="parameters_annotations"> 1261</colgroup> 1262<tbody><tr> 1263<td class="parameter_name"><p>dec</p></td> 1264<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1265<td class="parameter_annotations"> </td> 1266</tr></tbody> 1267</table></div> 1268</div> 1269<div class="refsect3"> 1270<a name="gst-audio-decoder-get-plc-aware.returns"></a><h4>Returns</h4> 1271<p> currently configured plc handling</p> 1272</div> 1273</div> 1274<hr> 1275<div class="refsect2"> 1276<a name="gst-audio-decoder-get-tolerance"></a><h3>gst_audio_decoder_get_tolerance ()</h3> 1277<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a> 1278gst_audio_decoder_get_tolerance (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>);</pre> 1279<p>Queries current audio jitter tolerance threshold.</p> 1280<div class="refsect3"> 1281<a name="gst-audio-decoder-get-tolerance.parameters"></a><h4>Parameters</h4> 1282<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1283<colgroup> 1284<col width="150px" class="parameters_name"> 1285<col class="parameters_description"> 1286<col width="200px" class="parameters_annotations"> 1287</colgroup> 1288<tbody><tr> 1289<td class="parameter_name"><p>dec</p></td> 1290<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1291<td class="parameter_annotations"> </td> 1292</tr></tbody> 1293</table></div> 1294</div> 1295<div class="refsect3"> 1296<a name="gst-audio-decoder-get-tolerance.returns"></a><h4>Returns</h4> 1297<p> decoder audio jitter tolerance threshold.</p> 1298<p>MT safe.</p> 1299</div> 1300</div> 1301<hr> 1302<div class="refsect2"> 1303<a name="gst-audio-decoder-set-estimate-rate"></a><h3>gst_audio_decoder_set_estimate_rate ()</h3> 1304<pre class="programlisting"><span class="returnvalue">void</span> 1305gst_audio_decoder_set_estimate_rate (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1306 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre> 1307<p>Allows baseclass to perform byte to time estimated conversion.</p> 1308<div class="refsect3"> 1309<a name="gst-audio-decoder-set-estimate-rate.parameters"></a><h4>Parameters</h4> 1310<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1311<colgroup> 1312<col width="150px" class="parameters_name"> 1313<col class="parameters_description"> 1314<col width="200px" class="parameters_annotations"> 1315</colgroup> 1316<tbody> 1317<tr> 1318<td class="parameter_name"><p>dec</p></td> 1319<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1320<td class="parameter_annotations"> </td> 1321</tr> 1322<tr> 1323<td class="parameter_name"><p>enabled</p></td> 1324<td class="parameter_description"><p>whether to enable byte to time conversion</p></td> 1325<td class="parameter_annotations"> </td> 1326</tr> 1327</tbody> 1328</table></div> 1329</div> 1330</div> 1331<hr> 1332<div class="refsect2"> 1333<a name="gst-audio-decoder-set-drainable"></a><h3>gst_audio_decoder_set_drainable ()</h3> 1334<pre class="programlisting"><span class="returnvalue">void</span> 1335gst_audio_decoder_set_drainable (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1336 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre> 1337<p>Configures decoder drain handling. If drainable, subclass might 1338be handed a NULL buffer to have it return any leftover decoded data. 1339Otherwise, it is not considered so capable and will only ever be passed 1340real data.</p> 1341<p>MT safe.</p> 1342<div class="refsect3"> 1343<a name="gst-audio-decoder-set-drainable.parameters"></a><h4>Parameters</h4> 1344<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1345<colgroup> 1346<col width="150px" class="parameters_name"> 1347<col class="parameters_description"> 1348<col width="200px" class="parameters_annotations"> 1349</colgroup> 1350<tbody> 1351<tr> 1352<td class="parameter_name"><p>dec</p></td> 1353<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1354<td class="parameter_annotations"> </td> 1355</tr> 1356<tr> 1357<td class="parameter_name"><p>enabled</p></td> 1358<td class="parameter_description"><p>new state</p></td> 1359<td class="parameter_annotations"> </td> 1360</tr> 1361</tbody> 1362</table></div> 1363</div> 1364</div> 1365<hr> 1366<div class="refsect2"> 1367<a name="gst-audio-decoder-set-latency"></a><h3>gst_audio_decoder_set_latency ()</h3> 1368<pre class="programlisting"><span class="returnvalue">void</span> 1369gst_audio_decoder_set_latency (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1370 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> min</code></em>, 1371 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> max</code></em>);</pre> 1372<p>Sets decoder latency.</p> 1373<div class="refsect3"> 1374<a name="gst-audio-decoder-set-latency.parameters"></a><h4>Parameters</h4> 1375<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1376<colgroup> 1377<col width="150px" class="parameters_name"> 1378<col class="parameters_description"> 1379<col width="200px" class="parameters_annotations"> 1380</colgroup> 1381<tbody> 1382<tr> 1383<td class="parameter_name"><p>dec</p></td> 1384<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1385<td class="parameter_annotations"> </td> 1386</tr> 1387<tr> 1388<td class="parameter_name"><p>min</p></td> 1389<td class="parameter_description"><p>minimum latency</p></td> 1390<td class="parameter_annotations"> </td> 1391</tr> 1392<tr> 1393<td class="parameter_name"><p>max</p></td> 1394<td class="parameter_description"><p>maximum latency</p></td> 1395<td class="parameter_annotations"> </td> 1396</tr> 1397</tbody> 1398</table></div> 1399</div> 1400</div> 1401<hr> 1402<div class="refsect2"> 1403<a name="gst-audio-decoder-set-max-errors"></a><h3>gst_audio_decoder_set_max_errors ()</h3> 1404<pre class="programlisting"><span class="returnvalue">void</span> 1405gst_audio_decoder_set_max_errors (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1406 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> num</code></em>);</pre> 1407<p>Sets numbers of tolerated decoder errors, where a tolerated one is then only 1408warned about, but more than tolerated will lead to fatal error. You can set 1409-1 for never returning fatal errors. Default is set to 1410GST_AUDIO_DECODER_MAX_ERRORS.</p> 1411<div class="refsect3"> 1412<a name="gst-audio-decoder-set-max-errors.parameters"></a><h4>Parameters</h4> 1413<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1414<colgroup> 1415<col width="150px" class="parameters_name"> 1416<col class="parameters_description"> 1417<col width="200px" class="parameters_annotations"> 1418</colgroup> 1419<tbody> 1420<tr> 1421<td class="parameter_name"><p>dec</p></td> 1422<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1423<td class="parameter_annotations"> </td> 1424</tr> 1425<tr> 1426<td class="parameter_name"><p>num</p></td> 1427<td class="parameter_description"><p>max tolerated errors</p></td> 1428<td class="parameter_annotations"> </td> 1429</tr> 1430</tbody> 1431</table></div> 1432</div> 1433</div> 1434<hr> 1435<div class="refsect2"> 1436<a name="gst-audio-decoder-set-min-latency"></a><h3>gst_audio_decoder_set_min_latency ()</h3> 1437<pre class="programlisting"><span class="returnvalue">void</span> 1438gst_audio_decoder_set_min_latency (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1439 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> num</code></em>);</pre> 1440<p>Sets decoder minimum aggregation latency.</p> 1441<p>MT safe.</p> 1442<div class="refsect3"> 1443<a name="gst-audio-decoder-set-min-latency.parameters"></a><h4>Parameters</h4> 1444<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1445<colgroup> 1446<col width="150px" class="parameters_name"> 1447<col class="parameters_description"> 1448<col width="200px" class="parameters_annotations"> 1449</colgroup> 1450<tbody> 1451<tr> 1452<td class="parameter_name"><p>dec</p></td> 1453<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1454<td class="parameter_annotations"> </td> 1455</tr> 1456<tr> 1457<td class="parameter_name"><p>num</p></td> 1458<td class="parameter_description"><p>new minimum latency</p></td> 1459<td class="parameter_annotations"> </td> 1460</tr> 1461</tbody> 1462</table></div> 1463</div> 1464</div> 1465<hr> 1466<div class="refsect2"> 1467<a name="gst-audio-decoder-set-needs-format"></a><h3>gst_audio_decoder_set_needs_format ()</h3> 1468<pre class="programlisting"><span class="returnvalue">void</span> 1469gst_audio_decoder_set_needs_format (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1470 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre> 1471<p>Configures decoder format needs. If enabled, subclass needs to be 1472negotiated with format caps before it can process any data. It will then 1473never be handed any data before it has been configured. 1474Otherwise, it might be handed data without having been configured and 1475is then expected being able to do so either by default 1476or based on the input data.</p> 1477<p>MT safe.</p> 1478<div class="refsect3"> 1479<a name="gst-audio-decoder-set-needs-format.parameters"></a><h4>Parameters</h4> 1480<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1481<colgroup> 1482<col width="150px" class="parameters_name"> 1483<col class="parameters_description"> 1484<col width="200px" class="parameters_annotations"> 1485</colgroup> 1486<tbody> 1487<tr> 1488<td class="parameter_name"><p>dec</p></td> 1489<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1490<td class="parameter_annotations"> </td> 1491</tr> 1492<tr> 1493<td class="parameter_name"><p>enabled</p></td> 1494<td class="parameter_description"><p>new state</p></td> 1495<td class="parameter_annotations"> </td> 1496</tr> 1497</tbody> 1498</table></div> 1499</div> 1500</div> 1501<hr> 1502<div class="refsect2"> 1503<a name="gst-audio-decoder-set-plc"></a><h3>gst_audio_decoder_set_plc ()</h3> 1504<pre class="programlisting"><span class="returnvalue">void</span> 1505gst_audio_decoder_set_plc (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1506 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> enabled</code></em>);</pre> 1507<p>Enable or disable decoder packet loss concealment, provided subclass 1508and codec are capable and allow handling plc.</p> 1509<p>MT safe.</p> 1510<div class="refsect3"> 1511<a name="gst-audio-decoder-set-plc.parameters"></a><h4>Parameters</h4> 1512<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1513<colgroup> 1514<col width="150px" class="parameters_name"> 1515<col class="parameters_description"> 1516<col width="200px" class="parameters_annotations"> 1517</colgroup> 1518<tbody> 1519<tr> 1520<td class="parameter_name"><p>dec</p></td> 1521<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1522<td class="parameter_annotations"> </td> 1523</tr> 1524<tr> 1525<td class="parameter_name"><p>enabled</p></td> 1526<td class="parameter_description"><p>new state</p></td> 1527<td class="parameter_annotations"> </td> 1528</tr> 1529</tbody> 1530</table></div> 1531</div> 1532</div> 1533<hr> 1534<div class="refsect2"> 1535<a name="gst-audio-decoder-set-plc-aware"></a><h3>gst_audio_decoder_set_plc_aware ()</h3> 1536<pre class="programlisting"><span class="returnvalue">void</span> 1537gst_audio_decoder_set_plc_aware (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1538 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> plc</code></em>);</pre> 1539<p>Indicates whether or not subclass handles packet loss concealment (plc).</p> 1540<div class="refsect3"> 1541<a name="gst-audio-decoder-set-plc-aware.parameters"></a><h4>Parameters</h4> 1542<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1543<colgroup> 1544<col width="150px" class="parameters_name"> 1545<col class="parameters_description"> 1546<col width="200px" class="parameters_annotations"> 1547</colgroup> 1548<tbody> 1549<tr> 1550<td class="parameter_name"><p>dec</p></td> 1551<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1552<td class="parameter_annotations"> </td> 1553</tr> 1554<tr> 1555<td class="parameter_name"><p>plc</p></td> 1556<td class="parameter_description"><p>new plc state</p></td> 1557<td class="parameter_annotations"> </td> 1558</tr> 1559</tbody> 1560</table></div> 1561</div> 1562</div> 1563<hr> 1564<div class="refsect2"> 1565<a name="gst-audio-decoder-set-tolerance"></a><h3>gst_audio_decoder_set_tolerance ()</h3> 1566<pre class="programlisting"><span class="returnvalue">void</span> 1567gst_audio_decoder_set_tolerance (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1568 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> tolerance</code></em>);</pre> 1569<p>Configures decoder audio jitter tolerance threshold.</p> 1570<p>MT safe.</p> 1571<div class="refsect3"> 1572<a name="gst-audio-decoder-set-tolerance.parameters"></a><h4>Parameters</h4> 1573<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1574<colgroup> 1575<col width="150px" class="parameters_name"> 1576<col class="parameters_description"> 1577<col width="200px" class="parameters_annotations"> 1578</colgroup> 1579<tbody> 1580<tr> 1581<td class="parameter_name"><p>dec</p></td> 1582<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1583<td class="parameter_annotations"> </td> 1584</tr> 1585<tr> 1586<td class="parameter_name"><p>tolerance</p></td> 1587<td class="parameter_description"><p>new tolerance</p></td> 1588<td class="parameter_annotations"> </td> 1589</tr> 1590</tbody> 1591</table></div> 1592</div> 1593</div> 1594<hr> 1595<div class="refsect2"> 1596<a name="gst-audio-decoder-set-allocation-caps"></a><h3>gst_audio_decoder_set_allocation_caps ()</h3> 1597<pre class="programlisting"><span class="returnvalue">void</span> 1598gst_audio_decoder_set_allocation_caps (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1599 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *allocation_caps</code></em>);</pre> 1600<p>Sets a caps in allocation query which are different from the set 1601pad's caps. Use this function before calling 1602<a class="link" href="GstAudioDecoder.html#gst-audio-decoder-negotiate" title="gst_audio_decoder_negotiate ()"><code class="function">gst_audio_decoder_negotiate()</code></a>. Setting to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> the allocation 1603query will use the caps from the pad.</p> 1604<div class="refsect3"> 1605<a name="gst-audio-decoder-set-allocation-caps.parameters"></a><h4>Parameters</h4> 1606<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1607<colgroup> 1608<col width="150px" class="parameters_name"> 1609<col class="parameters_description"> 1610<col width="200px" class="parameters_annotations"> 1611</colgroup> 1612<tbody> 1613<tr> 1614<td class="parameter_name"><p>dec</p></td> 1615<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1616<td class="parameter_annotations"> </td> 1617</tr> 1618<tr> 1619<td class="parameter_name"><p>allocation_caps</p></td> 1620<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td> 1621<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1622</tr> 1623</tbody> 1624</table></div> 1625</div> 1626<p class="since">Since: <a class="link" href="ix06.html#api-index-1.10">1.10</a></p> 1627</div> 1628<hr> 1629<div class="refsect2"> 1630<a name="gst-audio-decoder-set-use-default-pad-acceptcaps"></a><h3>gst_audio_decoder_set_use_default_pad_acceptcaps ()</h3> 1631<pre class="programlisting"><span class="returnvalue">void</span> 1632gst_audio_decoder_set_use_default_pad_acceptcaps 1633 (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *decoder</code></em>, 1634 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use</code></em>);</pre> 1635<p>Lets <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> sub-classes decide if they want the sink pad 1636to use the default pad query handler to reply to accept-caps queries.</p> 1637<p>By setting this to true it is possible to further customize the default 1638handler with <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GST-PAD-SET-ACCEPT-INTERSECT:CAPS"><code class="literal">GST_PAD_SET_ACCEPT_INTERSECT</code></a> and 1639<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GST-PAD-SET-ACCEPT-TEMPLATE:CAPS"><code class="literal">GST_PAD_SET_ACCEPT_TEMPLATE</code></a></p> 1640<div class="refsect3"> 1641<a name="gst-audio-decoder-set-use-default-pad-acceptcaps.parameters"></a><h4>Parameters</h4> 1642<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1643<colgroup> 1644<col width="150px" class="parameters_name"> 1645<col class="parameters_description"> 1646<col width="200px" class="parameters_annotations"> 1647</colgroup> 1648<tbody> 1649<tr> 1650<td class="parameter_name"><p>decoder</p></td> 1651<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1652<td class="parameter_annotations"> </td> 1653</tr> 1654<tr> 1655<td class="parameter_name"><p>use</p></td> 1656<td class="parameter_description"><p>if the default pad accept-caps query handling should be used</p></td> 1657<td class="parameter_annotations"> </td> 1658</tr> 1659</tbody> 1660</table></div> 1661</div> 1662<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p> 1663</div> 1664<hr> 1665<div class="refsect2"> 1666<a name="gst-audio-decoder-merge-tags"></a><h3>gst_audio_decoder_merge_tags ()</h3> 1667<pre class="programlisting"><span class="returnvalue">void</span> 1668gst_audio_decoder_merge_tags (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *dec</code></em>, 1669 <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a> *tags</code></em>, 1670 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagMergeMode"><span class="type">GstTagMergeMode</span></a> mode</code></em>);</pre> 1671<p>Sets the audio decoder tags and how they should be merged with any 1672upstream stream tags. This will override any tags previously-set 1673with <a class="link" href="GstAudioDecoder.html#gst-audio-decoder-merge-tags" title="gst_audio_decoder_merge_tags ()"><code class="function">gst_audio_decoder_merge_tags()</code></a>.</p> 1674<p>Note that this is provided for convenience, and the subclass is 1675not required to use this and can still do tag handling on its own.</p> 1676<div class="refsect3"> 1677<a name="gst-audio-decoder-merge-tags.parameters"></a><h4>Parameters</h4> 1678<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1679<colgroup> 1680<col width="150px" class="parameters_name"> 1681<col class="parameters_description"> 1682<col width="200px" class="parameters_annotations"> 1683</colgroup> 1684<tbody> 1685<tr> 1686<td class="parameter_name"><p>dec</p></td> 1687<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1688<td class="parameter_annotations"> </td> 1689</tr> 1690<tr> 1691<td class="parameter_name"><p>tags</p></td> 1692<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagList-struct"><span class="type">GstTagList</span></a> to merge, or NULL. </p></td> 1693<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1694</tr> 1695<tr> 1696<td class="parameter_name"><p>mode</p></td> 1697<td class="parameter_description"><p>the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GstTagMergeMode"><span class="type">GstTagMergeMode</span></a> to use, usually <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstTagList.html#GST-TAG-MERGE-REPLACE:CAPS"><span class="type">GST_TAG_MERGE_REPLACE</span></a></p></td> 1698<td class="parameter_annotations"> </td> 1699</tr> 1700</tbody> 1701</table></div> 1702</div> 1703</div> 1704<hr> 1705<div class="refsect2"> 1706<a name="gst-audio-decoder-proxy-getcaps"></a><h3>gst_audio_decoder_proxy_getcaps ()</h3> 1707<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="returnvalue">GstCaps</span></a> * 1708gst_audio_decoder_proxy_getcaps (<em class="parameter"><code><a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> *decoder</code></em>, 1709 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *caps</code></em>, 1710 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *filter</code></em>);</pre> 1711<p>Returns caps that express <em class="parameter"><code>caps</code></em> 1712 (or sink template caps if <em class="parameter"><code>caps</code></em> 1713 == NULL) 1714restricted to rate/channels/... combinations supported by downstream 1715elements.</p> 1716<div class="refsect3"> 1717<a name="gst-audio-decoder-proxy-getcaps.parameters"></a><h4>Parameters</h4> 1718<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1719<colgroup> 1720<col width="150px" class="parameters_name"> 1721<col class="parameters_description"> 1722<col width="200px" class="parameters_annotations"> 1723</colgroup> 1724<tbody> 1725<tr> 1726<td class="parameter_name"><p>decoder</p></td> 1727<td class="parameter_description"><p>a <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a></p></td> 1728<td class="parameter_annotations"> </td> 1729</tr> 1730<tr> 1731<td class="parameter_name"><p>caps</p></td> 1732<td class="parameter_description"><p>initial caps. </p></td> 1733<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1734</tr> 1735<tr> 1736<td class="parameter_name"><p>filter</p></td> 1737<td class="parameter_description"><p>filter caps. </p></td> 1738<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td> 1739</tr> 1740</tbody> 1741</table></div> 1742</div> 1743<div class="refsect3"> 1744<a name="gst-audio-decoder-proxy-getcaps.returns"></a><h4>Returns</h4> 1745<p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> owned by caller. </p> 1746<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 1747</div> 1748<p class="since">Since: <a class="link" href="ix10.html#api-index-1.6">1.6</a></p> 1749</div> 1750</div> 1751<div class="refsect1"> 1752<a name="GstAudioDecoder.other_details"></a><h2>Types and Values</h2> 1753<div class="refsect2"> 1754<a name="GstAudioDecoder-struct"></a><h3>struct GstAudioDecoder</h3> 1755<pre class="programlisting">struct GstAudioDecoder;</pre> 1756<p>The opaque <a class="link" href="GstAudioDecoder.html" title="GstAudioDecoder"><span class="type">GstAudioDecoder</span></a> data structure.</p> 1757</div> 1758<hr> 1759<div class="refsect2"> 1760<a name="GstAudioDecoderClass"></a><h3>struct GstAudioDecoderClass</h3> 1761<pre class="programlisting">struct GstAudioDecoderClass { 1762 GstElementClass element_class; 1763 1764 /* virtual methods for subclasses */ 1765 1766 gboolean (*start) (GstAudioDecoder *dec); 1767 1768 gboolean (*stop) (GstAudioDecoder *dec); 1769 1770 gboolean (*set_format) (GstAudioDecoder *dec, 1771 GstCaps *caps); 1772 1773 GstFlowReturn (*parse) (GstAudioDecoder *dec, 1774 GstAdapter *adapter, 1775 gint *offset, gint *length); 1776 1777 GstFlowReturn (*handle_frame) (GstAudioDecoder *dec, 1778 GstBuffer *buffer); 1779 1780 void (*flush) (GstAudioDecoder *dec, gboolean hard); 1781 1782 GstFlowReturn (*pre_push) (GstAudioDecoder *dec, 1783 GstBuffer **buffer); 1784 1785 gboolean (*sink_event) (GstAudioDecoder *dec, 1786 GstEvent *event); 1787 gboolean (*src_event) (GstAudioDecoder *dec, 1788 GstEvent *event); 1789 1790 gboolean (*open) (GstAudioDecoder *dec); 1791 1792 gboolean (*close) (GstAudioDecoder *dec); 1793 1794 gboolean (*negotiate) (GstAudioDecoder *dec); 1795 1796 gboolean (*decide_allocation) (GstAudioDecoder *dec, GstQuery *query); 1797 1798 gboolean (*propose_allocation) (GstAudioDecoder *dec, 1799 GstQuery * query); 1800 1801 gboolean (*sink_query) (GstAudioDecoder *dec, GstQuery *query); 1802 1803 gboolean (*src_query) (GstAudioDecoder *dec, GstQuery *query); 1804 1805 GstCaps * (*getcaps) (GstAudioDecoder * dec, 1806 GstCaps * filter); 1807 1808 gboolean (*transform_meta) (GstAudioDecoder *enc, GstBuffer *outbuf, 1809 GstMeta *meta, GstBuffer *inbuf); 1810}; 1811</pre> 1812<p>Subclasses can override any of the available virtual methods or not, as 1813needed. At minimum <em class="parameter"><code>handle_frame</code></em> 1814 (and likely <em class="parameter"><code>set_format</code></em> 1815) needs to be 1816overridden.</p> 1817<div class="refsect3"> 1818<a name="GstAudioDecoderClass.members"></a><h4>Members</h4> 1819<div class="informaltable"><table class="informaltable" width="100%" border="0"> 1820<colgroup> 1821<col width="300px" class="struct_members_name"> 1822<col class="struct_members_description"> 1823<col width="200px" class="struct_members_annotations"> 1824</colgroup> 1825<tbody> 1826<tr> 1827<td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElementClass"><span class="type">GstElementClass</span></a> <em class="structfield"><code><a name="GstAudioDecoderClass.element-class"></a>element_class</code></em>;</p></td> 1828<td class="struct_member_description"><p>The parent class structure</p></td> 1829<td class="struct_member_annotations"> </td> 1830</tr> 1831<tr> 1832<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.start"></a>start</code></em> ()</p></td> 1833<td class="struct_member_description"><p>Optional. 1834Called when the element starts processing. 1835Allows opening external resources.</p></td> 1836<td class="struct_member_annotations"> </td> 1837</tr> 1838<tr> 1839<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.stop"></a>stop</code></em> ()</p></td> 1840<td class="struct_member_description"><p>Optional. 1841Called when the element stops processing. 1842Allows closing external resources.</p></td> 1843<td class="struct_member_annotations"> </td> 1844</tr> 1845<tr> 1846<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.set-format"></a>set_format</code></em> ()</p></td> 1847<td class="struct_member_description"><p>Notifies subclass of incoming data format (caps).</p></td> 1848<td class="struct_member_annotations"> </td> 1849</tr> 1850<tr> 1851<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.parse"></a>parse</code></em> ()</p></td> 1852<td class="struct_member_description"><p>Optional. 1853Allows chopping incoming data into manageable units (frames) 1854for subsequent decoding. This division is at subclass 1855discretion and may or may not correspond to 1 (or more) 1856frames as defined by audio format.</p></td> 1857<td class="struct_member_annotations"> </td> 1858</tr> 1859<tr> 1860<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.handle-frame"></a>handle_frame</code></em> ()</p></td> 1861<td class="struct_member_description"><p>Provides input data (or NULL to clear any remaining data) 1862to subclass. Input data ref management is performed by 1863base class, subclass should not care or intervene, 1864and input data is only valid until next call to base class, 1865most notably a call to <a class="link" href="GstAudioDecoder.html#gst-audio-decoder-finish-frame" title="gst_audio_decoder_finish_frame ()"><code class="function">gst_audio_decoder_finish_frame()</code></a>.</p></td> 1866<td class="struct_member_annotations"> </td> 1867</tr> 1868<tr> 1869<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.flush"></a>flush</code></em> ()</p></td> 1870<td class="struct_member_description"><p>Optional. 1871Instructs subclass to clear any codec caches and discard 1872any pending samples and not yet returned decoded data. 1873<em class="parameter"><code>hard</code></em> 1874indicates whether a FLUSH is being processed, 1875or otherwise a DISCONT (or conceptually similar).</p></td> 1876<td class="struct_member_annotations"> </td> 1877</tr> 1878<tr> 1879<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.pre-push"></a>pre_push</code></em> ()</p></td> 1880<td class="struct_member_description"><p>Optional. 1881Called just prior to pushing (encoded data) buffer downstream. 1882Subclass has full discretionary access to buffer, 1883and a not OK flow return will abort downstream pushing.</p></td> 1884<td class="struct_member_annotations"> </td> 1885</tr> 1886<tr> 1887<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.sink-event"></a>sink_event</code></em> ()</p></td> 1888<td class="struct_member_description"><p>Optional. 1889Event handler on the sink pad. Subclasses should chain up to 1890the parent implementation to invoke the default handler.</p></td> 1891<td class="struct_member_annotations"> </td> 1892</tr> 1893<tr> 1894<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.src-event"></a>src_event</code></em> ()</p></td> 1895<td class="struct_member_description"><p>Optional. 1896Event handler on the src pad. Subclasses should chain up to 1897the parent implementation to invoke the default handler.</p></td> 1898<td class="struct_member_annotations"> </td> 1899</tr> 1900<tr> 1901<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.open"></a>open</code></em> ()</p></td> 1902<td class="struct_member_description"><p>Optional. 1903Called when the element changes to GST_STATE_READY. 1904Allows opening external resources.</p></td> 1905<td class="struct_member_annotations"> </td> 1906</tr> 1907<tr> 1908<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.close"></a>close</code></em> ()</p></td> 1909<td class="struct_member_description"><p>Optional. 1910Called when the element changes to GST_STATE_NULL. 1911Allows closing external resources.</p></td> 1912<td class="struct_member_annotations"> </td> 1913</tr> 1914<tr> 1915<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.negotiate"></a>negotiate</code></em> ()</p></td> 1916<td class="struct_member_description"><p>Optional. 1917Negotiate with downstream and configure buffer pools, etc. 1918Subclasses should chain up to the parent implementation to 1919invoke the default handler.</p></td> 1920<td class="struct_member_annotations"> </td> 1921</tr> 1922<tr> 1923<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.decide-allocation"></a>decide_allocation</code></em> ()</p></td> 1924<td class="struct_member_description"><p>Optional. 1925Setup the allocation parameters for allocating output 1926buffers. The passed in query contains the result of the 1927downstream allocation query. 1928Subclasses should chain up to the parent implementation to 1929invoke the default handler.</p></td> 1930<td class="struct_member_annotations"> </td> 1931</tr> 1932<tr> 1933<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.propose-allocation"></a>propose_allocation</code></em> ()</p></td> 1934<td class="struct_member_description"><p>Optional. 1935Propose buffer allocation parameters for upstream elements. 1936Subclasses should chain up to the parent implementation to 1937invoke the default handler.</p></td> 1938<td class="struct_member_annotations"> </td> 1939</tr> 1940<tr> 1941<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.sink-query"></a>sink_query</code></em> ()</p></td> 1942<td class="struct_member_description"><p>Optional. 1943Query handler on the sink pad. This function should 1944return TRUE if the query could be performed. Subclasses 1945should chain up to the parent implementation to invoke the 1946default handler. Since: 1.6</p></td> 1947<td class="struct_member_annotations"> </td> 1948</tr> 1949<tr> 1950<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.src-query"></a>src_query</code></em> ()</p></td> 1951<td class="struct_member_description"><p>Optional. 1952Query handler on the source pad. This function should 1953return TRUE if the query could be performed. Subclasses 1954should chain up to the parent implementation to invoke the 1955default handler. Since: 1.6</p></td> 1956<td class="struct_member_annotations"> </td> 1957</tr> 1958<tr> 1959<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.getcaps"></a>getcaps</code></em> ()</p></td> 1960<td class="struct_member_description"><p>Optional. 1961Allows for a custom sink getcaps implementation. 1962If not implemented, 1963default returns gst_audio_decoder_proxy_getcaps 1964applied to sink template caps.</p></td> 1965<td class="struct_member_annotations"> </td> 1966</tr> 1967<tr> 1968<td class="struct_member_name"><p><em class="structfield"><code><a name="GstAudioDecoderClass.transform-meta"></a>transform_meta</code></em> ()</p></td> 1969<td class="struct_member_description"><p>Optional. Transform the metadata on the input buffer to the 1970output buffer. By default this method copies all meta without 1971tags and meta with only the "audio" tag. subclasses can 1972implement this method and return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the metadata is to be 1973copied. Since: 1.6</p></td> 1974<td class="struct_member_annotations"> </td> 1975</tr> 1976</tbody> 1977</table></div> 1978</div> 1979</div> 1980<hr> 1981<div class="refsect2"> 1982<a name="GST-AUDIO-DECODER-SINK-NAME:CAPS"></a><h3>GST_AUDIO_DECODER_SINK_NAME</h3> 1983<pre class="programlisting">#define GST_AUDIO_DECODER_SINK_NAME "sink" 1984</pre> 1985<p>The name of the templates for the sink pad.</p> 1986</div> 1987<hr> 1988<div class="refsect2"> 1989<a name="GST-AUDIO-DECODER-SRC-NAME:CAPS"></a><h3>GST_AUDIO_DECODER_SRC_NAME</h3> 1990<pre class="programlisting">#define GST_AUDIO_DECODER_SRC_NAME "src" 1991</pre> 1992<p>The name of the templates for the source pad.</p> 1993</div> 1994<hr> 1995<div class="refsect2"> 1996<a name="GST-AUDIO-DECODER-MAX-ERRORS:CAPS"></a><h3>GST_AUDIO_DECODER_MAX_ERRORS</h3> 1997<pre class="programlisting">#define GST_AUDIO_DECODER_MAX_ERRORS 10 1998</pre> 1999<p>Default maximum number of errors tolerated before signaling error.</p> 2000</div> 2001</div> 2002<div class="refsect1"> 2003<a name="GstAudioDecoder.property-details"></a><h2>Property Details</h2> 2004<div class="refsect2"> 2005<a name="GstAudioDecoder--min-latency"></a><h3>The <code class="literal">“min-latency”</code> property</h3> 2006<pre class="programlisting"> “min-latency” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a></pre> 2007<p>Aggregate output data to a minimum of latency time (ns).</p> 2008<p>Flags: Read / Write</p> 2009<p>Allowed values: >= 0</p> 2010<p>Default value: 0</p> 2011</div> 2012<hr> 2013<div class="refsect2"> 2014<a name="GstAudioDecoder--plc"></a><h3>The <code class="literal">“plc”</code> property</h3> 2015<pre class="programlisting"> “plc” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 2016<p>Perform packet loss concealment (if supported).</p> 2017<p>Flags: Read / Write</p> 2018<p>Default value: FALSE</p> 2019</div> 2020<hr> 2021<div class="refsect2"> 2022<a name="GstAudioDecoder--tolerance"></a><h3>The <code class="literal">“tolerance”</code> property</h3> 2023<pre class="programlisting"> “tolerance” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a></pre> 2024<p>Perfect ts while timestamp jitter/imperfection within tolerance (ns).</p> 2025<p>Flags: Read / Write</p> 2026<p>Allowed values: >= 0</p> 2027<p>Default value: 0</p> 2028</div> 2029</div> 2030<div class="refsect1"> 2031<a name="GstAudioDecoder.see-also"></a><h2>See Also</h2> 2032<p><a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstBaseTransform.html#GstBaseTransform-struct"><span class="type">GstBaseTransform</span></a></p> 2033</div> 2034</div> 2035<div class="footer"> 2036<hr>Generated by GTK-Doc V1.28</div> 2037</body> 2038</html>