diff options
author | Wim Taymans <wtaymans@redhat.com> | 2013-12-27 16:48:48 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2013-12-30 11:18:50 +0100 |
commit | 7181a21ca912f74ac2e11280ac09f50b14ee7919 (patch) | |
tree | e809d319a4c1ed47ccd6b6b158ed7aa2a2388d9c /gst/rtpmanager/gstrtpsession.c | |
parent | e996f73d0cc71311b6058f2ec8bc276dbb777e2b (diff) |
rtpsession: use RTT from the Retransmission event
Place the estimated RTT in the Retransmission event and let the session
manager use that instead of the hardcoded value.
Diffstat (limited to 'gst/rtpmanager/gstrtpsession.c')
-rw-r--r-- | gst/rtpmanager/gstrtpsession.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 4c9437ad0..f51b61353 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -1551,7 +1551,7 @@ gst_rtp_session_event_recv_rtp_src (GstPad * pad, GstObject * parent, forward = FALSE; } else if (gst_structure_has_name (s, "GstRTPRetransmissionRequest")) { GstClockTime running_time; - guint seqnum, delay, deadline, max_delay; + guint seqnum, delay, deadline, max_delay, avg_rtt; GST_RTP_SESSION_LOCK (rtpsession); rtpsession->priv->rtx_count++; @@ -1567,14 +1567,16 @@ gst_rtp_session_event_recv_rtp_src (GstPad * pad, GstObject * parent, delay = 0; if (!gst_structure_get_uint (s, "deadline", &deadline)) deadline = 100; + if (!gst_structure_get_uint (s, "avg-rtt", &avg_rtt)) + avg_rtt = 40; /* remaining time to receive the packet */ max_delay = deadline; if (max_delay > delay) max_delay -= delay; /* estimated RTT */ - if (max_delay > 40) - max_delay -= 40; + if (max_delay > avg_rtt) + max_delay -= avg_rtt; else max_delay = 0; |