[Bug 711412] rtpjitterbuffer: Automatically calculate RTX properties based on RTT

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Dec 10 06:49:09 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=711412
  GStreamer | gst-plugins-good | unspecified

Wim Taymans <wim.taymans> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #263900|none                        |needs-work
             status|                            |

--- Comment #10 from Wim Taymans <wim.taymans at gmail.com> 2013-12-10 14:49:07 UTC ---
(From update of attachment 263900)
>+
>+    if (priv->rtx_delay == DEFAULT_RTX_DELAY) {
>+      if (priv->jitter == DEFAULT_JITTER)
>+        delay = DEFAULT_AUTO_RTX_DELAY * GST_MSECOND;
>+      else
>+        delay = priv->jitter * 2 * GST_MSECOND;
>+    } else {
>+      delay = priv->rtx_delay * GST_MSECOND;
>+    }

Here you expect the jitter to be expressed in milliseconds

>+static void
>+calculate_jitter (GstRtpJitterBuffer * jitterbuffer, guint8 pt, guint32 dts,
>+    guint rtptime)
>+{
>+  guint32 rtparrival, transit;
>+  gint32 diff;
>+  GstRtpJitterBufferPrivate *priv;
>+
>+  priv = jitterbuffer->priv;
>+
>+  if (G_UNLIKELY (dts == GST_CLOCK_TIME_NONE))
>+    goto no_time;
>+
>+  rtparrival = gst_util_uint64_scale_int (dts, priv->clock_rate, GST_SECOND);
>+
>+  transit = rtparrival - rtptime;
>+
>+  if (G_UNLIKELY (priv->transit != -1)) {
>+    if (transit > priv->transit)
>+      diff = transit - priv->transit;
>+    else
>+      diff = priv->transit - transit;
>+  } else
>+    diff = 0;
>+
>+  priv->transit = transit;
>+
>+  priv->jitter += diff - ((priv->jitter + 8) >> 4);
>+  priv->prev_rtptime = priv->last_rtptime;
>+  priv->last_rtptime = rtparrival;

And here you calculate jitter expressed in clock-rate.

>+
>+  if (priv->rtx_retry_period == DEFAULT_RTX_RETRY_PERIOD) {
>+    if (priv->avg_rtx_rtt == 0)
>+      calculated_period = DEFAULT_AUTO_RTX_PERIOD;
>+    else
>+      calculated_period = priv->avg_rtx_rtt * priv->jbuf->window_size;
>+  } else {
>+    calculated_period = priv->rtx_retry_period;
>+  }

window-size is not related to this. It needs to use something related to
the size of the jitterbuffer.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list