[MOVED FROM BAD 26/29] shapewipe: Print some more details on error/warning messages
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 10 Feb 2010 09:34:24 +0000 (10:34 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 12 Feb 2010 10:12:35 +0000 (11:12 +0100)
tests/examples/shapewipe/shapewipe-example.c

index 1179aab..14df6dd 100644 (file)
@@ -27,14 +27,26 @@ on_message (GstBus * bus, GstMessage * message, gpointer user_data)
   GMainLoop *loop = (GMainLoop *) user_data;
 
   switch (GST_MESSAGE_TYPE (message)) {
-    case GST_MESSAGE_ERROR:
+    case GST_MESSAGE_ERROR:{
+      GError *err = NULL;
+      gchar *debug = NULL;
+
       g_warning ("Got ERROR");
+      gst_message_parse_error (message, &err, &debug);
+      g_warning ("%s: %s", err->message, debug);
       g_main_loop_quit (loop);
       break;
-    case GST_MESSAGE_WARNING:
+    }
+    case GST_MESSAGE_WARNING:{
+      GError *err = NULL;
+      gchar *debug = NULL;
+
       g_warning ("Got WARNING");
+      gst_message_parse_error (message, &err, &debug);
+      g_warning ("%s: %s", err->message, debug);
       g_main_loop_quit (loop);
       break;
+    }
     case GST_MESSAGE_EOS:
       g_main_loop_quit (loop);
       break;