<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr">Le ven. 5 oct. 2018 08 h 41, klex0 <<a href="mailto:alex@kordecki.de">alex@kordecki.de</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I use Gstreamer together with the Python Twisted Framework. There seems to<br>
be a race condition when sending events in the pipeline.<br>
With many parallel pipelines which I dynamically create and terminate, a<br>
thread hangs reproducibly in the marked line. This seems to happen during a<br>
context switch of a twisted thread within this line. <br>
<br>
log.msg("TERM: gen EOS")<br>
eos = Gst.Event.new_eos()<br>
log.msg("TERM: send EOS")<br>
self.pipeline.send_event(eos)           <-- Here it hangs<br>
log.msg("TERM: EOS sent to pipline")<br>
<br>
Has anyone an idea about this ?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Interactions between GStreame and the Python run-time is single threaded. As a side effect, some cause that is supposed to run in seperate thread may cause deadlocks.</div><div dir="auto"><br></div><div dir="auto">I have heard that recent Python API could help with this, but that would need some rework of the GObject auto-generated bindings (and research, and load of testing).</div><div dir="auto"><br></div><div dir="auto">Best is to add a small native layer that deals with the threaded callbacks, or avoid threaded callbacks.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
alex<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>