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