[gst-cvs] gst-plugins-base: Print the errors more clearly
Wim Taymans
wtay at kemper.freedesktop.org
Wed Feb 25 02:08:30 PST 2009
Module: gst-plugins-base
Branch: master
Commit: 4d30e3ff2c8872cc80f8dd77e26edb8ac4c979a0
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=4d30e3ff2c8872cc80f8dd77e26edb8ac4c979a0
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Wed Feb 25 11:07:20 2009 +0100
Print the errors more clearly
Print some more verbose messages when dealing with errors.
---
tests/icles/stress-playbin.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/tests/icles/stress-playbin.c b/tests/icles/stress-playbin.c
index 26bf83a..16c628b 100644
--- a/tests/icles/stress-playbin.c
+++ b/tests/icles/stress-playbin.c
@@ -25,7 +25,25 @@ play_file (const gchar * bin, const gint delay, const gchar * uri)
msg = gst_bus_poll (GST_ELEMENT_BUS (play),
GST_MESSAGE_ERROR | GST_MESSAGE_EOS, wait_nanosecs);
if (msg) {
- g_printerr ("Got %s messge\n", GST_MESSAGE_TYPE_NAME (msg));
+ switch (GST_MESSAGE_TYPE (msg)) {
+ case GST_MESSAGE_ERROR:
+ {
+ GError *gerror;
+ gchar *debug;
+
+ gst_message_parse_error (msg, &gerror, &debug);
+ gst_object_default_error (GST_MESSAGE_SRC (msg), gerror, debug);
+ g_error_free (gerror);
+ g_free (debug);
+ break;
+ }
+ case GST_MESSAGE_EOS:
+ g_printerr ("Got EOS\n");
+ break;
+ default:
+ g_printerr ("Got unexpected %s messge\n", GST_MESSAGE_TYPE_NAME (msg));
+ break;
+ }
gst_message_unref (msg);
goto next;
}
More information about the Gstreamer-commits
mailing list