From 80702884f060e34eb8791970d9754c4242e6a39e Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 22 Aug 2013 10:51:49 -0400 Subject: [PATCH] validate: Print state changes to help debugging --- validate/tools/gst-validate.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/validate/tools/gst-validate.c b/validate/tools/gst-validate.c index e666aa0217..4f31f3a605 100644 --- a/validate/tools/gst-validate.c +++ b/validate/tools/gst-validate.c @@ -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;