Subtitles: Encapsulate zoom get/set into the SubtitleScreen class.

This sets the stage for allowing AV subtitle zoom adjustment, and
possibly independent zoom factors for each subtitle type.
Optimise start up time and seek time

Greatly reduce the time it takes to start playback and seek. Change the StreamWorker thread to be almost lock-less so the playback stream doesn't have to wait for the end of a download in progress for a seek order to be acknowledged.
Seek time on a local network as generated by AirVideo or Myth is almost instantaneous.

Starting time is cut by half on low-speed network ; at the most you have to wait for the download of the first two segments only.

Also, now ignore invalid streams that would have otherwise turn on the VOD mode (seen with France 24 channel)
Allow deferred evaluation when creating custom recording rules.

When creating a custom rule by choosing "Custom Edit" for a program,
allow the use of variables such as "{TITLE}" and "{STARTTIME}".  The
variables are replaced with actual values from the program when the
rule is saved.  This allows storing sample searches for future re-use
that will automatically adapt to the new program.  Press "EDIT" to
toggle between immediate evaluation (the previous and default
behavior) and deferred evaluation.

This change is primarily from used mmm1976, with trivial changes by
me.

Fixes #10734
Schedule editor flexibility and other enhancements.

Note: no theme changes are required with this commit, however, two
changes are recommended.  See below.

The primary change in this commit allows options from the schedule,
storage and post processing options screens to optionally appear on
the main screen.  This serves two purposes.  One, a theme can be
targeted at novice users by putting only the most basic options on the
main screen and requiring use of the menu to access the more advanced
options.  Two, power users can put the options they use most
frequently on the amin screen.

Other enhancements to the schedule editor in this commit include the
following.

All buttons on the main screen except those for rule type and save are
now optional.  Any applicable functionality is always available by
pressing MENU so there is no longer a need to have a button for each
child option screen.  This change is mainly to make room on the main
screen for the new, optional settings.

A new, optional setting called "newrepeat" splits the kDupsNewEpi
functionality out from the poorly overloaded "dupscope" setting.  If
the "newrepeat" setting is found in the theme, the "dupscope" setting
does not include the "Record new episodes only" option.

The INFO and UPCOMING actions now work like they do in most other
places in mythfrontend.

The PREVVIEW and NEXTVIEW actions cycle through the main screen and
all of the applicable child screens.

The Filter options screen is logically at the same level as the other
child option screens.  If the theme includes a "Filter" button on the
Schedule options screen, it should either be removed or moved to the
main screen.  If the theme cascades the child option screens, the
Filter options screen should use the same positioning as the other
child option screens.

The Metadata options screen no longer performs an automatic lookup
when the inetref is not set.

An optional save button can be on any of the child options screens.
Subtitles: Allow scaling and smart layout of AV subtitles (DVD/BD).

Fixes #10402.  Note that at present, playback always starts out with a
zoom factor of 100% for AV subtitles, and the zoom factor is not saved
back to the database.

Signed-off-by: Jim Stichnoth <jstichnoth@mythtv.org>
Subtitles: Adjust AVSub scaling in some cases.

Tweaks the heuristic for determining when the video was resized
without correspondingly rescaling the AV subtitles.  Fixes #10688.

Signed-off-by: Jim Stichnoth <jstichnoth@mythtv.org>
Subtitles: Make AVSubs zoom factor persistent.

Most DVD/BD subtitles are consistently sized, so it makes sense to
save the zoom factor back to the database for next time.  Since there
is no relationship between text font sizes and AVSub sizes, separate
zoom settings are maintained for text subtitles (OSDCC708TextZoom) and
AV subtitles (OSDAVSubZoom).
Change how we retry and cancel playback should refreshing the playlist failed.

In theory, PlayListWorker shouldn't even run for VOD stream ; and it wasn't running originally. However, this prevented some live stream to work incorrectly marked as VOD. While this was properly fixed in 0d69c75f0b4eaa9510f5f699e266c3b4143f7112, PlayListWorker is still running no matter what as it helps determine if a stream is still valid and hasn't been deleted in the mean time
So reduce the playlist refresh time when running in VOD mode ; waiting times are doubled.
fix tiny winy minor spacing issue
use libmpeg2/mmx.h header instead of the obsolete FFmpeg/libavcodec

The functions use are identical in both headers
FFmpeg adjustment.

This commit tries to minimise the changes made on the original FFmpeg libs so it is easier to sync in the future. It also fixes some errors introduced during the last resync.

Lots of MMX code were relying on mmx.h header which was removed from ffmpeg years ago. So copy it into libmythbase so we never have to bother about this files again and modify all files using that header

There are still changes in libavcodec's PPC code, but I wouldn't dare touching it.
Update mythmusic for new ffmpex-mmx.h header

Following 106132b22e9273ffc67abf098d8022df655da630, forgot to also updates the plugins
fix adjust filters on non x86 platforms.

How did this ever compile ?
Re-enable yadif filter on mac.

It compiles just fine with XCode 4/llvm
Compile ffmpeg with -O3 on mac..

After pulling my hair for hours... Here is the principal reason why h264 kept crashing on my box... The SSE code in libavcodec/x86/cabac.h becomes buggy when compiled without optimisation.
This required modifying mythtranscode/replex and filters/greedyhdeint , as they, on the other hand will not compile with -O3 (get undefined symbols)
Subtitles: Rescale AV subs in place when the zoom factor is changed.

This gives the user immediate feedback on the zoom adjustment, without
making them wait for the next subtitle to be displayed.
Unfortunately, the rescaled subtitle ends up being shifted to the
upper left of the screen; this will be fixed later.  (Subsequent
subtitles are displayed properly.)
Remove the broken "Expire in deleted order" setting.

Unfortunately, this setting has been broken since the day it was
committed.  When disabled, this setting could cause non-deleted
programs to be expired before deleted programs when the Auto
Expirer was trying to free up disk space.  The desired effect
of the setting is now already handled by default, expiring deleted
programs in a FIFO order on a particular filesystem.  The first
program deleted is the first to be expired for disk space if
necessary.
Update configure to be in sync with our current FFmpeg

configure had never been properly synced for years... long time overdue
Fix FreeBSD compilation

prototype header was wrong..
Fix error introduced in 940dd94d1ac092f61d9eebab542c96b7b54b7d45

We re-applied an earlier backport on code that had been modified since and properly fixed (ffmpeg commit 6e4a35ced96cdf31a9d3bd82fd147554750af839)