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:
/* 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);
}
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",
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"));
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);
}