From 11f30181702985544457faa34b764d194f191298 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Thu, 21 Mar 2019 16:48:37 -0400 Subject: [PATCH] rtpulpfec*: Improve documentation --- gst/rtp/gstrtpreddec.c | 2 +- gst/rtp/gstrtpulpfecdec.c | 23 ++++++++++++++++++----- gst/rtp/gstrtpulpfecenc.c | 17 +++++++++++++++++ 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/gst/rtp/gstrtpreddec.c b/gst/rtp/gstrtpreddec.c index 7d089ea..c6090a9 100644 --- a/gst/rtp/gstrtpreddec.c +++ b/gst/rtp/gstrtpreddec.c @@ -34,7 +34,7 @@ * types of the RED packets. * * When using #GstRtpBin, this element should be inserted through the - * #GstRtpBin::request-fec-decoder signal. + * #GstRtpBin::request-aux-receiver signal. * * See also: #GstRtpRedEnc, #GstWebRTCBin, #GstRtpBin * Since: 1.14 diff --git a/gst/rtp/gstrtpulpfecdec.c b/gst/rtp/gstrtpulpfecdec.c index 08d68fe..cb6372c 100644 --- a/gst/rtp/gstrtpulpfecdec.c +++ b/gst/rtp/gstrtpulpfecdec.c @@ -26,6 +26,11 @@ * Generic Forward Error Correction (FEC) decoder for Uneven Level * Protection (ULP) as described in RFC 5109. * + * It differs from the RFC in one important way, it multiplexes the + * FEC packets in the same sequence number as media packets. This is to be + * compatible with libwebrtc as using in Google Chrome and with Microsoft + * Lync / Skype for Business. + * * This element will work in combination with an upstream #GstRtpStorage * element and attempt to recover packets declared lost through custom * 'GstRTPPacketLost' events, usually emitted by #GstRtpJitterBuffer. @@ -33,17 +38,25 @@ * If no storage is provided using the #GstRtpUlpFecDec:storage * property, it will try to get it from an element upstream. * - * Example programs are available at - * - * and - * . - * * Additionally, the payload types of the protection packets *must* be * provided to this element via its #GstRtpUlpFecDec:pt property. * * When using #GstRtpBin, this element should be inserted through the * #GstRtpBin::request-fec-decoder signal. * + * + * Example pipeline + * |[ + * gst-launch-1.0 udpsrc port=8888 caps="application/x-rtp, payload=96, clock-rate=90000" ! rtpstorage size-time=220000000 ! rtpssrcdemux ! application/x-rtp, payload=96, clock-rate=90000, media=video, encoding-name=H264 ! rtpjitterbuffer do-lost=1 latency=200 ! rtpulpfecdec pt=122 ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink + * ]| This example will receive a stream with FEC and try to reconstruct the packets. + * + * Example programs are available at + * + * and + * . + * + * + * * See also: #GstRtpUlpFecEnc, #GstRtpBin, #GstRtpStorage * Since: 1.14 */ diff --git a/gst/rtp/gstrtpulpfecenc.c b/gst/rtp/gstrtpulpfecenc.c index f29acd5..222bff5 100644 --- a/gst/rtp/gstrtpulpfecenc.c +++ b/gst/rtp/gstrtpulpfecenc.c @@ -26,6 +26,15 @@ * Generic Forward Error Correction (FEC) encoder using Uneven Level * Protection (ULP) as described in RFC 5109. * + * It differs from the RFC in one important way, it multiplexes the + * FEC packets in the same sequence number as media packets. This is to be + * compatible with libwebrtc as using in Google Chrome and with Microsoft + * Lync / Skype for Business. + * + * Be warned that after using this element, it is no longer possible to know if + * there is a gap in the media stream based on the sequence numbers as the FEC + * packets become interleaved with the media packets. + * * This element will insert protection packets in any RTP stream, which * can then be used on the receiving side to recover lost packets. * @@ -60,10 +69,18 @@ * When using #GstRtpBin, this element should be inserted through the * #GstRtpBin::request-fec-encoder signal. * + * + * + * Example pipeline + * |[ + * gst-launch-1.0 videotestsrc ! x264enc ! video/x-h264, profile=baseline ! rtph264pay pt=96 ! rtpulpfecenc percentage=100 pt=122 ! udpsink port=8888 + * ]| This example will receive a stream with FEC and try to reconstruct the packets. + * * Example programs using this element can be found at * * and * . + * * * See also: #GstRtpUlpFecDec, #GstRtpBin * Since: 1.14 -- 2.7.4