"frequency", G_TYPE_UINT, priv->rtx_retry_timeout,
"period", G_TYPE_UINT, priv->rtx_retry_period,
"deadline", G_TYPE_UINT, priv->latency_ms,
- "packet-spacing", G_TYPE_UINT64, priv->packet_spacing, NULL));
+ "packet-spacing", G_TYPE_UINT64, priv->packet_spacing,
+ "avg-rtt", G_TYPE_UINT, GST_TIME_AS_MSECONDS (priv->avg_rtx_rtt),
+ NULL));
priv->num_rtx_requests++;
timer->num_rtx_retry++;
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++;
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;