Why use g_main_loop when writing an application

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why use g_main_loop when writing an application

Arvin6
Since we can just call the apis and do whatever we want, why should we bind
things to this context to main loop? I'm pretty new to GStreamer, any input
would be appreciated.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Why use g_main_loop when writing an application

Nicolas Dufresne-5
Le lundi 02 octobre 2017 à 22:39 -0700, Arvin6 a écrit :
> Since we can just call the apis and do whatever we want, why should we bind
> things to this context to main loop? I'm pretty new to GStreamer, any input
> would be appreciated.

If we often use the main loop, it's for simplicity, or to blend with
other GLib oriented library. A main loop is a serialization mechanism
which allow reducing the amount of thread. GStreamer does not require a
main loop, but if you don't enable that, you should poll the GstBus and
pop events from it, so it does not become full.

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel