Fix lossless transcode.

Following 6c3653cd378aacef10b7706d8b7f71beae41274c, lossless mythtranscode got broken.

This is just a quick workaround, the whole code needs to be revisited and properly use FFmpeg API

Fixes #11213

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit 2a27e176275155a04498ecb8eac67dbd0164d080)
actually add the timecodeOffset when getting audio frames

We have to ask the AudioReencodeBuffer for audio to write with the
original timecode before applying the cut list.

Patch by Nicolas Pöhlmann
Reviewed by Paul Gardiner

Refs #11213
Refs #11639

(cherry picked from commit ea8c2b91e91e5cada8f8309f9fcb63f831f79aee)
Update mythpython script for new tmdb library.
(cherry picked from commit 5c5082a6109df3e3c4ddb99569fcf37af55b97d1)
H264Parser: Only enter the "state changed" state if we have seen a SPS.

Fixes #11882
May help or solve #11886

(cherry picked from commit 306f9fc004d52e87defca84f8c33616ef0e00485)
Don't timeout the signalmonitor until all hope is lost.

(cherry picked from commit 080ef223c56682bbe356be293a53f3d38f6ca5c2)
Re-enable display of tuning status in LiveTV after [9b22460f5]

(cherry picked from commit fc2ba41a253f115976bcc8794b13297ec41eb150)
Following [080ef223c] don't segfault if curRecording is NULL.

(cherry picked from commit fabca8bee90ed0765b9f0f902e92bdbed88f5123)
Make ffmpeg call 'streams_changed' again when a DVD PCM stream is changed from PCM_DVD to PCM_S16BE to ensure the correct codec is loaded.

Fixes #11941
(cherry picked from commit d8c710d204f5769ea4d0304a9a8618eb417f2837)
Fix compiler warnings spotted by Jonatan Lindblad.

Cherry-picked from most of c06c191712a7e0721a423528f37420c30d53cab7.
mythzmserver: fix the debug output telling us which mmap files we opened

(cherry picked from commit ce27ac589bf510e280fa1ebabe46b250b6452722)
MythZoneMinder: finish the support for ZoneMinder >= 0.26.0

All combinations of capture palette and target colour space should now be
supported. This also moves all the processing to mythzmserver and always
passes RGB24 to the plugin.

Note: bumps the protocol version so both mythzmserver and the plugin need to
be updated.

(cherry picked from commit 68c07c49499ca5be40751bf59908bf03b242f281)
mythburn.py: pass the starttime in utc format to mythtranscode

I can't easily test this but hopefully this will fix the problems reported on
the user mailing list and in #11758.

Refs #11758.

Signed-off-by: Paul Harrison <pharrison@mythtv.org>
(cherry picked from commit 45e62c8cb69c3abbbf883d926bd5c0e2137d7365)
MythZoneMinder: fix an invalid frame no. warning when playing back events

Sometimes while single stepping through the event frames the player would try
to grab frame 0 which will never exist.

(cherry picked from commit ee5de540587a55f8b749da5ece22a15b163619c8)
Limit scheduler sleeping when master backend shutdown is enabled.

The longer sleeps added in a2eb9312 could prevent the pending shutdown
events from being sent.

(cherry picked from commit 7fcc9ccc031eb6418b193b71970ca627c95e1d5c)
mythburn.py: only use toprettyxml() in Python >= 2.7.3

There is a bug in older versions of that function which inserts additional
white space into text nodes causing problems when reading back in the
prettified xml file.

(cherry picked from commit 41264b6006221900d0a5fa685f67e6b6c0e972ef)
mythburn.py: fix another utcisoformat() missed in fa94c154c7

(cherry picked from commit 90cdee0efa51bdc8ecb20fc1dadfe676a1e1fddc)
MythZoneMinder: use the itemVisible signal to update the event images

This makes scrolling in the grid a little quicker since it's now only
updating the images for the visible items.

(cherry picked from commit 21296a9fdcb672a21d884d04deb5983addebaf8d)
mythzmserver: fix a possible segfault if no event frames are found

(cherry picked from commit a33c327a1bc7cde68bbb2dfc7648f09b7dc2fdf8)
Cleanup and simplify the HLS Recorder.

(cherry picked from commit 208ad3145814d51f502c85d5dac007a3eee1e7c4)
MythDownloadManager has a memory leak, which can be terminal when used by

the HLS Recorder.  Add a simple MythSingleDownload class which uses
QNetworkAccessManager directly to avoid the leak, until it can be found and
fixed.

(cherry picked from commit 950a627790b8a044f10bfd9387f4528618acc6f0)