Gstreamer and GLib Mainloop

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Gstreamer and GLib Mainloop

Andrew Grace
How does Gstreamer connect with GLib's MainLoop?  At the application level, there is no explicit connection between them.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gstreamer and GLib Mainloop

Sebastian Dröge-3
On Thu, 2017-03-16 at 17:59 -0400, Andrew Grace wrote:
> How does Gstreamer connect with GLib's MainLoop?  At the application
> level, there is no explicit connection between them.

GStreamer does not require the usage of a GLib main loop, or any main
loop at all. However GstBus has optional integration into a GMainLoop
with the "watch" API, e.g. gst_bus_add_watch().

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gstreamer and GLib Mainloop

Andrew Grace
Was there a point when it was required?  The GLib mainloop seems to be used in every code sample I've ever seen involving a playing pipeline (in the gstreamer app developer manual for example and elsewhere).  Is the mainloop only needed for the bus watch API?

> On Mar 17, 2017, at 2:08 AM, Sebastian Dröge <[hidden email]> wrote:
>
>> On Thu, 2017-03-16 at 17:59 -0400, Andrew Grace wrote:
>> How does Gstreamer connect with GLib's MainLoop?  At the application
>> level, there is no explicit connection between them.
>
> GStreamer does not require the usage of a GLib main loop, or any main
> loop at all. However GstBus has optional integration into a GMainLoop
> with the "watch" API, e.g. gst_bus_add_watch().
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gstreamer and GLib Mainloop

Roland Peffer-2
I can confirm that  GLib mainloop is only required for the gst_bus_add_watch().
Instead of using gst_bus_add_watch you have to poll messages from the the bus “on your own”.

Regards,
Roland
On 17 Mar 2017, at 07:35, Andrew Grace <[hidden email]> wrote:

Was there a point when it was required?  The GLib mainloop seems to be used in every code sample I've ever seen involving a playing pipeline (in the gstreamer app developer manual for example and elsewhere).  Is the mainloop only needed for the bus watch API?

> On Mar 17, 2017, at 2:08 AM, Sebastian Dröge <[hidden email]> wrote:
>
>> On Thu, 2017-03-16 at 17:59 -0400, Andrew Grace wrote:
>> How does Gstreamer connect with GLib's MainLoop?  At the application
>> level, there is no explicit connection between them.
>
> GStreamer does not require the usage of a GLib main loop, or any main
> loop at all. However GstBus has optional integration into a GMainLoop
> with the "watch" API, e.g. gst_bus_add_watch().
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Gstreamer and GLib Mainloop

Sebastian Dröge-3
On Fri, 2017-03-17 at 07:47 +0100, Roland Peffer wrote:
> I can confirm that  GLib mainloop is only required for the
> gst_bus_add_watch(). 
> Instead of using gst_bus_add_watch you have to poll messages from the
> the bus “on your own”.

Or integrate otherwise into any kind of event loop you'd like, for
which various APIs are available.

> On 17 Mar 2017, at 07:35, Andrew Grace <[hidden email]> wrote:
>
> Was there a point when it was required?  The GLib mainloop seems to
> be used in every code sample I've ever seen involving a playing
> pipeline (in the gstreamer app developer manual for example and
> elsewhere).

It was never required, the examples just use it for simplicity.

> Is the mainloop only needed for the bus watch API?

Yes

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Loading...