mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
jitterbuffer: fix types of the retransmission event
This commit is contained in:
parent
dd4af0d11c
commit
454d75951e
2 changed files with 18 additions and 8 deletions
|
@ -2204,9 +2204,9 @@ do_expected_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer,
|
||||||
gst_structure_new ("GstRTPRetransmissionRequest",
|
gst_structure_new ("GstRTPRetransmissionRequest",
|
||||||
"seqnum", G_TYPE_UINT, (guint) timer->seqnum,
|
"seqnum", G_TYPE_UINT, (guint) timer->seqnum,
|
||||||
"running-time", G_TYPE_UINT64, timer->rtx_base,
|
"running-time", G_TYPE_UINT64, timer->rtx_base,
|
||||||
"delay", G_TYPE_UINT64, timer->rtx_retry,
|
"delay", G_TYPE_UINT, GST_TIME_AS_MSECONDS (timer->rtx_retry),
|
||||||
"frequency", G_TYPE_INT, priv->rtx_retry_timeout,
|
"frequency", G_TYPE_UINT, priv->rtx_retry_timeout,
|
||||||
"period", G_TYPE_INT, priv->rtx_retry_period,
|
"period", G_TYPE_UINT, priv->rtx_retry_period,
|
||||||
"deadline", G_TYPE_UINT, priv->latency_ms,
|
"deadline", G_TYPE_UINT, priv->latency_ms,
|
||||||
"packet-spacing", G_TYPE_UINT64, priv->packet_spacing, NULL));
|
"packet-spacing", G_TYPE_UINT64, priv->packet_spacing, NULL));
|
||||||
|
|
||||||
|
|
|
@ -1504,7 +1504,7 @@ gst_rtp_session_event_recv_rtp_src (GstPad * pad, GstObject * parent,
|
||||||
forward = FALSE;
|
forward = FALSE;
|
||||||
} else if (gst_structure_has_name (s, "GstRTPRetransmissionRequest")) {
|
} else if (gst_structure_has_name (s, "GstRTPRetransmissionRequest")) {
|
||||||
GstClockTime running_time;
|
GstClockTime running_time;
|
||||||
guint seqnum, delay, deadline;
|
guint seqnum, delay, deadline, max_delay;
|
||||||
|
|
||||||
if (!gst_structure_get_clock_time (s, "running-time", &running_time))
|
if (!gst_structure_get_clock_time (s, "running-time", &running_time))
|
||||||
running_time = -1;
|
running_time = -1;
|
||||||
|
@ -1512,13 +1512,23 @@ gst_rtp_session_event_recv_rtp_src (GstPad * pad, GstObject * parent,
|
||||||
ssrc = -1;
|
ssrc = -1;
|
||||||
if (!gst_structure_get_uint (s, "seqnum", &seqnum))
|
if (!gst_structure_get_uint (s, "seqnum", &seqnum))
|
||||||
seqnum = -1;
|
seqnum = -1;
|
||||||
if (!gst_structure_get_uint (s, "delay", &deadline))
|
if (!gst_structure_get_uint (s, "delay", &delay))
|
||||||
delay = -1;
|
delay = 0;
|
||||||
if (!gst_structure_get_uint (s, "deadline", &deadline))
|
if (!gst_structure_get_uint (s, "deadline", &deadline))
|
||||||
deadline = -1;
|
deadline = 100;
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
else
|
||||||
|
max_delay = 0;
|
||||||
|
|
||||||
if (rtp_session_request_nack (rtpsession->priv->session, ssrc, seqnum,
|
if (rtp_session_request_nack (rtpsession->priv->session, ssrc, seqnum,
|
||||||
(deadline - delay) * GST_MSECOND))
|
max_delay * GST_MSECOND))
|
||||||
forward = FALSE;
|
forward = FALSE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue