Remove file check for pytmdb3.cache

This is a partial roll back of 2c50a824b and remove the check for the
pytmdb3.cache file, allowing the library to simply create the file if
necessary.

Fixes #11876

(cherry picked from commit ec084b39099d2ea43a736ac46caffad90272ef9d)

Conflicts:
	mythtv/programs/scripts/metadata/Movie/tmdb3.py
Fix null dereference

Coverity ID 1061551

(cherry picked from commit 9635bc42da3de7616d2ab248694ee9ae7ec2b42e)
Protect pbs with proper (aka locked) refcounting.

The PlaybackSock must not be immediatly deleted on connectionClosed()
if some other requests are still using it. This leads to segfaults in
the MBE when the SBE disconnects (#11306).
(cherry picked from commit 7b305848b0584bcebc55d6fe5a670ef7d2f55360)

Refs #11306
Signed-off-by: Stuart Auchterlonie <stuarta@squashedfrog.net>

(cherry picked from commit 6f246c0d1567bd84e1d9d30de7def724fc75e8f6)
Fix stuttery playback for FFmpeg's directly rendered frames

This occurs for mjpeg and 9/10 bits videos

Fix submitted by slackerlinux85@gmail.com. Thank you !

Fixes #10942
(cherry picked from commit dbb38743501ac4dd361b248fcaa337d00a85329c)
Fix playback of 9/10bit h264 videos

The fashion this fix is implemented is a hack more than anything else.
It disable the following H264 profile to be decoded via the GPU:
FF_PROFILE_H264_HIGH_10
FF_PROFILE_H264_HIGH_10_INTRA
FF_PROFILE_H264_HIGH_422
FF_PROFILE_H264_HIGH_422_INTRA
FF_PROFILE_H264_HIGH_444_PREDICTIVE
FF_PROFILE_H264_HIGH_444_INTRA
FF_PROFILE_H264_CAVLC_444

regardless of the GPU acceleration method (VDPAU, VAAPI, VDA, DXVA or CrystalHD). Which at this present time is acceptable enough as no hardware handle those profiles.

A proper implementation, per decoder, would require significant changes and code cleanup to the mess that is currently avformatdecoder.cpp

Fixes #10706
(cherry picked from commit 8f0437c7a66626f29fff18b04c60035cd8fb3b91)
ffmpeg backport: register vdpau hwaccel for mpeg12

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit 2f1b223d39d52ec74c25e8ac9a3d46923b0f50e0)
Fixes #12128
(cherry picked from commit 013ac54e19ac200173986d819d2c0abb91dfb07d)
Migrate vdpau decoding to FFmpeg's new hwaccel API.

This API has changed in FFmpeg 2.x, and the new code would have to be modified.

The most valuable outcome with this change, is that it fixes some occasional mpeg2 video playback corruption

Fixes #11377
(cherry picked from commit a5b996c06dd73b378b39bbc772183c4abf53e4d7)
vdpau: Fix VC-1 interlaced mode

VDPAU expects the bitstream value (0, 2 or 3).
libavcodec uses an enum (0, 1 or 2).

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 582963a8156522582e55466be4a59974a8d909a5)
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit 7d6471dfee3817292f99bbc15ba2665cb97359c6)
Update to FFmpeg 1.2.6 release
Bump API to 0.27.20140503-1
Use QEventLoop for modal windows.

According to the Qt forums, you can call qApp->exec() only once per application, otherwise weird things occur. In particular 100% CPU usage.

Fixes #11666
(cherry picked from commit 0db22a0f99cb9eeef3cf9f40e1f71a161a4e767c)
protect metadata loads from multiple threads

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit cd80b1c740f335e91876c61ce1b7aaa022165d96)
Mythgallery: Fix white screen after playing video when using OpenGL

If the mythfrontend UI is set to use OpenGL and MythGallery is set to use
OpenGL transitions then when video playback exits a white screen is
shown instead of the video screenshot with "Press SELECT to play again"
overlay.

The fix is to call makeCurrent on return from playback.

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit c0907083ab091a42222548312bb3b43f59feeb82)
Have RemoteFile attempt to fully reconnect in case of errors
(cherry picked from commit b87d4769bae1e4323a4ee38260cc1ed57d1e8c99)
notifications might only have an image without a 'message'.
(cherry picked from commit 1793e7aeb18af332e601fc7353bf12c8ea128692)
Merge branch 'fixes/0.27' into devel/027candidates