Commit 2ea55aeb authored by Olivier Crête's avatar Olivier Crête
Browse files

Stop on bus errors

parent 20d962ab
......@@ -32,6 +32,35 @@ sigint_handler (gpointer user_data)
static gboolean
gst_bus_cb (GstBus * bus, GstMessage * message, gpointer data)
{
switch (GST_MESSAGE_TYPE(message)) {
case GST_MESSAGE_ERROR:
{
GError *gerr;
gchar *debug_msg;
gst_message_parse_error (message, &gerr, &debug_msg);
g_error ("Error: %s (%s)", gerr->message, debug_msg);
g_error_free (gerr);
g_free (debug_msg);
}
break;
case GST_MESSAGE_WARNING:
{
GError *gerr;
gchar *debug_msg;
gst_message_parse_error (message, &gerr, &debug_msg);
g_warning ("Error: %s (%s)", gerr->message, debug_msg);
g_error_free (gerr);
g_free (debug_msg);
}
break;
case GST_MESSAGE_EOS:
{
g_error ("Got EOS!!");
}
break;
default:
break;
}
return TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment