Gstreamer / Multithreading problem
Nicolas Dufresne
nicolas at ndufresne.ca
Sat Oct 6 13:37:31 UTC 2018
Le ven. 5 oct. 2018 08 h 41, klex0 <alex at kordecki.de> a écrit :
> Hello,
>
> I use Gstreamer together with the Python Twisted Framework. There seems to
> be a race condition when sending events in the pipeline.
> With many parallel pipelines which I dynamically create and terminate, a
> thread hangs reproducibly in the marked line. This seems to happen during a
> context switch of a twisted thread within this line.
>
> log.msg("TERM: gen EOS")
> eos = Gst.Event.new_eos()
> log.msg("TERM: send EOS")
> self.pipeline.send_event(eos) <-- Here it hangs
> log.msg("TERM: EOS sent to pipline")
>
> Has anyone an idea about this ?
>
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.
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).
Best is to add a small native layer that deals with the threaded callbacks,
or avoid threaded callbacks.
> Regards,
> alex
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.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/20181006/8303bfa8/attachment.html>
More information about the gstreamer-devel
mailing list