Add some logging to ScanDSMCCStreams
(cherry picked from commit 6737f34049a186db7d620e57321312c2cdfb76b9)
Remove an unnecessary null pointer check that was preventing ScanDSMCCStreams() from working. The interactive TV code doesn't use the OSD class at all.
(cherry picked from commit 2c4599088b6da9d6b1dbb5daf0e3c3ee32a9c448)
Tidy comment
(cherry picked from commit 68836b7ac69d5cf2807ef4098b8887cc47b55ee4)
Revert "mpegts: Make sure we don't return uninitialized packets"

This change broke data streams, particularly DSMCC packets were
rejected which in turn broke MHEG Interactive Services e.g. 'Red
Button' services

This reverts commit 2ea63fc01cec3a7a87c1ec2279dbb08ff8f21445.
(cherry picked from commit 19f2d509c874b2169f66f22e9d93840f5ffa5b4f)
Fix Saorview MHEG problems

In MHEngine::GenerateUserAction? the current scene is passed to EventTriggered?
 , but Saorview MHEG works if the current app is passed instead. This change does not seem to break BBC MHEG.

 This is from MHEG-5 Broadcast Profile (ETSI ES 202 184), and I'm assuming there's something similar in the Corrigenda to the UK Profile (the Corrigenda doesn't seem to be available from dtg.org.uk any more).:
UniversalEngineProfile(N)

Receivers based on the present document but which have not been
verified as fully conformant shall not return true when N=1 285. Instead
they shall return true when N=2.

 Saorview expects UEP(1285) to return true, MythTV returns true for UEP(2), but not UEP(1285).

 Also there are bugs in MHText and MHLineArt.

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
(cherry picked from commit 04294d592418eda72b78d6db852959a662f1c7f8)
MHEG: Avoid an Interaction channel deadlock if data is cached

If a request to NetStream is pending when a 2nd is requested that can be
resolved from the cache then a deadlock occurs if the 1st request
finishes while the cached request is processed.

This patch releases the MHInteractionChannel mutex while the
synchronous request for cached data is processed.

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
(cherry picked from commit 30f1e586197a60ee58f0711dca0fd3c3b18e3e4a)
MHEG: Rermove an unnecessary mutex lock operation

QueueDSMCCPacket is called by the decoder thread to deliver MHEG data
packets.  If the MHEG engine is in a busy wait then acqiring m_runLock
can stall the decodere and caused dropped frames.

Acquiring the mutex is unnecessary simply to signal the m_engine_wait
condition

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
(cherry picked from commit 362f6dbcb7b8754e1370853cf61eef4ed5cecf5a)
MHEG: Support BBC iPLayer on Freeview

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
(cherry picked from commit 0a574b1b3891fbe4c4bfe570749be01a48a9d808)
MHEG: Interaction channel uses SSL certificate from the DSMCC carousel

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
(cherry picked from commit 2c677584e9f39097135e2cf100a52dc72e073254)
MHEG: Fixes for InteractionChannel streaming from network URI's

This patch includes fixes for:
- Prevent memory leak on stream close
- Improve logging of streams with no content length header
- Add a mutex to prevent concurrent access to QNetworkAccessManager

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
(cherry picked from commit 73c810bca2f256845a3811ddcef0b0fb0d77c8f9)
AFD: Correctly render data only (MHEG) streams without audio or video

Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
Signed-off-by: Stuart Morgan <smorgan@mythtv.org>
(cherry picked from commit 2f1cb36a4f67aa3cd88a63560ccef121bc7c12b0)