How do I know when the GMainLoop has started running?
Stefan Sauer
ensonic at hora-obscura.de
Mon Jun 18 08:34:15 PDT 2012
On 06/18/2012 01:21 PM, tanmay.ambre wrote:
> My GMainLoop starts and runs in a new thread.
>
> GMainLoop* main_loop;
>
> void start()
> {
> main_loop= g_main_loop_new (NULL, FALSE);///Creating a main loop
> /***
> ----
> ---Pipeline creation and initialization
> ****/
> bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline_sound_capture));
> gst_bus_add_watch(bus, *bus_call, main_loop);
> gst_object_unref (bus);
>
> g_main_loop_run (main_loop);///The main loop starts running
> /////Unreffing the pipeline
> /////
>
> }
>
>
> To stop my main loop I am using
> g_main_loop_quit(m_loop)
>
> My question is what signal I should intercept to know m main loop is
> running?
> If i call g_main_loop_quit(m_loop)
> before g_main_loop_run (main_loop)
> the quit command never executes.
This is not gstreamer related. Anyway you can check using
g_main_loop_is_running().
Stefan
>
> Any help ?
>
> Tanmay Ambre
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-do-I-know-when-the-GMainLoop-has-started-running-tp4655313.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list