• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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>rtpulpfecenc: GStreamer Good Plugins 1.0 Plugins Reference Manual</title>
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="GStreamer Good Plugins 1.0 Plugins Reference Manual">
8<link rel="up" href="ch01.html" title="gst-plugins-good Elements">
9<link rel="prev" href="gst-plugins-good-plugins-rtpulpfecdec.html" title="rtpulpfecdec">
10<link rel="next" href="gst-plugins-good-plugins-rtpvorbisdepay.html" title="rtpvorbisdepay">
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">|</span18                  <a href="#gst-plugins-good-plugins-rtpulpfecenc.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span19                  <a href="#gst-plugins-good-plugins-rtpulpfecenc.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span20                  <a href="#gst-plugins-good-plugins-rtpulpfecenc.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="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
24<td><a accesskey="p" href="gst-plugins-good-plugins-rtpulpfecdec.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
25<td><a accesskey="n" href="gst-plugins-good-plugins-rtpvorbisdepay.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="gst-plugins-good-plugins-rtpulpfecenc"></a><div class="titlepage"></div>
29<div class="refnamediv"><table width="100%"><tr>
30<td valign="top">
31<h2><span class="refentrytitle"><a name="gst-plugins-good-plugins-rtpulpfecenc.top_of_page"></a>rtpulpfecenc</span></h2>
32<p>rtpulpfecenc — Generic RTP Forward Error Correction (FEC) encoder</p>
33</td>
34<td class="gallery_image" valign="top" align="right"></td>
35</tr></table></div>
36<div class="refsect1">
37<a name="gst-plugins-good-plugins-rtpulpfecenc.properties"></a><h2>Properties</h2>
38<div class="informaltable"><table class="informaltable" border="0">
39<colgroup>
40<col width="150px" class="properties_type">
41<col width="300px" class="properties_name">
42<col width="200px" class="properties_flags">
43</colgroup>
44<tbody>
45<tr>
46<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
47<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--multipacket" title="The “multipacket” property">multipacket</a></td>
48<td class="property_flags">Read / Write / Construct</td>
49</tr>
50<tr>
51<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
52<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--mux-seq" title="The “mux-seq” property">mux-seq</a></td>
53<td class="property_flags">Read / Write / Construct</td>
54</tr>
55<tr>
56<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
57<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--percentage" title="The “percentage” property">percentage</a></td>
58<td class="property_flags">Read / Write / Construct</td>
59</tr>
60<tr>
61<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
62<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--percentage-important" title="The “percentage-important” property">percentage-important</a></td>
63<td class="property_flags">Read / Write / Construct</td>
64</tr>
65<tr>
66<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
67<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--protected" title="The “protected” property">protected</a></td>
68<td class="property_flags">Read</td>
69</tr>
70<tr>
71<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
72<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--pt" title="The “pt” property">pt</a></td>
73<td class="property_flags">Read / Write / Construct</td>
74</tr>
75<tr>
76<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
77<td class="property_name"><a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--ssrc" title="The “ssrc” property">ssrc</a></td>
78<td class="property_flags">Read / Write / Construct</td>
79</tr>
80</tbody>
81</table></div>
82</div>
83<a name="GstRtpUlpFecEnc"></a><div class="refsect1">
84<a name="gst-plugins-good-plugins-rtpulpfecenc.other"></a><h2>Types and Values</h2>
85<div class="informaltable"><table class="informaltable" width="100%" border="0">
86<colgroup>
87<col width="150px" class="name">
88<col class="description">
89</colgroup>
90<tbody><tr>
91<td class="datatype_keyword">struct</td>
92<td class="function_name"><a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc-struct" title="struct GstRtpUlpFecEnc">GstRtpUlpFecEnc</a></td>
93</tr></tbody>
94</table></div>
95</div>
96<div class="refsect1">
97<a name="gst-plugins-good-plugins-rtpulpfecenc.object-hierarchy"></a><h2>Object Hierarchy</h2>
98<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
99    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
100        <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstObject.html#GstObject-struct">GstObject</a>
101            <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstElement.html#GstElement-struct">GstElement</a>
102                <span class="lineart">╰──</span> GstRtpUlpFecEnc
103</pre>
104</div>
105<div class="refsect1">
106<a name="gst-plugins-good-plugins-rtpulpfecenc.description"></a><h2>Description</h2>
107<p>Generic Forward Error Correction (FEC) encoder using Uneven Level
108Protection (ULP) as described in RFC 5109.</p>
109<p>It differs from the RFC in one important way, it multiplexes the
110FEC packets in the same sequence number as media packets. This is to be
111compatible with libwebrtc as using in Google Chrome and with Microsoft
112Lync / Skype for Business.</p>
113<p>Be warned that after using this element, it is no longer possible to know if
114there is a gap in the media stream based on the sequence numbers as the FEC
115packets become interleaved with the media packets.</p>
116<p>This element will insert protection packets in any RTP stream, which
117can then be used on the receiving side to recover lost packets.</p>
118<p>This element rewrites packets' seqnums, which means that when combined
119with retransmission elements such as <a class="link" href="gst-plugins-good-plugins-rtprtxsend.html#GstRtpRtxSend"><span class="type">GstRtpRtxSend</span></a>, it *must* be
120placed upstream of those, otherwise retransmission requests will request
121incorrect seqnums.</p>
122<p>A payload type for the protection packets *must* be specified, different
123from the payload type of the protected packets, with the GstRtpUlpFecEnc:pt
124property.</p>
125<p>The marker bit of RTP packets is used to determine sets of packets to
126protect as a unit, in order to modulate the level of protection, this
127behaviour can be disabled with GstRtpUlpFecEnc:multipacket, but should
128be left enabled for video streams.</p>
129<p>The level of protection can be configured with two properties,
130<a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--percentage" title="The “percentage” property"><span class="type">“percentage”</span></a> and <a class="link" href="gst-plugins-good-plugins-rtpulpfecenc.html#GstRtpUlpFecEnc--percentage-important" title="The “percentage-important” property"><span class="type">“percentage-important”</span></a>,
131the element will determine which percentage to use for a given set of
132packets based on the presence of the <a href="/usr/share/gtk-doc/html/gstreamer-1.0/GstBuffer.html#GST-BUFFER-FLAG-NON-DROPPABLE:CAPS"><span class="type">GST_BUFFER_FLAG_NON_DROPPABLE</span></a>
133flag, upstream payloaders are expected to set this flag on "important"
134packets such as those making up a keyframe.</p>
135<p>The percentage is expressed not in terms of bytes, but in terms of
136packets, this for implementation convenience. The drawback with this
137approach is that when using a percentage different from 100 %, and a
138low bitrate, entire frames may be contained in a single packet, leading
139to some packets not being protected, thus lowering the overall recovery
140rate on the receiving side.</p>
141<p>When using <a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin"><span class="type">GstRtpBin</span></a>, this element should be inserted through the
142<a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin-request-fec-encoder" title="The “request-fec-encoder” signal"><span class="type">“request-fec-encoder”</span></a> signal.</p>
143<div class="refsect2">
144<a name="id-1.2.228.7.12"></a><h3>Example pipeline</h3>
145<div class="informalexample">
146  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
147    <tbody>
148      <tr>
149        <td class="listing_lines" align="right"><pre>1</pre></td>
150        <td class="listing_code"><pre class="programlisting">gst<span class="gtkdoc opt">-</span>launch<span class="gtkdoc opt">-</span><span class="number">1.0</span> videotestsrc <span class="gtkdoc opt">!</span> x264enc <span class="gtkdoc opt">!</span> video<span class="gtkdoc opt">/</span>x<span class="gtkdoc opt">-</span>h264<span class="gtkdoc opt">,</span> profile<span class="gtkdoc opt">=</span>baseline <span class="gtkdoc opt">!</span> rtph264pay pt<span class="gtkdoc opt">=</span><span class="number">96</span> <span class="gtkdoc opt">!</span> rtpulpfecenc percentage<span class="gtkdoc opt">=</span><span class="number">100</span> pt<span class="gtkdoc opt">=</span><span class="number">122</span> <span class="gtkdoc opt">!</span> udpsink port<span class="gtkdoc opt">=</span><span class="number">8888</span></pre></td>
151      </tr>
152    </tbody>
153  </table>
154</div>
155 This example will receive a stream with FEC and try to reconstruct the packets.
156
157Example programs are available at
158<a class="ulink" href="https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/blob/master/examples/src/bin/rtpfecserver.rs" target="_top">rtpfecserver.rs</a>
159and
160<a class="ulink" href="https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/blob/master/examples/src/bin/rtpfecclient.rs" target="_top">rtpfecclient.rs</a>
161</div>
162<p>See also: <a class="link" href="gst-plugins-good-plugins-rtpulpfecdec.html#GstRtpUlpFecDec"><span class="type">GstRtpUlpFecDec</span></a>, <a class="link" href="gst-plugins-good-plugins-rtpbin.html#GstRtpBin"><span class="type">GstRtpBin</span></a></p>
163<div class="refsynopsisdiv">
164<h2>Synopsis</h2>
165<div class="refsect2">
166<a name="id-1.2.228.7.14.1"></a><h3>Element Information</h3>
167<div class="variablelist"><table border="0" class="variablelist">
168<colgroup>
169<col align="left" valign="top">
170<col>
171</colgroup>
172<tbody>
173<tr>
174<td><p><span class="term">plugin</span></p></td>
175<td>
176            <a class="link" href="gst-plugins-good-plugins-plugin-rtp.html#plugin-rtp">rtp</a>
177          </td>
178</tr>
179<tr>
180<td><p><span class="term">author</span></p></td>
181<td>Mikhail Fludkov &lt;misha@pexip.com&gt;</td>
182</tr>
183<tr>
184<td><p><span class="term">class</span></p></td>
185<td>Codec/Payloader/Network/RTP</td>
186</tr>
187</tbody>
188</table></div>
189</div>
190<hr>
191<div class="refsect2">
192<a name="id-1.2.228.7.14.2"></a><h3>Element Pads</h3>
193<div class="variablelist"><table border="0" class="variablelist">
194<colgroup>
195<col align="left" valign="top">
196<col>
197</colgroup>
198<tbody>
199<tr>
200<td><p><span class="term">name</span></p></td>
201<td>sink</td>
202</tr>
203<tr>
204<td><p><span class="term">direction</span></p></td>
205<td>sink</td>
206</tr>
207<tr>
208<td><p><span class="term">presence</span></p></td>
209<td>always</td>
210</tr>
211<tr>
212<td><p><span class="term">details</span></p></td>
213<td>application/x-rtp</td>
214</tr>
215</tbody>
216</table></div>
217<div class="variablelist"><table border="0" class="variablelist">
218<colgroup>
219<col align="left" valign="top">
220<col>
221</colgroup>
222<tbody>
223<tr>
224<td><p><span class="term">name</span></p></td>
225<td>src</td>
226</tr>
227<tr>
228<td><p><span class="term">direction</span></p></td>
229<td>source</td>
230</tr>
231<tr>
232<td><p><span class="term">presence</span></p></td>
233<td>always</td>
234</tr>
235<tr>
236<td><p><span class="term">details</span></p></td>
237<td>application/x-rtp</td>
238</tr>
239</tbody>
240</table></div>
241</div>
242</div>
243</div>
244<div class="refsect1">
245<a name="gst-plugins-good-plugins-rtpulpfecenc.functions_details"></a><h2>Functions</h2>
246<p></p>
247</div>
248<div class="refsect1">
249<a name="gst-plugins-good-plugins-rtpulpfecenc.other_details"></a><h2>Types and Values</h2>
250<div class="refsect2">
251<a name="GstRtpUlpFecEnc-struct"></a><h3>struct GstRtpUlpFecEnc</h3>
252<pre class="programlisting">struct GstRtpUlpFecEnc;</pre>
253</div>
254</div>
255<div class="refsect1">
256<a name="gst-plugins-good-plugins-rtpulpfecenc.property-details"></a><h2>Property Details</h2>
257<div class="refsect2">
258<a name="GstRtpUlpFecEnc--multipacket"></a><h3>The <code class="literal">“multipacket”</code> property</h3>
259<pre class="programlisting">  “multipacket”              <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
260<p>Apply FEC on multiple packets.</p>
261<p>Flags: Read / Write / Construct</p>
262<p>Default value: TRUE</p>
263</div>
264<hr>
265<div class="refsect2">
266<a name="GstRtpUlpFecEnc--mux-seq"></a><h3>The <code class="literal">“mux-seq”</code> property</h3>
267<pre class="programlisting">  “mux-seq”                  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
268<p>Mux seqnum for media and fec packets in same seqnum space.</p>
269<p>Flags: Read / Write / Construct</p>
270<p>Default value: FALSE</p>
271</div>
272<hr>
273<div class="refsect2">
274<a name="GstRtpUlpFecEnc--percentage"></a><h3>The <code class="literal">“percentage”</code> property</h3>
275<pre class="programlisting">  “percentage”               <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
276<p>FEC overhead percentage for the whole stream.</p>
277<p>Flags: Read / Write / Construct</p>
278<p>Allowed values: &lt;= 100</p>
279<p>Default value: 0</p>
280</div>
281<hr>
282<div class="refsect2">
283<a name="GstRtpUlpFecEnc--percentage-important"></a><h3>The <code class="literal">“percentage-important”</code> property</h3>
284<pre class="programlisting">  “percentage-important”     <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
285<p>FEC overhead percentage for important packets.</p>
286<p>Flags: Read / Write / Construct</p>
287<p>Allowed values: &lt;= 100</p>
288<p>Default value: 0</p>
289</div>
290<hr>
291<div class="refsect2">
292<a name="GstRtpUlpFecEnc--protected"></a><h3>The <code class="literal">“protected”</code> property</h3>
293<pre class="programlisting">  “protected”                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
294<p>Count of protected packets.</p>
295<p>Flags: Read</p>
296<p>Default value: 0</p>
297</div>
298<hr>
299<div class="refsect2">
300<a name="GstRtpUlpFecEnc--pt"></a><h3>The <code class="literal">“pt”</code> property</h3>
301<pre class="programlisting">  “pt”                       <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
302<p>The payload type of FEC packets.</p>
303<p>Flags: Read / Write / Construct</p>
304<p>Allowed values: &lt;= 255</p>
305<p>Default value: 255</p>
306</div>
307<hr>
308<div class="refsect2">
309<a name="GstRtpUlpFecEnc--ssrc"></a><h3>The <code class="literal">“ssrc”</code> property</h3>
310<pre class="programlisting">  “ssrc”                     <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
311<p>The SSRC to use on FEC'd packets.</p>
312<p>Flags: Read / Write / Construct</p>
313<p>Default value: 0</p>
314</div>
315</div>
316</div>
317<div class="footer">
318<hr>Generated by GTK-Doc V1.28</div>
319</body>
320</html>