GNOME Bugzilla – Bug 751032
SDL example sdlshare2 deadlocks
Last modified: 2017-11-25 00:27:38 UTC
The tests/examples/gl/sdl/sdlshare2 example showing glimagesink integration doesn't work any more. Everything ends up sleeping on gconds and never wakes up again.
+ Trace 235175
Thread 3 (Thread 0x7fffecf14700 (LWP 26145))
Yea, so this is where the whole using "glimagesink as an appsink" thing breaks down. The condition order is as follows. The GL thread (where the draw signal is emitted) ends up waiting in the application for the main thread to finish drawing (big no-no in the current thread design). The main thread in the mean time, is trying to upload the data to GL textures on the GL thread but can't because the GL thread is waiting for the draw signal to finish. Side note, the streaming thread is also blocked waiting for the redraw to never complete.
So what shall we do with this then?
Either remove the example as it's useless or rewrite with appsink.
Sorry, didn't think of searching existing bug. Its Lubosz that made me notice, as it was relatively simple fix, I fixed it. Though, I think client-draw signal is too tricky for the shared GL context case. So I think porting this to appsink would serve better, and then remove fakesink example that uses async queues, since this is like trying a bit of appsink. May I close this bug?
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=4f36f75eb1e944bac0aaabc6c4c4aebf67b77251