[gst-devel] When not using the default GMainContext
Julien Isorce
julien.isorce at gmail.com
Tue Jun 2 13:57:20 CEST 2009
2009/6/2 Wim Taymans <wim.taymans at gmail.com>
>
> gst_bus_add_watch() adds a watch to the default context.
>
> use
>
> source = gst_bus_create_watch(bus);
>
> and
> g_source_attach (source, context);
>
> To attach the source do a different context.
>
> Wim
>
Thx a lot. Next time I go into GstBus doc.
( now I am doing:
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
gsource = gst_bus_create_watch (bus);
g_source_set_priority (gsource, G_PRIORITY_DEFAULT);
g_source_set_callback (gsource, (GSourceFunc) gst_bus_async_signal_func,
loop, NULL);
g_signal_connect(bus, "message::error", G_CALLBACK (bus_call), loop);
g_signal_connect(bus, "message::warning", G_CALLBACK (bus_call), loop);
g_signal_connect(bus, "message::eos", G_CALLBACK (bus_call), loop);
g_source_attach (gsource, context);
g_source_unref (gsource);
gst_object_unref (bus);
)
Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090602/e6484808/attachment.htm>
More information about the gstreamer-devel
mailing list