mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
tools:validate: Start printing position on ASYNC_DONE
As this is what is done in the scenarios.
This commit is contained in:
parent
12ccebe0a9
commit
6d8ff8a92a
1 changed files with 5 additions and 3 deletions
|
@ -104,6 +104,11 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
||||||
case GST_MESSAGE_EOS:
|
case GST_MESSAGE_EOS:
|
||||||
g_main_loop_quit (loop);
|
g_main_loop_quit (loop);
|
||||||
break;
|
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:
|
case GST_MESSAGE_STATE_CHANGED:
|
||||||
if (GST_MESSAGE_SRC (message) == GST_OBJECT (pipeline)) {
|
if (GST_MESSAGE_SRC (message) == GST_OBJECT (pipeline)) {
|
||||||
GstState oldstate, newstate, pending;
|
GstState oldstate, newstate, pending;
|
||||||
|
@ -117,9 +122,6 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
||||||
gst_element_state_get_name (pending));
|
gst_element_state_get_name (pending));
|
||||||
|
|
||||||
if (newstate == GST_STATE_PLAYING) {
|
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_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
|
||||||
GST_DEBUG_GRAPH_SHOW_ALL, "gst-validate.playing");
|
GST_DEBUG_GRAPH_SHOW_ALL, "gst-validate.playing");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue