GObject.Mainloop daemonize

Krutskikh Ivan stein.hak at gmail.com
Fri Feb 26 06:04:06 UTC 2016


I used the first option for my app. It works fine, but mainloop somehow
steels sigint from the main script's main signal handler. all the other
signals are fine

2016-02-25 10:14 GMT+03:00 Sebastian Dröge <sebastian at centricular.com>:

> On Mi, 2016-02-24 at 14:38 +0300, Krutskikh Ivan wrote:
> > Hi all,
> >
> > I'm developing an ip video distributor/videorelay with python and
> > gstreamer and I'm stuck with gstreamer internal threading. I've
> > defined a number of classes with some gstreamer routines
> > (GstRTSPServer and some multifdsinks for video over http) some of
> > them use GObject.Mainloop for event handling. But when I start my
> > server, the first instance to call loop.run() freezes my program
> > until loop exists. What can I do to daemonize each class in his own
> > thread? Maybe there is a more common way of dealing with gstreamer
> > threads?
>
> Just run g_main_loop_run() in a new thread. Alternatively you can also
> let multiple things be handled by a single main loop.
>
> But the point of it is exactly that it blocks until the loop is
> stopped, and in the meantime it handles all events that arrive on its
> associated main context.
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160226/153e49a7/attachment-0001.html>


More information about the gstreamer-devel mailing list