MythNews: improve media:content parsing in rss feeds

* use the medium or type attributes to determine whether the content is an
  image or video. Previously we ignored the type and ended up trying to play
  an image.

* if we haven't found any thumbnail image then use any images found in the
  media:content as the thumbnail. Fixes #11161.

* parse all the media:content items not just the first one we find.
(cherry picked from commit 7d9c51eb75ae37f39a57eb969c0ad7e532738e8a)
update mythtranscode to work with ac3 with newer ffmpeg

ffmpeg has moved the duration/size of the audio frame to another place, so look
there

links used to figure it out how to move forward
http://ffmpeg.org/trac/ffmpeg/ticket/1240
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=364c71c80e9124a2624e3bfeb8e84c5cddeda222
http://code.mythtv.org/trac/ticket/2077#comment:42

thanks to Nicolas Pöhlmann for finding the commit that broke it

Refs: #2077
(cherry picked from commit a9b906528)
add NULL check missed in [a9b90652]

found by Jim Stichnoth

Refs #2077
(cherry picked from commit f04a8e42b)
mythmusic: Save playlists to DB when changed not at frontend exit

This changes things so any changes to playlists are saved to the database
immediately rather than cached and saved when the frontend exits.

This fixes a problem were you could lose edits to a playlist if the FE is not
shutdown cleanly like when using the idle timer to shutdown or if you shutdown
the computer from the FE exit menu.
(cherry picked from commit 70143c30dfb67812ecd6cb29e66a10353579054f)

Fixes #11228
Updated MythFrontend English GB translation
from Nick Morrott

Thank you Nick!

Refs #11522

Signed-off-by: Nicolas Riendeau <nriendeau@mythtv.org>
mythnews: fix debugging in NewsSite::parseRSS()
(cherry picked from commit f17a6fd24bab751f00b361249b7d2129108e335d)
Fix crash.

When playback request failed for whatever reason, if we were to check for the playback status it would crash due to ic being NULL.
(cherry picked from commit cc1ca2ef2c12cd25cbced5b57b527382d2d70926)
Properly handle multi-part http request in AirPlay video

This commit also adds the basics required to support AirPlay photo. Incidentally, properly handling multi-part data now allows to play videos from the iPhone "Photos" app.
(cherry picked from commit 75541357af4a527057301f8f1b4b2ae0368f47b1)
changed: allow 4 second skew between streams in mov before attempting to seek

Signed-off-by: Jean-Yves Avenard <jyavenard@mythtv.org>
(cherry picked from commit e4170c604e6a6af969e5de74ac740ac596686da8)
Apply patch from XBMC by Joakim Plate: "changed: allow 4 second skew between streams in mov before attempting to seek"
(cherry picked from commit d0ea1417db42debc12e56030581e573151960538)

Conflicts:
	mythtv/external/FFmpeg/README.sync
Rewrite of StreamingRingBuffer::safe_read

safe_read was based on FFmpeg's ffurl_read_complete, however when an EOF or an error is encountered, ffurl_read_complete returns the error code rather than the number of bytes read so far.
Rather than wait for FFmpeg to fix it (ref: https://ffmpeg.org/trac/ffmpeg/ticket/2537) ; work around it.
safe_read now will set errno as expected and always return a value >= 0 representing the number of bytes actually read.

Fixes #11263
(cherry picked from commit 8b8ec72b005ecf1cb9d36bb4f82469b3718fefb4)
Ignore network error on an interface that no longer exists.

Under some circumstances, a network interface can disappear during the lifetime of the process. Simply ignore those rather than failing the whole process (by default, networking operations must work on all interfaces found)
(cherry picked from commit fd44e2fcbbc4c3dc6fe835c1d62686fafe3b2833)
If AV codec context doesn't match the context for which it was first opened, close/re-open it.

There's something suspiciously wrong about the way we handle change of streams. This is at best a work-around.

Fixes #11519
(cherry picked from commit 40db16fc3b486042469df8e84290e5d42fc6036f)
Rework RAOP audio sync

commit 9ec7421138adef73ef9cb83b74e046092fecdd6a that fixed audio timestamp calculations revealed an issue in the way RAOP was calculating and setting time syncing.
Rework how things are done: We now calculate the audio card latency and simply drop the initial audio frames amounting for such length of time. From that point on, when we get too far behind we drop all queued audio and restart.

Rather than dropping a whole audio packet at a time (352 frames) we now drop frame by frame, so re-syncs are much smoother.

Surprisingly, this simpler method gives much better results. Synchronisation across multiple airplay device is almost perfect (tested across 2 macs and one linux). Remote audio and video sync are spot on.

Fixes #11530
(cherry picked from commit 96f58cbf4baa16b2008888f92d4ce2fb7e615aec)
Fix possible segfault when exiting a screen when using the Qt painter

This changes MythScreenStack::PopScreen() to call deleteLater() on the
screen rather than immediately deleting it so as to allow any keypressEvent
handlers to complete safely before the screen is deleted when control
returns to the event loop.

Fixes #11383.
(cherry picked from commit c713988707d2c795a2a2abeff817d1b187d4b3f6)
Fix bug in mythtranscodes clean-cutting mechanism

One of the clean-cut methods interacted badly with mythtranscodes
synchronisation algorithm and would sometimes cause frames from
cut segments to be kept. This commit fixes that bug

Refs #11531
MythMusic: append "\r\n" to the Authorization line in the shoutcast header

This fixes a problem with connecting to ice/shoutcast streams requiring
authentication.

Thanks to dashs on irc for finding the error.
(cherry picked from commit bbc5e9cb0df704d3cc96deffbdad2b925031f73e)
MythMusic: remove any username/password when displaying any radio stream URLs
(cherry picked from commit 324738353ef07c8dba811dea4069c7b1112c6c3e)

Conflicts:
	mythtv/libs/libmythmetadata/musicmetadata.cpp
MythMusic: fix compilation after last cherry-pick
Potentially fix segfaults on frontend startup

In nvctrl-util's GetNvidiaRates():
Initialise buf values to NULL, reduce it's size from 256 to 8 since
we're only interested in the first 8 tokens and actually check that we
parsed all 8 from the string before proceeding to use them.

While here change logging from VB_PLAYBACK to VB_GUI which makes more sense.

This may fix some frontend startup segfaults experienced by some
people since we ended up using an area of uninitialised memory in
strtol.

Coverity 746855
(cherry picked from commit 516719ad7e750a258bd2f72f79eae099f79d303b)