gst/: Fix wrong order of args in GST_CLOCK_DIFF() usage.
authorStefan Kost <ensonic@users.sourceforge.net>
Wed, 28 Nov 2007 12:52:42 +0000 (12:52 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Wed, 28 Nov 2007 12:52:42 +0000 (12:52 +0000)
Original commit message from CVS:
* gst/gstdebugutils.c:
* gst/gstinfo.c:
Fix wrong order of args in GST_CLOCK_DIFF() usage.
* tools/gst-launch.c:
Use new API to get elapsed time.

ChangeLog
gst/gstdebugutils.c
gst/gstinfo.c
tools/gst-launch.c

index 76b4502..f7ff860 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2007-11-28  Stefan Kost  <ensonic@users.sf.net>
 
+       * gst/gstdebugutils.c:
+       * gst/gstinfo.c:
+         Fix wrong order of args in GST_CLOCK_DIFF() usage.
+
+       * tools/gst-launch.c:
+         Use new API to get elapsed time.
+
+2007-11-28  Stefan Kost  <ensonic@users.sf.net>
+
        * docs/gst/gstreamer-sections.txt:
        * gst/gstclock.h:
        * gst/gstdebugutils.c:
index 02b17e1..0927eee 100644 (file)
@@ -508,7 +508,7 @@ _gst_debug_bin_to_dot_file_with_ts (GstBin * bin, GstDebugGraphDetails details,
 
   /* add timestamp */
   GST_GET_TIMESTAMP (now);
-  elapsed = GST_CLOCK_DIFF (now, _priv_gst_info_start_time);
+  elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time, now);
   ts_file_name =
       g_strdup_printf ("%" GST_TIME_FORMAT "-%s", GST_TIME_ARGS (elapsed),
       file_name);
index 45ac95e..0ca3346 100644 (file)
@@ -666,7 +666,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
   }
 
   GST_GET_TIMESTAMP (now);
-  elapsed = GST_CLOCK_DIFF (now, _priv_gst_info_start_time);
+  elapsed = GST_CLOCK_DIFF (_priv_gst_info_start_time, now);
 
   /*
      g_printerr ("%s (%p - %" GST_TIME_FORMAT ") %s%20s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n",
index cedc624..01c92ec 100644 (file)
@@ -747,7 +747,7 @@ main (int argc, char *argv[])
     if (caught_error) {
       fprintf (stderr, _("ERROR: pipeline doesn't want to preroll.\n"));
     } else {
-      GTimeVal tfthen, tfnow;
+      GstClockTime tfthen, tfnow;
       GstClockTimeDiff diff;
 
       fprintf (stderr, _("Setting pipeline to PLAYING ...\n"));
@@ -773,11 +773,11 @@ main (int argc, char *argv[])
         goto end;
       }
 
-      g_get_current_time (&tfthen);
+      GST_GET_TIMESTAMP (tfthen);
       caught_error = event_loop (pipeline, TRUE, GST_STATE_PLAYING);
-      g_get_current_time (&tfnow);
+      GST_GET_TIMESTAMP (tfnow);
 
-      diff = GST_TIMEVAL_TO_TIME (tfnow) - GST_TIMEVAL_TO_TIME (tfthen);
+      diff = GST_CLOCK_DIFF (tfthen, tfnow);
 
       g_print (_("Execution ended after %" G_GUINT64_FORMAT " ns.\n"), diff);
     }