[mythtv-commits] [MythTV/mythtv] 0371cd: Live TV channel up/down selection

kmdewaal noreply at github.com
Sat Jan 30 20:26:50 UTC 2021


  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 0371cd6121b6278aeb1fe2dfed4efea2c168095e
      https://github.com/MythTV/mythtv/commit/0371cd6121b6278aeb1fe2dfed4efea2c168095e
  Author: Klaas de Waal <kdewaal at mythtv.org>
  Date:   2021-01-30 (Sat, 30 Jan 2021)

  Changed paths:
    M mythtv/libs/libmythtv/channelutil.cpp
    M mythtv/libs/libmythtv/channelutil.h
    M mythtv/libs/libmythtv/livetvchain.cpp
    M mythtv/libs/libmythtv/tvbrowsehelper.cpp

  Log Message:
  -----------
  Live TV channel up/down selection

Browsing channels in Live TV can skip channels when there are channels
with the same channel number and callsign present in another video source.

The way in which it fails is as follows.
Consider a list of all channels from two video sources of which one video source has
a channel with the same number and callsign as found on the other video source.
For example:
- video source 1 has channels 13, 14 and 15
- video source 2 has channels 14.
Start with Live TV channel is 15.
Now do a channel down (down arrow). This shows the next channel in the OSD.
This should be channel 14 but it does show channel 13.

After the down arrow the channel returned by GetNextChannel is 14 on video source 2.
This channel fails the TV::IsTunableOn() test because it is not on video source 1.
Then GetNextChannel is called again to go down one more channel.
The first channel found is 14 on video source 1. This is the channel we want
but it is skipped because the name and callsign are the same as the previous channel
that we could not tune to because it was on video source 2.
The next channel found by GetNextChannel is 13 on video source 1.
This way we skipped channel 14.

This is now fixed by adding a parameter skip_other_sources to ChannelUtil::GetNextChannel
and by calling function from TVBrowseHelper::GetNextProgramDB() with skip_other_sources to true.
Note that the default value of this parameter is false, to avoid regressions in
possible other uses of this function.

For the curious, this video source configuration is useful when the signal has
both free-to-air and encrypted channels and the first tuner can receive all
channels and the second tuner can receive only the free-to-air channels.
Live TV is done with the first tuner only.




More information about the mythtv-commits mailing list