mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 08:55:33 +00:00
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:
parent
ddb7cc2763
commit
c437e3b4e2
4 changed files with 15 additions and 6 deletions
|
@ -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>
|
2007-11-28 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* docs/gst/gstreamer-sections.txt:
|
* docs/gst/gstreamer-sections.txt:
|
||||||
|
|
|
@ -508,7 +508,7 @@ _gst_debug_bin_to_dot_file_with_ts (GstBin * bin, GstDebugGraphDetails details,
|
||||||
|
|
||||||
/* add timestamp */
|
/* add timestamp */
|
||||||
GST_GET_TIMESTAMP (now);
|
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 =
|
ts_file_name =
|
||||||
g_strdup_printf ("%" GST_TIME_FORMAT "-%s", GST_TIME_ARGS (elapsed),
|
g_strdup_printf ("%" GST_TIME_FORMAT "-%s", GST_TIME_ARGS (elapsed),
|
||||||
file_name);
|
file_name);
|
||||||
|
|
|
@ -666,7 +666,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_GET_TIMESTAMP (now);
|
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",
|
g_printerr ("%s (%p - %" GST_TIME_FORMAT ") %s%20s%s(%s%5d%s) %s%s(%d):%s:%s%s %s\n",
|
||||||
|
|
|
@ -747,7 +747,7 @@ main (int argc, char *argv[])
|
||||||
if (caught_error) {
|
if (caught_error) {
|
||||||
fprintf (stderr, _("ERROR: pipeline doesn't want to preroll.\n"));
|
fprintf (stderr, _("ERROR: pipeline doesn't want to preroll.\n"));
|
||||||
} else {
|
} else {
|
||||||
GTimeVal tfthen, tfnow;
|
GstClockTime tfthen, tfnow;
|
||||||
GstClockTimeDiff diff;
|
GstClockTimeDiff diff;
|
||||||
|
|
||||||
fprintf (stderr, _("Setting pipeline to PLAYING ...\n"));
|
fprintf (stderr, _("Setting pipeline to PLAYING ...\n"));
|
||||||
|
@ -773,11 +773,11 @@ main (int argc, char *argv[])
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_get_current_time (&tfthen);
|
GST_GET_TIMESTAMP (tfthen);
|
||||||
caught_error = event_loop (pipeline, TRUE, GST_STATE_PLAYING);
|
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);
|
g_print (_("Execution ended after %" G_GUINT64_FORMAT " ns.\n"), diff);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue