[gst-devel] When not using the default GMainContext

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Jun 2 14:36:13 CEST 2009


On Tue, 2009-06-02 at 13:57 +0200, Julien Isorce wrote:

> ( 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); 
> )

Just to be sure, you need at least GStremaer core 0.10.22 for custom
main context bus watches to work (before, it would only wake up the
default glib main context when a message arrived).

Cheers
 -Tim






More information about the gstreamer-devel mailing list