mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
mxf-example: make bus_callback consistent
Simplify the bus_callback to make it consisten with other examples.
This commit is contained in:
parent
4e45b86ed8
commit
7d058c8523
1 changed files with 4 additions and 4 deletions
|
@ -124,8 +124,8 @@ insert_structure (const GstStructure * s, GtkTreeIter * iter)
|
||||||
gst_structure_foreach (s, insert_field, iter);
|
gst_structure_foreach (s, insert_field, iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
on_message (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:
|
||||||
|
@ -160,6 +160,7 @@ on_message (GstBus * bus, GstMessage * message, gpointer data)
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -212,8 +213,7 @@ main (int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
bus = gst_element_get_bus (pipeline);
|
bus = gst_element_get_bus (pipeline);
|
||||||
gst_bus_add_signal_watch (bus);
|
gst_bus_add_watch (bus, bus_callback, NULL);
|
||||||
g_signal_connect (bus, "message", G_CALLBACK (on_message), NULL);
|
|
||||||
gst_object_unref (bus);
|
gst_object_unref (bus);
|
||||||
|
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
|
Loading…
Reference in a new issue