From 0d9293845080be6d0bc738e4f00a89f0f8388a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 10 Feb 2010 10:34:24 +0100 Subject: [PATCH] shapewipe: Print some more details on error/warning messages --- tests/examples/shapewipe/shapewipe-example.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/examples/shapewipe/shapewipe-example.c b/tests/examples/shapewipe/shapewipe-example.c index 1179aab3c2..14df6dd3ba 100644 --- a/tests/examples/shapewipe/shapewipe-example.c +++ b/tests/examples/shapewipe/shapewipe-example.c @@ -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;