tools/gst-launch.c: Dump one graph per pipeline state-change and state change name...
authorStefan Kost <ensonic@users.sourceforge.net>
Tue, 5 Feb 2008 09:24:18 +0000 (09:24 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Tue, 5 Feb 2008 09:24:18 +0000 (09:24 +0000)
Original commit message from CVS:
* tools/gst-launch.c:
Dump one graph per pipeline state-change and state change name
(if GST_DEBUG_DUMP_DOT_DIR is set).

ChangeLog
tools/gst-launch.c

index a546d93..e9cefb8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-05  Stefan Kost  <ensonic@users.sf.net>
+
+       * tools/gst-launch.c:
+       Dump one graph per pipeline state-change and state change name
+       (if GST_DEBUG_DUMP_DOT_DIR is set).
+
 2008-02-04  Thijs Vermeir  <thijsvermeir@gmail.com>
 
        * gst/gstpad.c:
index 73efd78..72e13a6 100644 (file)
@@ -485,23 +485,19 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
 
         gst_message_parse_state_changed (message, &old, &new, &pending);
 
-        /* debug each state change
-           GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline), GST_DEBUG_GRAPH_SHOW_ALL, "gst-launch");
-         */
-
         /* we only care about pipeline state change messages */
         if (GST_MESSAGE_SRC (message) != GST_OBJECT_CAST (pipeline))
           break;
 
-        /* debug only overall state changes
-           {
-           gchar *dump_name;
-
-           dump_name = g_strdup_printf ("gst-launch.%s",gst_element_state_get_name (new);
-           GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline), GST_DEBUG_GRAPH_SHOW_ALL, dump_name);
-           g_free (dump_name);
-           }
-         */
+        /* dump graph for pipeline state changes */
+        {
+          gchar *dump_name = g_strdup_printf ("gst-launch.%s_%s",
+              gst_element_state_get_name (old),
+              gst_element_state_get_name (new));
+          GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
+              GST_DEBUG_GRAPH_SHOW_ALL, dump_name);
+          g_free (dump_name);
+        }
 
         /* ignore when we are buffering since then we mess with the states
          * ourselves. */