From 6d8ff8a92a36b7a6b6c1bda31ad0ca09bd10f1fc Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 19 Mar 2014 17:43:43 +0100 Subject: [PATCH] tools:validate: Start printing position on ASYNC_DONE As this is what is done in the scenarios. --- validate/tools/gst-validate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/validate/tools/gst-validate.c b/validate/tools/gst-validate.c index fb3322a070..e02d3e96b6 100644 --- a/validate/tools/gst-validate.c +++ b/validate/tools/gst-validate.c @@ -104,6 +104,11 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) case GST_MESSAGE_EOS: g_main_loop_quit (loop); break; + case GST_MESSAGE_ASYNC_DONE: + if (print_pos_srcid == 0) + print_pos_srcid = + g_timeout_add (50, (GSourceFunc) print_position, NULL); + break; case GST_MESSAGE_STATE_CHANGED: if (GST_MESSAGE_SRC (message) == GST_OBJECT (pipeline)) { GstState oldstate, newstate, pending; @@ -117,9 +122,6 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data) gst_element_state_get_name (pending)); if (newstate == GST_STATE_PLAYING) { - if (print_pos_srcid == 0) - print_pos_srcid = - g_timeout_add (50, (GSourceFunc) print_position, NULL); GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline), GST_DEBUG_GRAPH_SHOW_ALL, "gst-validate.playing"); }