mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
jitterbuffer: push retransmission events
This commit is contained in:
parent
b7ddd75fbc
commit
cd0164f4cc
1 changed files with 17 additions and 2 deletions
|
@ -93,7 +93,7 @@ enum
|
||||||
#define DEFAULT_RTX_DELAY 20
|
#define DEFAULT_RTX_DELAY 20
|
||||||
#define DEFAULT_RTX_DELAY_REORDER 3
|
#define DEFAULT_RTX_DELAY_REORDER 3
|
||||||
#define DEFAULT_RTX_RETRY_TIMEOUT 40
|
#define DEFAULT_RTX_RETRY_TIMEOUT 40
|
||||||
#define DEFAULT_RTX_RETRY_PERIOD 200
|
#define DEFAULT_RTX_RETRY_PERIOD 160
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -2154,9 +2154,24 @@ do_expected_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer,
|
||||||
GstClockTimeDiff clock_jitter)
|
GstClockTimeDiff clock_jitter)
|
||||||
{
|
{
|
||||||
GstRtpJitterBufferPrivate *priv = jitterbuffer->priv;
|
GstRtpJitterBufferPrivate *priv = jitterbuffer->priv;
|
||||||
|
GstEvent *event;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (jitterbuffer, "expected %d didn't arrive", timer->seqnum);
|
GST_DEBUG_OBJECT (jitterbuffer, "expected %d didn't arrive", timer->seqnum);
|
||||||
|
|
||||||
|
event = gst_event_new_custom (GST_EVENT_CUSTOM_DOWNSTREAM,
|
||||||
|
gst_structure_new ("GstRTPRetransmissionRequest",
|
||||||
|
"seqnum", G_TYPE_UINT, (guint) timer->seqnum,
|
||||||
|
"running-time", G_TYPE_UINT64, timer->rtx_base,
|
||||||
|
"delay", G_TYPE_UINT64, timer->rtx_retry,
|
||||||
|
"frequency", G_TYPE_INT, priv->rtx_retry_timeout,
|
||||||
|
"period", G_TYPE_INT, priv->rtx_retry_period,
|
||||||
|
"deadline", G_TYPE_UINT, priv->latency_ms,
|
||||||
|
"packet-spacing", G_TYPE_UINT64, priv->packet_spacing, NULL));
|
||||||
|
|
||||||
|
JBUF_UNLOCK (priv);
|
||||||
|
gst_pad_push_event (priv->srcpad, event);
|
||||||
|
JBUF_LOCK (priv);
|
||||||
|
|
||||||
timer->rtx_retry += (priv->rtx_retry_timeout * GST_MSECOND);
|
timer->rtx_retry += (priv->rtx_retry_timeout * GST_MSECOND);
|
||||||
if (timer->rtx_retry > (priv->rtx_retry_period * GST_MSECOND))
|
if (timer->rtx_retry > (priv->rtx_retry_period * GST_MSECOND))
|
||||||
remove_timer (jitterbuffer, timer);
|
remove_timer (jitterbuffer, timer);
|
||||||
|
@ -2164,7 +2179,7 @@ do_expected_timeout (GstRtpJitterBuffer * jitterbuffer, TimerData * timer,
|
||||||
reschedule_timer (jitterbuffer, timer, timer->seqnum,
|
reschedule_timer (jitterbuffer, timer, timer->seqnum,
|
||||||
timer->rtx_base + timer->rtx_retry);
|
timer->rtx_base + timer->rtx_retry);
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return priv->srcresult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* a packet is lost */
|
/* a packet is lost */
|
||||||
|
|
Loading…
Reference in a new issue