How do I know when the GMainLoop has started running?

tanmay.ambre ambre.tanmay at gmail.com
Mon Jun 18 04:21:17 PDT 2012


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.

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.


More information about the gstreamer-devel mailing list