tools/gst-launch.c: Better message printout.
authorWim Taymans <wim.taymans@gmail.com>
Sat, 8 Oct 2005 09:38:19 +0000 (09:38 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Sat, 8 Oct 2005 09:38:19 +0000 (09:38 +0000)
Original commit message from CVS:
* tools/gst-launch.c: (event_loop):
Better message printout.

ChangeLog
tools/gst-launch.c

index afc953d..a452475 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-10-08  Wim Taymans  <wim@fluendo.com>
 
+       * tools/gst-launch.c: (event_loop):
+       Better message printout.
+
+2005-10-08  Wim Taymans  <wim@fluendo.com>
+
        * gst/gstbin.c: (gst_bin_child_proxy_get_child_by_index),
        (gst_bin_child_proxy_get_children_count):
        * gst/gstchildproxy.c: (gst_child_proxy_get_child_by_name),
index 301351f..6f2d42d 100644 (file)
@@ -377,14 +377,18 @@ event_loop (GstElement * pipeline, gboolean blocking)
       const GstStructure *s;
 
       s = gst_message_get_structure (message);
-      g_print (_("Got Message from element \"%s\"\n"),
-          GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))));
+
+      g_print (_("Got Message from element \"%s\" (%s): "),
+          GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))),
+          gst_message_type_get_name (GST_MESSAGE_TYPE (message)));
       if (s) {
         gchar *sstr;
 
         sstr = gst_structure_to_string (s);
         g_print ("%s\n", sstr);
         g_free (sstr);
+      } else {
+        g_print ("no message details\n");
       }
     }