Define USING_MINGW when building programs with MinGW
Use correct RecordingInfo* in FinishedRecording()'s SendMythSystemRecEvent().
Fixes #10712. Add support for HDHR Prime without CableCard.
Refs #10712. Add error checking, proper formatting, and improve debugging of previous commit.
Fix use of deleted socket in MythCoreContext::ConnectEventSocket()

This was fixed in [f2a0d748] in trunk.
Fixes #10685. Handle job queue properly for back-to-back recordings.
Match Lock with Unlock in OutboundRequestHandler::DoConnectToMaster() socket error handling code.

This was fixed in [f2a0d748] in trunk.
Changes seconds to milliseconds in poller loop.

This corrects the timeout duration in the poller loop used to read data
from external programs.  Code was written assuming timeouts in floating
point seconds, while poll() API takes milliseconds.  Ahh.. consistency..

Fixes #10837
(cherry picked from commit 76433930fed60342a4b2929c6ff94a8413673e5b)
Add TMDBv3 file missed during previous backports.
Add Studio search method.
(cherry picked from commit c2bb6aee239e1e53ba95da232ed84ee5da21685b)
Add Genre list and associated Movie search
(cherry picked from commit 6e7725de7d8507c3675aa89b17a49da06abc7cc2)
Following Freesats switch from Astra 2D to Astra 1G update the transport ids associated with Freesat EIT fixups
(cherry picked from commit 0312ff912a743178f2ef54967866b42c894d7c4b)
Move QUERY_FILETRANSFER handling to improve backend performance.

This significantly reduces the backend CPU usage for me when streaming a
recording or other file to the frontend.

Each time we send a command to the backend we perform a number of string
comparisons to find the correct handler. In the cases where that same command
is sent regularly, maybe several times a second those comparisons can stack up
to result in a high CPU load. This can be avoided by moving the most frequently
used commands to the top of the list thereby avoiding a couple of dozen or more
comparisons each time.

There may be other commands that should be moved to the top with similar
benefit.
(cherry picked from commit 529853d11587ebee0b77753272d6dcc1a5404a11)
Clean up deferred deletes MThreadPool.

In case someone uses QObject::deleteLater() within a QRunnable
passed to MThreadPool, this adds a cleanup of those when done
with the QRunnable.
Don't create a watch list for the "Deleted" recording group.

Fixes #10854.

(cherry picked from commit 22ed71e4d9eeddccae0e1b4f40321e3f624e7b4e)
Protect the reschedule queue with a seperate lock to fix a backend deadlock.

Fixes a deadlock in mythbackend caused when a reschedule request occurs
immedately prior to a recording starting.

The recorder thread locks the scheduler when starting a recording. The pending
reschedule request handled in the event loop waits for the scheduler lock to be
released blocking the event loop. The backend is now stopped from handling any
further events or protocol requests, meanwhile the recorder is waiting on
events to be processed before it will release the lock resulting in an
irrecoverable deadlock (or hang) and the failure of the recording.

This deadlock was more likely to be triggered for users of EIT because it will
ask for a reschedule every 5 minutes in addition to any reschedules triggered
through other means.

Refs #10771

Backported from master 788bc510ede427e43e77e8aaf53d8cf047d89b46
Fix incorrect cast causing loss of integer precision in RingBuffer
(cherry picked from commit 7aea3131a8801c09617012d3e892ec4fa68f626a)