Use recording rule priority as the primary scheduling priority.

Previously, priorities like input and channel were added to the
recording rule priority to calculate a single priority used in
scheduling.  Now, the recording rule priority is used by itself as the
primary priority.  The other priorities are summed together and used
as a secondary priority.

What this means is all programs matching a given recording rule,
including those on less desirable inputs and channels, are scheduled
before any programs matching lower priority rules.  This is more in
line with the way most users assume and expect the scheduler to work
and still allows the ancillary priorities to influence the scheduling
of specific showings.

Note: this is essentially a reintroduction of the "ComplexPriority"
scheme.
Update the ABI version for SHA1:5587501e.
Hopefully fix a rare segfault in MythUITextEdit when using mythmusic. I'm guessing but by no means certain that a linked copy of the string was altered in another thread, e.g. the metadata or playlist load thread. QString uses shallow copies and isn't threadsafe. detaching the string may use more memory but that's preferable to crashing.
Remove theme references to the defunct Set Recording Priorities screen.

This should have been done in SHA1:f8cb433b .
Enable more ffmpeg logging at startup of playback.

Allow logging in avformat_find_stream_info() if
"-v libav --loglevel debug" is specified.
This proves useful for live TV debugging among others.
Remove the Delete Recordings screen.

This screen was nearly functionally identical to the Watch Recordings
screen.  The primary differences between the two were the default
sorting order and whether the default SELECT action deleted or played
the currently selected recording.  The one, small, hard-coded feature
of Delete Recording to display the total disk space used by a group
has been added to Watch Recordings.  The remaining difference is the
displayed information and that is controlled by the theme.  Of the
included themes, only MythCenter-wide had specail support for Delete
Recordings.  For it, the total disk usage bar-graph has been added to
Watch Recordings.
Fix Live TV startup, particularly for analog PVR-xxx tuners.

At the start of playback, ffmpeg scans the start of the file for
stream info.  While reading packets, it uses ffio_limit() to truncate
packets during attempts to read past the size of the file.  The file
size is cached at the start of playback, and may be inordinately small
for live TV files, triggering a storm of packet truncation and failure
to start playback.  We fix this by faking a large file size for live
TV playback during the initial call to avformat_find_stream_info().
Delete a couple more remnants of the Delete Recordings screen.
Fix StatusBox to account for template recording rules.
Fix the timer that periodically saves the seektable delta.

After 309c97e3001b7b2748c42564d5b93b923d00a171 and related commits,
the positionMapTimer never actually got started, and seektable updates
weren't written out until the recording ended.  This affected seeking
in live TV and in-progress recordings, and because the file size
wasn't being updated either, it actually prevented starting playback
of in-progress recordings.
Avoid segfaulting with -v playback when m_positionMap is empty.
MythZoneminder: Make sure the connection to the server is shutdown on FE exit

This fixes a 'Not all threads were shut down properly' error when shutting
down the frontend.

Fixes #11340.

Signed-off-by: Daniel Thor Kristjansson <danielk@cuymedia.net>
Subtitles: Add manual synchronization of text subtitles.

Adds an OSD dialog, similar to Adjust Audio Sync and Adjust Subtitle
Zoom, to offset the presentation of text subtitles by a value between
-5 and +5 seconds.
SignalMonitor: Timeout if we don't get a lock in a reasonable amount of time.
Updated Spanish/Spain MythFrontend, MythArchive and MythMusic translation
from Antonio Marcos Lopez Alonso

Thank you Antonio!

Closes #11401

Signed-off-by: Nicolas Riendeau <nriendeau@mythtv.org>
Improved cropping of the bottom 8 lines of 1088-line video.

Refs #11358.  Reverts 9d9de7b75d5354c9130526311a0c74d7172ebe6d and
cleans up the bottom 8 lines by applying a crop filter to the source.
This is tested for the XVideo output method.

The VDPAU output method does not use the standard filter mechanism,
but it works fine on 1088-line video until the h.264 parser thinks the
resolution has changed from 1080 to 1088 lines.  To compensate, we
don't acknowledge a resolution change when this happens.
fix issue #10222: mythcommflag segfaulting

The problem in issue #10222 is that it is adding the CODEC_FLAG2_FAST flag.  This causes unsafe functions to be used, causing a segfault. The proper way to fix this would probably be to figure out how to test for the "experimental speedups" flag, however I don't know the codebase well enough for this.

I tested how this would affect the speed of mythcommflag on one of my recordings.  The results:

Before removing flag:
real 2m13.123s
user 2m16.713s
sys 0m3.502s

After removing flag:
real 2m13.021s
user 2m15.446s
sys 0m3.758s
DTVRecorder: buffer up each payload until we know if the payload is a
keyframe.

Especially with H.264, we can be several packets into a payload before we
know if it is a keyframe or just a frame or something else.  Always buffer
the packets of a payload until we know what we are doing with the payload.

If we need to switch ringbuffers, we now do it so the new file will start at
the beginning of the payload holding a keyframe.  Each file will also start
with a PAT/PMT if the "recorder" calls for it.
Cleanup some useless "discontinuity detected" messages following 87a15e1ce

Closes #11328
Simplify some file list usage using filters new to QT4

QT4 introduced a 'QDir::NoDotAndDotDot' filter for use with QDir::setFilter(),
QDir::entryList() and QDir::entryInfoList(). This allows us to
simplify a few places in the code by removing our own . and .. checks.

Thanks to Rolf Eike Beer <eike@sf-mail.de> for spotting the problem
and providing an example patch. Since there were many more examples in
the code than the one he highlighted I decided to fix them all in one
commit instead of applying his patch.