gstreamer/gst-libs/gst/rtp
Mathieu Duponchelle 8467939538 rtpbasedepayload: condition the sending of gap events
The default implementation for packet loss handling previously
always sent a gap event.

While this is correct as long as we know the packet that was
lost was actually a media packet, with ULPFEC this becomes
a bit more complicated, as we do not know whether the packet
that was lost was a FEC packet, in which case it is better
to not actually send any gap events in the default implementation.

Some payloaders can be more clever about, for example VP8 can
use the picture-id, and the M and S bits to determine whether
the missing packet was inside an encoded frame or outside,
and thus whether if it was a media packet or a FEC packet,
which is why ulpfecdec still lets these lost events go through,
though stripping them of their seqnum, and appending a new
"might-have-been-fec" field to them.

This is all a bit terrible, but necessary to have ULPFEC
integrate properly with the rest of our RTP stack.

https://bugzilla.gnome.org/show_bug.cgi?id=794909
2018-04-19 16:39:06 +02:00
..
gstrtcpbuffer.c rtp: Require gconstpointer instead of gpointer for gst_rt[c]p_buffer_new_copy_data() 2017-11-17 14:14:55 +02:00
gstrtcpbuffer.h libs: Documentation cleanup 2018-04-02 08:53:28 +02:00
gstrtpbaseaudiopayload.c libs: Check if meta transform_func is NULL before using it 2017-05-02 14:31:14 +03:00
gstrtpbaseaudiopayload.h rtp: GST_EXPORT -> GST_RTP_API 2018-03-13 12:16:42 +00:00
gstrtpbasedepayload.c rtpbasedepayload: condition the sending of gap events 2018-04-19 16:39:06 +02:00
gstrtpbasedepayload.h libs: Documentation cleanup 2018-04-02 08:53:28 +02:00
gstrtpbasepayload.c docs: Convert gtkdoc comments to markdown 2017-03-10 18:19:17 -03:00
gstrtpbasepayload.h rtp: GST_EXPORT -> GST_RTP_API 2018-03-13 12:16:42 +00:00
gstrtpbuffer.c rtp: fix gst_rtp_buffer_ext_timestamp taking into account backwards 2017-12-21 17:27:42 -05:00
gstrtpbuffer.h rtp: GST_EXPORT -> GST_RTP_API 2018-03-13 12:16:42 +00:00
gstrtpdefs.h libs: Documentation cleanup 2018-04-02 08:53:28 +02:00
gstrtphdrext.c docs: Convert gtkdoc comments to markdown 2017-03-10 18:19:17 -03:00
gstrtphdrext.h rtp: GST_EXPORT -> GST_RTP_API 2018-03-13 12:16:42 +00:00
gstrtppayloads.c docs: Convert gtkdoc comments to markdown 2017-03-10 18:19:17 -03:00
gstrtppayloads.h rtp: GST_EXPORT -> GST_RTP_API 2018-03-13 12:16:42 +00:00
Makefile.am rtp: GST_EXPORT -> GST_RTP_API 2018-03-13 12:16:42 +00:00
meson.build meson: libs: use gnome.mkenums_simple() to generate enumtypes files 2018-03-22 13:15:35 +00:00
README rtp: Add support for multiple memory blocks in RTP 2012-07-17 16:41:36 +02:00
rtp-prelude.h rtp: GST_EXPORT -> GST_RTP_API 2018-03-13 12:16:42 +00:00
rtp.h rtp: Add GstRTPProfile enum 2015-05-20 15:41:06 +03:00

The RTP libraries
---------------------

  RTP Buffers
  -----------
  The real time protocol as described in RFC 3550 requires the use of special
  packets containing an additional RTP header of at least 12 bytes. GStreamer
  provides some helper functions for creating and parsing these RTP headers.
  The result is a normal #GstBuffer with an additional RTP header.
 
  RTP buffers are usually created with gst_rtp_buffer_new_allocate() or
  gst_rtp_buffer_new_allocate_len(). These functions create buffers with a
  preallocated space of memory. It will also ensure that enough memory
  is allocated for the RTP header. The first function is used when the payload
  size is known. gst_rtp_buffer_new_allocate_len() should be used when the size
  of the whole RTP buffer (RTP header + payload) is known.
 
  When receiving RTP buffers from a network, gst_rtp_buffer_new_take_data()
  should be used when the user would like to parse that RTP packet. (TODO Ask
  Wim what the real purpose of this function is as it seems to simply create a
  duplicate GstBuffer with the same data as the previous one). The
  function will create a new RTP buffer with the given data as the whole RTP
  packet. Alternatively, gst_rtp_buffer_new_copy_data() can be used if the user
  wishes to make a copy of the data before using it in the new RTP buffer.
 
  It is now possible to use all the gst_rtp_buffer_get_*() or
  gst_rtp_buffer_set_*() functions to read or write the different parts of the
  RTP header such as the payload type, the sequence number or the RTP
  timestamp. The use can also retreive a pointer to the actual RTP payload data
  using the gst_rtp_buffer_get_payload() function.

  RTP Base Payloader Class (GstBaseRTPPayload)
  --------------------------------------------

  All RTP payloader elements (audio or video) should derive from this class.

  RTP Base Audio Payloader Class (GstBaseRTPAudioPayload)
  -------------------------------------------------------

  This base class can be tested through it's children classes. Here is an
  example using the iLBC payloader (frame based).

  For 20ms mode :

  GST_DEBUG="basertpaudiopayload:5" gst-launch-0.10 fakesrc sizetype=2
  sizemax=114 datarate=1900 ! audio/x-iLBC, mode=20 !  rtpilbcpay
  max-ptime="40000000" ! fakesink

  For 30ms mode :

  GST_DEBUG="basertpaudiopayload:5" gst-launch-0.10 fakesrc sizetype=2
  sizemax=150 datarate=1662 ! audio/x-iLBC, mode=30 !  rtpilbcpay
  max-ptime="60000000" ! fakesink

  Here is an example using the uLaw payloader (sample based).

  GST_DEBUG="basertpaudiopayload:5" gst-launch-0.10 fakesrc sizetype=2
  sizemax=150 datarate=8000 ! audio/x-mulaw ! rtppcmupay max-ptime="6000000" !
  fakesink

  RTP Base Depayloader Class (GstBaseRTPDepayload)
  ------------------------------------------------

  All RTP depayloader elements (audio or video) should derive from this class.