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>GstRTPBaseAudioPayload: 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-rtp.html" title="RTP Library"> 9<link rel="prev" href="gst-plugins-base-libs-GstMeta-for-RTP.html" title="GstMeta for RTP"> 10<link rel="next" href="GstRTPBaseDepayload.html" title="GstRTPBaseDepayload"> 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="#GstRTPBaseAudioPayload.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 19 <a href="#GstRTPBaseAudioPayload.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span> 20 <a href="#GstRTPBaseAudioPayload.properties" class="shortcut">Properties</a></span> 21</td> 22<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> 23<td><a accesskey="u" href="gstreamer-rtp.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> 24<td><a accesskey="p" href="gst-plugins-base-libs-GstMeta-for-RTP.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> 25<td><a accesskey="n" href="GstRTPBaseDepayload.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> 26</tr></table> 27<div class="refentry"> 28<a name="GstRTPBaseAudioPayload"></a><div class="titlepage"></div> 29<div class="refnamediv"><table width="100%"><tr> 30<td valign="top"> 31<h2><span class="refentrytitle"><a name="GstRTPBaseAudioPayload.top_of_page"></a>GstRTPBaseAudioPayload</span></h2> 32<p>GstRTPBaseAudioPayload — Base class for audio RTP payloader</p> 33</td> 34<td class="gallery_image" valign="top" align="right"></td> 35</tr></table></div> 36<div class="refsect1"> 37<a name="GstRTPBaseAudioPayload.functions"></a><h2>Functions</h2> 38<div class="informaltable"><table class="informaltable" width="100%" border="0"> 39<colgroup> 40<col width="150px" class="functions_return"> 41<col class="functions_name"> 42</colgroup> 43<tbody> 44<tr> 45<td class="function_type"> 46<span class="returnvalue">void</span> 47</td> 48<td class="function_name"> 49<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-frame-based" title="gst_rtp_base_audio_payload_set_frame_based ()">gst_rtp_base_audio_payload_set_frame_based</a> <span class="c_punctuation">()</span> 50</td> 51</tr> 52<tr> 53<td class="function_type"> 54<span class="returnvalue">void</span> 55</td> 56<td class="function_name"> 57<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-frame-options" title="gst_rtp_base_audio_payload_set_frame_options ()">gst_rtp_base_audio_payload_set_frame_options</a> <span class="c_punctuation">()</span> 58</td> 59</tr> 60<tr> 61<td class="function_type"> 62<span class="returnvalue">void</span> 63</td> 64<td class="function_name"> 65<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-sample-based" title="gst_rtp_base_audio_payload_set_sample_based ()">gst_rtp_base_audio_payload_set_sample_based</a> <span class="c_punctuation">()</span> 66</td> 67</tr> 68<tr> 69<td class="function_type"> 70<span class="returnvalue">void</span> 71</td> 72<td class="function_name"> 73<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-sample-options" title="gst_rtp_base_audio_payload_set_sample_options ()">gst_rtp_base_audio_payload_set_sample_options</a> <span class="c_punctuation">()</span> 74</td> 75</tr> 76<tr> 77<td class="function_type"> 78<a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstAdapter.html#GstAdapter-struct"><span class="returnvalue">GstAdapter</span></a> * 79</td> 80<td class="function_name"> 81<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-get-adapter" title="gst_rtp_base_audio_payload_get_adapter ()">gst_rtp_base_audio_payload_get_adapter</a> <span class="c_punctuation">()</span> 82</td> 83</tr> 84<tr> 85<td class="function_type"> 86<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 87</td> 88<td class="function_name"> 89<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-push" title="gst_rtp_base_audio_payload_push ()">gst_rtp_base_audio_payload_push</a> <span class="c_punctuation">()</span> 90</td> 91</tr> 92<tr> 93<td class="function_type"> 94<a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 95</td> 96<td class="function_name"> 97<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-flush" title="gst_rtp_base_audio_payload_flush ()">gst_rtp_base_audio_payload_flush</a> <span class="c_punctuation">()</span> 98</td> 99</tr> 100<tr> 101<td class="function_type"> 102<span class="returnvalue">void</span> 103</td> 104<td class="function_name"> 105<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-samplebits-options" title="gst_rtp_base_audio_payload_set_samplebits_options ()">gst_rtp_base_audio_payload_set_samplebits_options</a> <span class="c_punctuation">()</span> 106</td> 107</tr> 108</tbody> 109</table></div> 110</div> 111<div class="refsect1"> 112<a name="GstRTPBaseAudioPayload.properties"></a><h2>Properties</h2> 113<div class="informaltable"><table class="informaltable" border="0"> 114<colgroup> 115<col width="150px" class="properties_type"> 116<col width="300px" class="properties_name"> 117<col width="200px" class="properties_flags"> 118</colgroup> 119<tbody><tr> 120<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td> 121<td class="property_name"><a class="link" href="GstRTPBaseAudioPayload.html#GstRTPBaseAudioPayload--buffer-list" title="The “buffer-list” property">buffer-list</a></td> 122<td class="property_flags">Read / Write</td> 123</tr></tbody> 124</table></div> 125</div> 126<div class="refsect1"> 127<a name="GstRTPBaseAudioPayload.other"></a><h2>Types and Values</h2> 128<div class="informaltable"><table class="informaltable" width="100%" border="0"> 129<colgroup> 130<col width="150px" class="name"> 131<col class="description"> 132</colgroup> 133<tbody> 134<tr> 135<td class="datatype_keyword">struct</td> 136<td class="function_name"><a class="link" href="GstRTPBaseAudioPayload.html#GstRTPBaseAudioPayload-struct" title="struct GstRTPBaseAudioPayload">GstRTPBaseAudioPayload</a></td> 137</tr> 138<tr> 139<td class="datatype_keyword">struct</td> 140<td class="function_name"><a class="link" href="GstRTPBaseAudioPayload.html#GstRTPBaseAudioPayloadClass" title="struct GstRTPBaseAudioPayloadClass">GstRTPBaseAudioPayloadClass</a></td> 141</tr> 142</tbody> 143</table></div> 144</div> 145<div class="refsect1"> 146<a name="GstRTPBaseAudioPayload.object-hierarchy"></a><h2>Object Hierarchy</h2> 147<pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> 148 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> 149 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a> 150 <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a> 151 <span class="lineart">╰──</span> <a class="link" href="GstRTPBasePayload.html" title="GstRTPBasePayload">GstRTPBasePayload</a> 152 <span class="lineart">╰──</span> GstRTPBaseAudioPayload 153</pre> 154</div> 155<div class="refsect1"> 156<a name="GstRTPBaseAudioPayload.includes"></a><h2>Includes</h2> 157<pre class="synopsis">#include <gst/rtp/rtp.h> 158</pre> 159</div> 160<div class="refsect1"> 161<a name="GstRTPBaseAudioPayload.description"></a><h2>Description</h2> 162<p>Provides a base class for audio RTP payloaders for frame or sample based 163audio codecs (constant bitrate)</p> 164<p>This class derives from GstRTPBasePayload. It can be used for payloading 165audio codecs. It will only work with constant bitrate codecs. It supports 166both frame based and sample based codecs. It takes care of packing up the 167audio data into RTP packets and filling up the headers accordingly. The 168payloading is done based on the maximum MTU (mtu) and the maximum time per 169packet (max-ptime). The general idea is to divide large data buffers into 170smaller RTP packets. The RTP packet size is the minimum of either the MTU, 171max-ptime (if set) or available data. The RTP packet size is always larger or 172equal to min-ptime (if set). If min-ptime is not set, any residual data is 173sent in a last RTP packet. In the case of frame based codecs, the resulting 174RTP packets always contain full frames.</p> 175<div class="refsect3"> 176<a name="id-1.2.9.4.8.4"></a><h4>Usage</h4> 177<p>To use this base class, your child element needs to call either 178<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-frame-based" title="gst_rtp_base_audio_payload_set_frame_based ()"><code class="function">gst_rtp_base_audio_payload_set_frame_based()</code></a> or 179<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-sample-based" title="gst_rtp_base_audio_payload_set_sample_based ()"><code class="function">gst_rtp_base_audio_payload_set_sample_based()</code></a>. This is usually done in the 180element's <code class="function">_init()</code> function. Then, the child element must call either 181<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-frame-options" title="gst_rtp_base_audio_payload_set_frame_options ()"><code class="function">gst_rtp_base_audio_payload_set_frame_options()</code></a>, 182<a class="link" href="GstRTPBaseAudioPayload.html#gst-rtp-base-audio-payload-set-sample-options" title="gst_rtp_base_audio_payload_set_sample_options ()"><code class="function">gst_rtp_base_audio_payload_set_sample_options()</code></a> or 183gst_rtp_base_audio_payload_set_samplebits_options. Since 184GstRTPBaseAudioPayload derives from GstRTPBasePayload, the child element 185must set any variables or call/override any functions required by that base 186class. The child element does not need to override any other functions 187specific to GstRTPBaseAudioPayload.</p> 188</div> 189</div> 190<div class="refsect1"> 191<a name="GstRTPBaseAudioPayload.functions_details"></a><h2>Functions</h2> 192<div class="refsect2"> 193<a name="gst-rtp-base-audio-payload-set-frame-based"></a><h3>gst_rtp_base_audio_payload_set_frame_based ()</h3> 194<pre class="programlisting"><span class="returnvalue">void</span> 195gst_rtp_base_audio_payload_set_frame_based 196 (<em class="parameter"><code><a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> *rtpbaseaudiopayload</code></em>);</pre> 197<p>Tells <a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> that the child element is for a frame based 198audio codec</p> 199<div class="refsect3"> 200<a name="gst-rtp-base-audio-payload-set-frame-based.parameters"></a><h4>Parameters</h4> 201<div class="informaltable"><table class="informaltable" width="100%" border="0"> 202<colgroup> 203<col width="150px" class="parameters_name"> 204<col class="parameters_description"> 205<col width="200px" class="parameters_annotations"> 206</colgroup> 207<tbody><tr> 208<td class="parameter_name"><p>rtpbaseaudiopayload</p></td> 209<td class="parameter_description"><p>a pointer to the element.</p></td> 210<td class="parameter_annotations"> </td> 211</tr></tbody> 212</table></div> 213</div> 214</div> 215<hr> 216<div class="refsect2"> 217<a name="gst-rtp-base-audio-payload-set-frame-options"></a><h3>gst_rtp_base_audio_payload_set_frame_options ()</h3> 218<pre class="programlisting"><span class="returnvalue">void</span> 219gst_rtp_base_audio_payload_set_frame_options 220 (<em class="parameter"><code><a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> *rtpbaseaudiopayload</code></em>, 221 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> frame_duration</code></em>, 222 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> frame_size</code></em>);</pre> 223<p>Sets the options for frame based audio codecs.</p> 224<div class="refsect3"> 225<a name="gst-rtp-base-audio-payload-set-frame-options.parameters"></a><h4>Parameters</h4> 226<div class="informaltable"><table class="informaltable" width="100%" border="0"> 227<colgroup> 228<col width="150px" class="parameters_name"> 229<col class="parameters_description"> 230<col width="200px" class="parameters_annotations"> 231</colgroup> 232<tbody> 233<tr> 234<td class="parameter_name"><p>rtpbaseaudiopayload</p></td> 235<td class="parameter_description"><p>a pointer to the element.</p></td> 236<td class="parameter_annotations"> </td> 237</tr> 238<tr> 239<td class="parameter_name"><p>frame_duration</p></td> 240<td class="parameter_description"><p>The duraction of an audio frame in milliseconds.</p></td> 241<td class="parameter_annotations"> </td> 242</tr> 243<tr> 244<td class="parameter_name"><p>frame_size</p></td> 245<td class="parameter_description"><p>The size of an audio frame in bytes.</p></td> 246<td class="parameter_annotations"> </td> 247</tr> 248</tbody> 249</table></div> 250</div> 251</div> 252<hr> 253<div class="refsect2"> 254<a name="gst-rtp-base-audio-payload-set-sample-based"></a><h3>gst_rtp_base_audio_payload_set_sample_based ()</h3> 255<pre class="programlisting"><span class="returnvalue">void</span> 256gst_rtp_base_audio_payload_set_sample_based 257 (<em class="parameter"><code><a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> *rtpbaseaudiopayload</code></em>);</pre> 258<p>Tells <a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> that the child element is for a sample based 259audio codec</p> 260<div class="refsect3"> 261<a name="gst-rtp-base-audio-payload-set-sample-based.parameters"></a><h4>Parameters</h4> 262<div class="informaltable"><table class="informaltable" width="100%" border="0"> 263<colgroup> 264<col width="150px" class="parameters_name"> 265<col class="parameters_description"> 266<col width="200px" class="parameters_annotations"> 267</colgroup> 268<tbody><tr> 269<td class="parameter_name"><p>rtpbaseaudiopayload</p></td> 270<td class="parameter_description"><p>a pointer to the element.</p></td> 271<td class="parameter_annotations"> </td> 272</tr></tbody> 273</table></div> 274</div> 275</div> 276<hr> 277<div class="refsect2"> 278<a name="gst-rtp-base-audio-payload-set-sample-options"></a><h3>gst_rtp_base_audio_payload_set_sample_options ()</h3> 279<pre class="programlisting"><span class="returnvalue">void</span> 280gst_rtp_base_audio_payload_set_sample_options 281 (<em class="parameter"><code><a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> *rtpbaseaudiopayload</code></em>, 282 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> sample_size</code></em>);</pre> 283<p>Sets the options for sample based audio codecs.</p> 284<div class="refsect3"> 285<a name="gst-rtp-base-audio-payload-set-sample-options.parameters"></a><h4>Parameters</h4> 286<div class="informaltable"><table class="informaltable" width="100%" border="0"> 287<colgroup> 288<col width="150px" class="parameters_name"> 289<col class="parameters_description"> 290<col width="200px" class="parameters_annotations"> 291</colgroup> 292<tbody> 293<tr> 294<td class="parameter_name"><p>rtpbaseaudiopayload</p></td> 295<td class="parameter_description"><p>a pointer to the element.</p></td> 296<td class="parameter_annotations"> </td> 297</tr> 298<tr> 299<td class="parameter_name"><p>sample_size</p></td> 300<td class="parameter_description"><p>Size per sample in bytes.</p></td> 301<td class="parameter_annotations"> </td> 302</tr> 303</tbody> 304</table></div> 305</div> 306</div> 307<hr> 308<div class="refsect2"> 309<a name="gst-rtp-base-audio-payload-get-adapter"></a><h3>gst_rtp_base_audio_payload_get_adapter ()</h3> 310<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstAdapter.html#GstAdapter-struct"><span class="returnvalue">GstAdapter</span></a> * 311gst_rtp_base_audio_payload_get_adapter 312 (<em class="parameter"><code><a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> *rtpbaseaudiopayload</code></em>);</pre> 313<p>Gets the internal adapter used by the depayloader.</p> 314<div class="refsect3"> 315<a name="gst-rtp-base-audio-payload-get-adapter.parameters"></a><h4>Parameters</h4> 316<div class="informaltable"><table class="informaltable" width="100%" border="0"> 317<colgroup> 318<col width="150px" class="parameters_name"> 319<col class="parameters_description"> 320<col width="200px" class="parameters_annotations"> 321</colgroup> 322<tbody><tr> 323<td class="parameter_name"><p>rtpbaseaudiopayload</p></td> 324<td class="parameter_description"><p>a <a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a></p></td> 325<td class="parameter_annotations"> </td> 326</tr></tbody> 327</table></div> 328</div> 329<div class="refsect3"> 330<a name="gst-rtp-base-audio-payload-get-adapter.returns"></a><h4>Returns</h4> 331<p>a <a href="/usr/share/gtk-doc/html/gstreamer-libs-1.0/GstAdapter.html#GstAdapter-struct"><span class="type">GstAdapter</span></a>. </p> 332<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p> 333</div> 334</div> 335<hr> 336<div class="refsect2"> 337<a name="gst-rtp-base-audio-payload-push"></a><h3>gst_rtp_base_audio_payload_push ()</h3> 338<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 339gst_rtp_base_audio_payload_push (<em class="parameter"><code><a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> *baseaudiopayload</code></em>, 340 <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *data</code></em>, 341 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> payload_len</code></em>, 342 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> timestamp</code></em>);</pre> 343<p>Create an RTP buffer and store <em class="parameter"><code>payload_len</code></em> 344 bytes of <em class="parameter"><code>data</code></em> 345 as the 346payload. Set the timestamp on the new buffer to <em class="parameter"><code>timestamp</code></em> 347 before pushing 348the buffer downstream.</p> 349<div class="refsect3"> 350<a name="gst-rtp-base-audio-payload-push.parameters"></a><h4>Parameters</h4> 351<div class="informaltable"><table class="informaltable" width="100%" border="0"> 352<colgroup> 353<col width="150px" class="parameters_name"> 354<col class="parameters_description"> 355<col width="200px" class="parameters_annotations"> 356</colgroup> 357<tbody> 358<tr> 359<td class="parameter_name"><p>baseaudiopayload</p></td> 360<td class="parameter_description"><p>a <a class="link" href="GstRTPBasePayload.html" title="GstRTPBasePayload"><span class="type">GstRTPBasePayload</span></a></p></td> 361<td class="parameter_annotations"> </td> 362</tr> 363<tr> 364<td class="parameter_name"><p>data</p></td> 365<td class="parameter_description"><p>data to set as payload. </p></td> 366<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=payload_len]</span></td> 367</tr> 368<tr> 369<td class="parameter_name"><p>payload_len</p></td> 370<td class="parameter_description"><p>length of payload</p></td> 371<td class="parameter_annotations"> </td> 372</tr> 373<tr> 374<td class="parameter_name"><p>timestamp</p></td> 375<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a></p></td> 376<td class="parameter_annotations"> </td> 377</tr> 378</tbody> 379</table></div> 380</div> 381<div class="refsect3"> 382<a name="gst-rtp-base-audio-payload-push.returns"></a><h4>Returns</h4> 383<p> a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a></p> 384</div> 385</div> 386<hr> 387<div class="refsect2"> 388<a name="gst-rtp-base-audio-payload-flush"></a><h3>gst_rtp_base_audio_payload_flush ()</h3> 389<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a> 390gst_rtp_base_audio_payload_flush (<em class="parameter"><code><a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> *baseaudiopayload</code></em>, 391 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> payload_len</code></em>, 392 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> timestamp</code></em>);</pre> 393<p>Create an RTP buffer and store <em class="parameter"><code>payload_len</code></em> 394 bytes of the adapter as the 395payload. Set the timestamp on the new buffer to <em class="parameter"><code>timestamp</code></em> 396 before pushing 397the buffer downstream.</p> 398<p>If <em class="parameter"><code>payload_len</code></em> 399 is -1, all pending bytes will be flushed. If <em class="parameter"><code>timestamp</code></em> 400 is 401-1, the timestamp will be calculated automatically.</p> 402<div class="refsect3"> 403<a name="gst-rtp-base-audio-payload-flush.parameters"></a><h4>Parameters</h4> 404<div class="informaltable"><table class="informaltable" width="100%" border="0"> 405<colgroup> 406<col width="150px" class="parameters_name"> 407<col class="parameters_description"> 408<col width="200px" class="parameters_annotations"> 409</colgroup> 410<tbody> 411<tr> 412<td class="parameter_name"><p>baseaudiopayload</p></td> 413<td class="parameter_description"><p>a <a class="link" href="GstRTPBasePayload.html" title="GstRTPBasePayload"><span class="type">GstRTPBasePayload</span></a></p></td> 414<td class="parameter_annotations"> </td> 415</tr> 416<tr> 417<td class="parameter_name"><p>payload_len</p></td> 418<td class="parameter_description"><p>length of payload</p></td> 419<td class="parameter_annotations"> </td> 420</tr> 421<tr> 422<td class="parameter_name"><p>timestamp</p></td> 423<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a></p></td> 424<td class="parameter_annotations"> </td> 425</tr> 426</tbody> 427</table></div> 428</div> 429<div class="refsect3"> 430<a name="gst-rtp-base-audio-payload-flush.returns"></a><h4>Returns</h4> 431<p> a <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a></p> 432</div> 433</div> 434<hr> 435<div class="refsect2"> 436<a name="gst-rtp-base-audio-payload-set-samplebits-options"></a><h3>gst_rtp_base_audio_payload_set_samplebits_options ()</h3> 437<pre class="programlisting"><span class="returnvalue">void</span> 438gst_rtp_base_audio_payload_set_samplebits_options 439 (<em class="parameter"><code><a class="link" href="GstRTPBaseAudioPayload.html" title="GstRTPBaseAudioPayload"><span class="type">GstRTPBaseAudioPayload</span></a> *rtpbaseaudiopayload</code></em>, 440 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> sample_size</code></em>);</pre> 441<p>Sets the options for sample based audio codecs.</p> 442<div class="refsect3"> 443<a name="gst-rtp-base-audio-payload-set-samplebits-options.parameters"></a><h4>Parameters</h4> 444<div class="informaltable"><table class="informaltable" width="100%" border="0"> 445<colgroup> 446<col width="150px" class="parameters_name"> 447<col class="parameters_description"> 448<col width="200px" class="parameters_annotations"> 449</colgroup> 450<tbody> 451<tr> 452<td class="parameter_name"><p>rtpbaseaudiopayload</p></td> 453<td class="parameter_description"><p>a pointer to the element.</p></td> 454<td class="parameter_annotations"> </td> 455</tr> 456<tr> 457<td class="parameter_name"><p>sample_size</p></td> 458<td class="parameter_description"><p>Size per sample in bits.</p></td> 459<td class="parameter_annotations"> </td> 460</tr> 461</tbody> 462</table></div> 463</div> 464</div> 465</div> 466<div class="refsect1"> 467<a name="GstRTPBaseAudioPayload.other_details"></a><h2>Types and Values</h2> 468<div class="refsect2"> 469<a name="GstRTPBaseAudioPayload-struct"></a><h3>struct GstRTPBaseAudioPayload</h3> 470<pre class="programlisting">struct GstRTPBaseAudioPayload;</pre> 471</div> 472<hr> 473<div class="refsect2"> 474<a name="GstRTPBaseAudioPayloadClass"></a><h3>struct GstRTPBaseAudioPayloadClass</h3> 475<pre class="programlisting">struct GstRTPBaseAudioPayloadClass { 476 GstRTPBasePayloadClass parent_class; 477}; 478</pre> 479<p>Base class for audio RTP payloader.</p> 480<div class="refsect3"> 481<a name="GstRTPBaseAudioPayloadClass.members"></a><h4>Members</h4> 482<div class="informaltable"><table class="informaltable" width="100%" border="0"> 483<colgroup> 484<col width="300px" class="struct_members_name"> 485<col class="struct_members_description"> 486<col width="200px" class="struct_members_annotations"> 487</colgroup> 488<tbody></tbody> 489</table></div> 490</div> 491</div> 492</div> 493<div class="refsect1"> 494<a name="GstRTPBaseAudioPayload.property-details"></a><h2>Property Details</h2> 495<div class="refsect2"> 496<a name="GstRTPBaseAudioPayload--buffer-list"></a><h3>The <code class="literal">“buffer-list”</code> property</h3> 497<pre class="programlisting"> “buffer-list” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre> 498<p>Use Buffer Lists.</p> 499<p>Flags: Read / Write</p> 500<p>Default value: FALSE</p> 501</div> 502</div> 503</div> 504<div class="footer"> 505<hr>Generated by GTK-Doc V1.28</div> 506</body> 507</html>