mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
rtpjitterbuffer: When request retransmissions for future packets, consider the packet spacing in the extra delay
We now take the maximum of 2*jitter and 0.5*packet_spacing for the extra delay. If jitter is very low, this should prevent unnecessary retransmission requests to some degree. https://bugzilla.gnome.org/show_bug.cgi?id=748041
This commit is contained in:
parent
3fe8ceff14
commit
edcc5be297
1 changed files with 6 additions and 4 deletions
|
@ -1889,11 +1889,13 @@ get_rtx_delay (GstRtpJitterBufferPrivate * priv)
|
||||||
GstClockTime delay;
|
GstClockTime delay;
|
||||||
|
|
||||||
if (priv->rtx_delay == -1) {
|
if (priv->rtx_delay == -1) {
|
||||||
if (priv->avg_jitter == 0)
|
if (priv->avg_jitter == 0 && priv->packet_spacing == 0) {
|
||||||
delay = DEFAULT_AUTO_RTX_DELAY;
|
delay = DEFAULT_AUTO_RTX_DELAY;
|
||||||
else
|
} else {
|
||||||
/* jitter is in nanoseconds, 2x jitter is a good margin */
|
/* jitter is in nanoseconds, maximum of 2x jitter and half the
|
||||||
delay = priv->avg_jitter * 2;
|
* packet spacing is a good margin */
|
||||||
|
delay = MAX (priv->avg_jitter * 2, priv->packet_spacing / 2);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
delay = priv->rtx_delay * GST_MSECOND;
|
delay = priv->rtx_delay * GST_MSECOND;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue