Channel scanning: unbreak the cli.  Teardown() frees and NULLs
sigmonScanner, so testing it to be non-zero is always going to fail.
Further, if sigmonScanner is invalid, then transports will be empty, so that
is all the test we need.

(cherry picked from commit 1582de655661622de08e23be13e38f06b1fab325)
Fix a thinko in the 'This time' and 'This day and time' filters.

This is a rework of commit 762e630e from master for the fixes/0.27
branch.  It accomplishes the same fix if needed, but does so without
updating the schema.

Fixes #12175
Merge remote-tracking branch 'origin/fixes/0.27' into devel/027candidates
Allow Live TV to be entered from the top-level Program Guide.

This allows the user to start Live TV on a specific channel from the
Program Guide grid.  Otherwise, the user needs to wait for Live TV to
start and tune the initial channel, then find the channel actually
wanted, and wait for it to be tuned.  This also provides a workaround
when the default initial channel is untunable for some reason.

Currently, if the desired channel is not tunable (e.g., all capable
recorders are already busy), it will fail.

Refs #11913.

(cherry picked from commit c0c5299ab82f638157b17ba13af154f73c27a40d)
Be more flexible about starting the Guide at a particular channel.

The DefaultTVChannel specifies the initial channel to highlight when
the Program Guide is started from the top level (not from within Live
TV).  The original logic required an exact match on the channel
number, and if there was no exact match, it would start at the
beginning of the channel list.

The new logic finds the closest match using the same "smart" channel
number comparison function used for sorting the Guide by channel
number.

Refs #11913.

(cherry picked from commit e3ee97cd75d58b5ac9420c2b8b5f624e4c368de2)
Allow the Guide start channel to be the "natural" Live TV channel.

If the DefaultTVChannel setting is left blank, then the EPG starting
channel is dynamically selected to be the same channel that would
naturally be tuned when Live TV is started.  This depends on the
available cards, their Live TV priority ordering, and the current
value of the starting channel for the inputs.

Note: It looks like there are still problems selecting the correct
tuner and starting channel when starting Live TV, which need to be
separately fixed.

Refs #11922.

(cherry picked from commit eb13dd5af48535c64196c9c6aa5e5235f37f6555)
Prefer the DefaultChanid setting when picking EPG channel.

This more closely matches the logic of picking the starting channel
during Live TV startup.  Refs #11922.

(cherry picked from commit 77ddcc1b0f7b3fe791eadeb0fd111eb834d9c1ad)
Add Program Guide to the top-level menu.

For menu themes that contain Watch Live TV in the top-level
mainmenu.xml, add a button for Program Guide.  This only applies to
defaultmenu and mediacentermenu themes.  Refs #11922.

(cherry picked from commit c5f22566150e27cd977dc9e27aa2a4f683517eba)
Add tunability tests to the Watch This Channel menu entry.

Make sure the selected channel can actually be tuned before offering
the "Watch This Channel" action.  Refs #11913.

(cherry picked from commit 98c908842bd26ee0afd6c02d305594796b8d6b43)
const-correctness - freeing is modifying

http://stackoverflow.com/questions/2819535/unable-to-free-const-pointers-in-c/2824735#2824735
(cherry picked from commit 99c729697f332a07ba4c42f6c6673eddc0eaf1f2)

Conflicts:
	mythtv/libs/libmythtv/recorders/ExternalStreamHandler.cpp
re-add —extra-cxxflags that got lost during a FFmpeg resync

(cherry picked from commit 3518f1b6f9a1b81e727b09deb7f35ec45c1397f9)
Allow partial reads

Traditionally we've always had RingBuffer::Read() return the number of bytes requested unless we are at the end of the file. But this blocks libav which expects the read to complete fairly quickly even if it is a blocking read. Instead we should block for only a short time waiting for more data and then return what data we do have as long as we have at least 1 byte of data.

Based on a patch by DanielK
Fixes #12179
Ref #10658

(cherry picked from commit 5433b7647f6ce97b606c36829340ae311ef7da4c)

Conflicts:
	mythtv/libs/libmythtv/ringbuffer.cpp
Increase myth:// filetransfer timeout values.

Also reset attempts count once it successfully transfer data

(cherry picked from commit 330ae8a94393c5d48fec69289d3f1abea7d57cb4)
Prevent crash opening audio settings page when invalid device is retrieved

(cherry picked from commit 6be8c81d6cf50b92e170b4279d3b64fd46d61904)
Abort early when trying to open a 0 bytes file size if it’s not being written to

This could cause a 10s delay liveTV startup as backend attempts to open the first dummy recording

(cherry picked from commit 1532ac03481b6750556eb76aca79c569ab553152)
Stop readahead thread if the file isn’t opened.

No point trying to read from the file when there’s nothing to read

(cherry picked from commit 6b9b113b3e83e4298fb4b62ed170b9d94d9b2007)
Fix dummy recording file sometimes not being deleted

This sometimes occurred at the start of LiveTV, causing a 0 byte recording that will never get deleted (and cause the frontend to keep trying to open recording for 10s)

(cherry picked from commit 6e5d8cff72fb116d707d9cb165aec023c7fd3b27)
Return an error when the file couldn’t be successfully opened

Otherwise it just cause the created ringbuffer to keep reading the file over and over

(cherry picked from commit 2b9231bb09aa97cf2f6f2f155f6740f2d3d527d5)
Bump ABI
Set version to 0.27.2