baseparse: Trace time with GST_TIME_FORAMT in gst_base_parse_convert_default().
authorZebediah Figura <zfigura@codeweavers.com>
Tue, 8 Feb 2022 01:33:31 +0000 (19:33 -0600)
committerZebediah Figura <zfigura@codeweavers.com>
Tue, 8 Feb 2022 01:33:31 +0000 (19:33 -0600)
Be consistent with how we trace time in general.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/374>

subprojects/gstreamer/libs/gst/base/gstbaseparse.c

index e6079f7..9e5a652 100644 (file)
@@ -1794,8 +1794,9 @@ gst_base_parse_convert_default (GstBaseParse * parse,
       GST_DEBUG_OBJECT (parse, "converting bytes -> time");
       *dest_value = gst_util_uint64_scale (src_value, duration, bytes);
       *dest_value *= GST_MSECOND;
-      GST_DEBUG_OBJECT (parse, "conversion result: %" G_GINT64_FORMAT " ms",
-          *dest_value / GST_MSECOND);
+      GST_DEBUG_OBJECT (parse,
+          "converted %" G_GINT64_FORMAT " bytes to %" GST_TIME_FORMAT,
+          src_value, GST_TIME_ARGS (*dest_value));
       ret = TRUE;
     } else {
       GST_DEBUG_OBJECT (parse, "converting bytes -> other not implemented");
@@ -1806,8 +1807,8 @@ gst_base_parse_convert_default (GstBaseParse * parse,
       *dest_value = gst_util_uint64_scale (src_value / GST_MSECOND, bytes,
           duration);
       GST_DEBUG_OBJECT (parse,
-          "time %" G_GINT64_FORMAT " ms in bytes = %" G_GINT64_FORMAT,
-          src_value / GST_MSECOND, *dest_value);
+          "converted %" GST_TIME_FORMAT " to %" G_GINT64_FORMAT " bytes",
+          GST_TIME_ARGS (src_value), *dest_value);
       ret = TRUE;
     } else {
       GST_DEBUG_OBJECT (parse, "converting time -> other not implemented");