rtpjitterbuffer: More logging when calculating rfc7273 timestamps
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 6 Apr 2021 11:32:34 +0000 (17:02 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Fri, 9 Apr 2021 07:18:02 +0000 (12:48 +0530)
This code can be fragile, since it is very exacting in the timestamps
that it will accept. Add more logging so it's easier to debug issues
and figure out whether it's a bug in the calculation or something
wrong in the incoming buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/934>

gst/rtpmanager/rtpjitterbuffer.c

index 6ef7df2..aef5cbc 100644 (file)
@@ -919,8 +919,14 @@ rtp_jitter_buffer_calculate_pts (RTPJitterBuffer * jbuf, GstClockTime dts,
     else
       pts = 0;
 
-    GST_DEBUG ("RFC7273 clock time %" GST_TIME_FORMAT ", out %" GST_TIME_FORMAT,
-        GST_TIME_ARGS (rtpsystime), GST_TIME_ARGS (pts));
+    GST_DEBUG ("RFC7273 clock time %" GST_TIME_FORMAT ", ntptime %"
+        GST_TIME_FORMAT ", ntprtptime %" G_GUINT64_FORMAT ", rtptime %"
+        G_GUINT32_FORMAT ", base_time %" GST_TIME_FORMAT ", internal %"
+        GST_TIME_FORMAT ", external %" GST_TIME_FORMAT ", out %"
+        GST_TIME_FORMAT, GST_TIME_ARGS (rtpsystime), GST_TIME_ARGS (ntptime),
+        ntprtptime, rtptime, GST_TIME_ARGS (base_time),
+        GST_TIME_ARGS (internal), GST_TIME_ARGS (external),
+        GST_TIME_ARGS (pts));
   } else {
     /* If we used the RFC7273 clock before and not anymore,
      * we need to resync it later again */