[gst-devel] Threads and gst-python
soto at informatik.uni-kl.de
Wed Oct 20 12:40:57 CEST 2004
On Wed, 2004-10-20 at 15:53 +0200, Johan Dahlin wrote:
> Yeah, I upped the requirements, because its simple too much trouble
> dealing with unstable versions of PyGTK.
Makes sense to me.
> We have exactly the same problem in flumotion, to be able to deal with
> it, we needed to have the new PyGIL ThreadState API that was introduced
> in Python 2.3. However, this interface is slightly broken, so
> applications using the python thread module simple stops working, which
> is quite unacceptable for a project like PyGTK. So in the last minute we
> disabled usage of the new API, unless you set the environment variable
> PYGTK_USE_GIL_STATE_API to something.
Thanks a lot, this did the trick :-)
> The real bug is a python bug and is fixed in both the maintainer (2.3.x)
> and upstream, so when the next version is released we can remove this
> hack and make the behavior the default.
> This is not really documented, since it's still quite unstable. So make
> sure not to use the "thread" or "threading" module in your application.
> Having threads from C code (eg GstElements) that emit signals from other
> threads should work, our server depends on this.
My app is indeed using the threading module, but it seems to work just
fine (as long as I set the variable, that is). Probably my code is not
triggering the python bug, I don't know. I'm using python 2.3.4 under
Debian, just in case.
> Btw, it's really cool that someone else is writing applications using
> gst-python. Rock on!
Well, I think it is great news that you guys are using gst-python for
flumotion, that means there's now a real need to maintain it ;-)
Personally, I had promised to release some code for the DVD player
before, but it had so much dependencies on my local setup (DXR3 card,
Dolby Digital receiver, lirc remote) that it didn't make that much sense
to make it public.
Last week I got a new, much faster computer (to replace my aging Athlon
700), that allows me to test using full software playback. Hopefully, in
a few days I'll have everything working again with the new setup, and
I'll release something useful.
More information about the gstreamer-devel