[0.11] gstreamer: debugutils: show if an element is state-locked

Wim Taymans wtay at kemper.freedesktop.org
Sun Oct 16 05:21:33 PDT 2011


Module: gstreamer
Branch: 0.11
Commit: 32b90e667d5af15f20d014f934598ea49fd06eea
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=32b90e667d5af15f20d014f934598ea49fd06eea

Author: Stefan Sauer <ensonic at users.sf.net>
Date:   Thu Oct 13 16:48:02 2011 +0200

debugutils: show if an element is state-locked

---

 gst/gstdebugutils.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gst/gstdebugutils.c b/gst/gstdebugutils.c
index a552cc0..e292ab9 100644
--- a/gst/gstdebugutils.c
+++ b/gst/gstdebugutils.c
@@ -81,7 +81,9 @@ debug_dump_get_element_state (GstElement * element)
 
   gst_element_get_state (element, &state, &pending, 0);
   if (pending == GST_STATE_VOID_PENDING) {
-    state_name = g_strdup_printf ("\\n[%c]", state_icons[state]);
+    gboolean is_locked = gst_element_is_locked_state (element);
+    state_name = g_strdup_printf ("\\n[%c]%s", state_icons[state],
+        (is_locked ? "(locked)" : ""));
   } else {
     state_name = g_strdup_printf ("\\n[%c] -> [%c]", state_icons[state],
         state_icons[pending]);



More information about the gstreamer-commits mailing list