validate: Print state changes to help debugging

This commit is contained in:
Thibault Saunier 2013-08-22 10:51:49 -04:00 committed by Thiago Santos
parent 1dd93bea2a
commit 80702884f0

View file

@ -73,6 +73,20 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data)
}
case GST_MESSAGE_EOS:
g_main_loop_quit (loop);
break;
case GST_MESSAGE_STATE_CHANGED:
if (GST_MESSAGE_SRC (message) == GST_OBJECT (pipeline)) {
GstState oldstate, newstate, pending;
gst_message_parse_state_changed (message, &oldstate, &newstate,
&pending);
GST_DEBUG ("State changed (old: %s, new: %s, pending: %s)",
gst_element_state_get_name (oldstate),
gst_element_state_get_name (newstate),
gst_element_state_get_name (pending));
}
break;
default:
break;