vaapidecode: Switch back to Single thread implementation
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>
Mon, 2 Mar 2015 12:46:38 +0000 (14:46 +0200)
committerSreerenj Balachandran <sreerenj.balachandran@intel.com>
Mon, 2 Mar 2015 12:46:38 +0000 (14:46 +0200)
commitaafa59f01ed5b15bc3628772d1658c63ac87a199
tree48da655e629ac5cd62d1c12d42325b2750f70d45
parent336eddffa5aa494d2307f2d57bf1d2bfc0e8d5de
vaapidecode: Switch back to Single thread implementation

Because the decoder uses the thread from handle_frame() to decode a frame,
the src pad task creates an unsolveable AB-BA deadlock between
handle_frame() waiting for a free surface and decode_loop() pushing
decoded frames out.

Instead, have handle_frame() take responsibility for pushing surfaces,
and remove the deadlock completely. If you need a separate thread
downstream, you can insert a queue between vaapidecode and its downstream
to get one.

Another justification for the single thread implementation is,
there are two many point of locking in gstreamer-vaapi's current
implementation which can lead to deadlocks.

https://bugzilla.gnome.org/show_bug.cgi?id=742605

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
gst/vaapi/gstvaapidecode.c
gst/vaapi/gstvaapidecode.h