mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
mxf-example: don't quit on Warning
Don't quit on Warning. Print out a message when there is an Error or Warning.
This commit is contained in:
parent
40b5f02dc6
commit
59db1789cf
1 changed files with 20 additions and 3 deletions
|
@ -122,11 +122,28 @@ static gboolean
|
||||||
bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
||||||
{
|
{
|
||||||
switch (GST_MESSAGE_TYPE (message)) {
|
switch (GST_MESSAGE_TYPE (message)) {
|
||||||
case GST_MESSAGE_WARNING:
|
case GST_MESSAGE_WARNING:{
|
||||||
case GST_MESSAGE_ERROR:
|
GError *err;
|
||||||
g_error ("Got error");
|
gchar *debug;
|
||||||
|
|
||||||
|
gst_message_parse_warning (message, &err, &debug);
|
||||||
|
g_print ("Warning: %s\n", err->message);
|
||||||
|
g_error_free (err);
|
||||||
|
g_free (debug);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case GST_MESSAGE_ERROR:{
|
||||||
|
GError *err;
|
||||||
|
gchar *debug = NULL;
|
||||||
|
|
||||||
|
gst_message_parse_error (message, &err, &debug);
|
||||||
|
g_print ("Error: %s : %s\n", err->message, debug);
|
||||||
|
g_error_free (err);
|
||||||
|
g_free (debug);
|
||||||
|
|
||||||
gtk_main_quit ();
|
gtk_main_quit ();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case GST_MESSAGE_TAG:{
|
case GST_MESSAGE_TAG:{
|
||||||
GstTagList *tags;
|
GstTagList *tags;
|
||||||
GValue v = { 0, };
|
GValue v = { 0, };
|
||||||
|
|
Loading…
Reference in a new issue