gstreamer/gst/rtpmanager
Havard Graff 63c7a9ae43 rtpjitterbuffer: don't send multiple instant RTX for the same packet
Due to us not properly acknowleding the time when the last RTX was sent
when scheduling a new one, it can easily happen that due to the packet
you are requesting have a PTS that is slightly old (but not too old when
adding the latency of the jitterbuffer), both its calculated second and
third (etc.) timeout could already have passed. This would lead to a burst
of RTX requests, which acts completely against its purpose, potentially
spending a lot more bandwidth than needed.

This has been properly reproduced in the test:
test_rtx_not_bursting_requests

The good news is that slightly re-thinking the logic concerning
re-requesting RTX, made it a lot simpler to understand, and allows us
to remove two members of the RtpTimer which no longer serves any purpose
due to the refactoring. If desirable the whole "delay" concept can actually
be removed completely from the timers, and simply just added to the timeout
by the caller of the API. But that can be a change for a another time.

The only external change (other than the improved behavior around bursting
RTX) is that the "delay" field now stricly represents the delay between
the PTS of the RTX-requested packet and the time it is requested on,
whereas before this calculation was more about the theoretical calculated
delay. This is visible in three other RTX-tests where the delay had
to be adjusted slightly. I am confident however that this change is
correct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/789>
2020-10-28 01:22:24 +01:00
..
gstrtpbin.c rtpbin: Add clear-ssrc action 2020-10-16 16:45:56 +00:00
gstrtpbin.h rtpbin: Add clear-ssrc action 2020-10-16 16:45:56 +00:00
gstrtpdtmfmux.c docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
gstrtpdtmfmux.h rtpmux: Fix FSF address 2012-12-16 16:36:39 +00:00
gstrtpfunnel.c rtpfunnel: Also forward custom sticky event 2020-10-06 20:57:49 +00:00
gstrtpfunnel.h rtpfunnel: Stop using G_DECLARE_FINAL_TYPE 2018-11-13 00:37:11 +01:00
gstrtpjitterbuffer.c rtpjitterbuffer: don't send multiple instant RTX for the same packet 2020-10-28 01:22:24 +01:00
gstrtpjitterbuffer.h rtpjitterbuffer: small optimizations 2014-04-29 16:21:44 +02:00
gstrtpmanager.c rtpmanager: implement SMPTE 2022-1 FEC encoder 2020-10-08 22:22:18 +00:00
gstrtpmux.c docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
gstrtpmux.h doc: Fix some docstrings 2019-05-13 17:00:00 -04:00
gstrtpptdemux.c rtpptdemux: set payload to caps inside gst_rtp_pt_demux_get_caps 2020-02-11 18:39:22 +00:00
gstrtpptdemux.h documentation: fix a number of typos 2019-10-05 22:38:11 +00:00
gstrtprtxqueue.c doc: fix element section documentations 2019-05-25 16:57:31 +02:00
gstrtprtxqueue.h rtprtxqueue: implement handling of the max-size-time property 2017-04-11 09:44:33 +03:00
gstrtprtxreceive.c documentation: fix a number of typos 2019-10-05 22:38:11 +00:00
gstrtprtxreceive.h rtprtxreceive: Wait until timeout to clear association requests 2014-05-04 22:36:59 -04:00
gstrtprtxsend.c rtprtxsend: allow generic input caps 2020-01-28 15:44:13 +00:00
gstrtprtxsend.h rtprtxsend: allow generic input caps 2020-01-28 15:44:13 +00:00
gstrtpsession.c rtpmanager: Improve readability of "stats" docs by making the fields an actual list 2020-08-13 07:24:17 +00:00
gstrtpsession.h rtpsession: use the correct segment seqnum 2019-02-04 13:14:37 +00:00
gstrtpssrcdemux.c rtpssrcdemux: Handle RTCP APP packets 2020-02-11 15:12:07 +01:00
gstrtpssrcdemux.h rtpssrcdemux: introduce max-streams property 2020-02-11 15:10:12 +01:00
gstrtpst2022-1-fecdec.c rtpmanager: implement SMPTE 2022-1 FEC decoder 2020-10-08 22:22:18 +00:00
gstrtpst2022-1-fecdec.h rtpmanager: implement SMPTE 2022-1 FEC decoder 2020-10-08 22:22:18 +00:00
gstrtpst2022-1-fecenc.c rtpst2022-1-fecenc: fix input seqnum check 2020-10-14 14:30:34 +02:00
gstrtpst2022-1-fecenc.h rtpmanager: implement SMPTE 2022-1 FEC encoder 2020-10-08 22:22:18 +00:00
meson.build rtpmanager: implement SMPTE 2022-1 FEC encoder 2020-10-08 22:22:18 +00:00
rtpjitterbuffer.c rtpjitterbuffer: Properly free internal packets queue in finalize() 2020-04-22 10:28:30 -04:00
rtpjitterbuffer.h rtpjitterbuffer: Properly free internal packets queue in finalize() 2020-04-22 10:28:30 -04:00
rtpsession.c rtpmanager: Improve readability of "stats" docs by making the fields an actual list 2020-08-13 07:24:17 +00:00
rtpsession.h rtpmanager: Google Transport-Wide Congestion Control RTP Extension 2020-02-14 10:09:02 +00:00
rtpsource.c rtpmanager: Improve readability of "stats" docs by making the fields an actual list 2020-08-13 07:24:17 +00:00
rtpsource.h rtpsession: Send as many nack seqnum as possible 2019-04-05 14:53:09 +00:00
rtpstats.c rtpstats: guard against division by zero 2020-06-26 15:29:25 +00:00
rtpstats.h rtpmanager: Google Transport-Wide Congestion Control RTP Extension 2020-02-14 10:09:02 +00:00
rtptimerqueue.c rtpjitterbuffer: don't send multiple instant RTX for the same packet 2020-10-28 01:22:24 +01:00
rtptimerqueue.h rtpjitterbuffer: don't send multiple instant RTX for the same packet 2020-10-28 01:22:24 +01:00
rtptwcc.c rtptwcc: fix pruning of ack'ed twcc-packets 2020-06-26 12:53:07 +01:00
rtptwcc.h rtpmanager: fix "redefinition of typedef RTPTWCCManager" compiler warning 2020-07-20 18:20:59 +01:00