[gst-devel] When not using the default GMainContext
Wim Taymans
wim.taymans at gmail.com
Tue Jun 2 12:41:16 CEST 2009
On Tue, 2009-06-02 at 12:27 +0200, Julien Isorce wrote:
> Hi,
>
> I join to this mail a minimal test that reproduce a problem.
> The "end of stream" event is not handled by the bus_call callback,
> when not using the default GMainContext.
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
> I mean, I am doing :
>
> --------------------------
> context = g_main_context_new ();
> loop = g_main_loop_new (context, FALSE);
> g_main_context_unref (context);
>
> instead of :
>
> loop = g_main_loop_new (NULL, FALSE);
> ----------------------------
>
> Compiled with: gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10)
> main.c -o main
>
> (note that this is a minimal test, actually I am in a case where I
> have several GMainLoop and with a different GMainContext for each
> loop)
>
> Is it a gstreamer restriction (or bug) or I am using glib in a wrong
> way ?
>
> Sincerely
>
> Julien
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________ gstreamer-devel mailing list gstreamer-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list