<div dir="ltr">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<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-25 10:14 GMT+03:00 Sebastian Dröge <span dir="ltr"><<a href="mailto:sebastian@centricular.com" target="_blank">sebastian@centricular.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mi, 2016-02-24 at 14:38 +0300, Krutskikh Ivan wrote:<br>
> Hi all,<br>
><br>
> I'm developing an ip video distributor/videorelay with python and<br>
> gstreamer and I'm stuck with gstreamer internal threading. I've<br>
> defined a number of classes with some gstreamer routines<br>
> (GstRTSPServer and some multifdsinks for video over http) some of<br>
> them use GObject.Mainloop for event handling. But when I start my<br>
> server, the first instance to call loop.run() freezes my program<br>
> until loop exists. What can I do to daemonize each class in his own<br>
> thread? Maybe there is a more common way of dealing with gstreamer<br>
> threads?<br>
<br>
</span>Just run g_main_loop_run() in a new thread. Alternatively you can also<br>
let multiple things be handled by a single main loop.<br>
<br>
But the point of it is exactly that it blocks until the loop is<br>
stopped, and in the meantime it handles all events that arrive on its<br>
associated main context.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" rel="noreferrer" target="_blank">http://www.centricular.com</a><br>
<br>
</font></span><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>