icles: print better error and warning messages

--
This commit is contained in:
Wim Taymans 2009-03-18 10:45:50 +01:00
parent 108ead73c8
commit 6174a2643c

View file

@ -48,13 +48,31 @@ bus_message (GstBus * bus, GstMessage * message, App * app)
switch (GST_MESSAGE_TYPE (message)) {
case GST_MESSAGE_ERROR:
g_error ("received error");
{
GError *gerror;
gchar *debug;
gst_message_parse_error (message, &gerror, &debug);
gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
g_error_free (gerror);
g_free (debug);
g_main_loop_quit (app->loop);
break;
}
case GST_MESSAGE_WARNING:
g_error ("received error");
{
GError *gerror;
gchar *debug;
gst_message_parse_warning (message, &gerror, &debug);
gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
g_error_free (gerror);
g_free (debug);
g_main_loop_quit (app->loop);
break;
}
case GST_MESSAGE_EOS:
g_message ("received EOS");
g_main_loop_quit (app->loop);