rtpbasedepayload: condition the sending of gap events
authorMathieu Duponchelle <mathieu@centricular.com>
Fri, 6 Apr 2018 18:02:13 +0000 (20:02 +0200)
committerMathieu Duponchelle <mathieu@centricular.com>
Thu, 19 Apr 2018 14:39:06 +0000 (16:39 +0200)
commit84679395384071d17fe61cae556315eec7c31773
tree75f755c538c62ae7d525afa231ee14f1b792c3cc
parentd00e0b612dd1a8f9ad15aa78282defc8df21a86a
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
gst-libs/gst/rtp/gstrtpbasedepayload.c
tests/check/libs/rtpbasedepayload.c