gst/: Fix wrong order of args in GST_CLOCK_DIFF() usage.

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.
This commit is contained in:
Stefan Kost 2007-11-28 12:52:42 +00:00
parent ddb7cc2763
commit c437e3b4e2
4 changed files with 15 additions and 6 deletions

View file

@ -1,3 +1,12 @@
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:

View 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);

View 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",

View 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);
}