Hi I have a program with its own main 'while' loop that must be executed for my program to work.
I wish to add also a g_main_loop_run (loop) so that I can monitor gstreamer event messages as in :http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html Is it possible to have two loops running in my program. I have tried adding the code to let me monitor messages but I can't seem to get it to work. (i.e. I cant seem to get any messages in my bus_call function) I guess my question is: Can I have a g_main_loop_run as well as my own while loop? Or will g_main_loop_run block my program? Thanks |
If you already have your own loop running, just periodically check
gst_bus_have_pending () and call gst_bus_pop () to get the message. Then you don't have to use signals. Otherwise, use g_main_context_iteration() too see if there is an event on the gobject main loop: http://library.gnome.org/devel/glib/unstable/glib-The-Main-Event-Loop.html#g-main-context-iteration On Mon, Mar 15, 2010 at 4:37 PM, wanting2learn <[hidden email]> wrote: > > Hi I have a program with its own main 'while' loop that must be executed for > my program to work. > > I wish to add also a g_main_loop_run (loop) so that I can monitor gstreamer > event messages as in > :http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-helloworld.html > > Is it possible to have two loops running in my program. I have tried adding > the code to let me monitor messages but I can't seem to get it to work. > (i.e. I cant seem to get any messages in my bus_call function) > > I guess my question is: Can I have a g_main_loop_run as well as my own while > loop? Or will g_main_loop_run block my program? > > Thanks > > -- > View this message in context: http://n4.nabble.com/g-main-loop-run-question-tp1593988p1593988.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |