[mythtv-commits] Ticket #13247: Backend won't change inputs with PVR-150 - regression from 27.6
MythTV
noreply at mythtv.org
Wed Mar 14 02:34:28 UTC 2018
#13247: Backend won't change inputs with PVR-150 - regression from 27.6
--------------------------------------+--------------------------
Reporter: ltskinol@… | Owner: jyavenard
Type: Bug Report - General | Status: new
Priority: major | Milestone: needs_triage
Component: MythTV - Recording | Version: v29.1
Severity: medium | Keywords:
Ticket locked: 0 |
--------------------------------------+--------------------------
I have mythtv 29.1 installed on Arch Linux with a PVR-150 card. That card
has multiple inputs and I'm using the Tuner and Composite 1 inputs for two
different sources of TV. When I upgraded from a Gentoo 28/fixes release
to 29.1 on Arch, Myth has refused to consistently switch between the two
inputs - always insisting on recording on the first-defined input.
Neither live TV nor recordings worked.
For the PVR-150, you define two tuners (both with the same /dev/video0
device), then associate two listing sources, one per tuner. If the
listing sources have different ranges of channels (with the tuner, say,
being 2-99 and the composite being 100-199), Myth should (and did) switch
between inputs based on changing the channel number.
After _much_ banging of head, I decided to dive into the code, and found a
mistake/regression from the release of 27.6 to 28.0. It's in tv_rec.cpp,
around line 3540. The change is:
if (!inputname.isEmpty())
{
- curCardID = channel->GetInputID();
- newCardID = channel->GetInputID();
+ curInputID = channel->GetInputID();
+ newInputID = channel->GetInputID();
LOG(VB_GENERAL, LOG_INFO, LOC + QString("HW Tuner: %1->%2")
- .arg(curCardID).arg(newCardID));
+ .arg(curInputID).arg(newInputID));
}
- if (curCardID != newCardID ||
!CardUtil::IsChannelReusable(genOpt.cardtype))
This is 108d12d6507a9b6f61c81a7335e9c40fba96dce5 ( gigem committed on Jul
12, 2015 ) and it's obviously incorrect. curInputID and newInputID now
grab the same value, and therefore are always the same. The last if()
statement then doesn't execute, which causes the input change to not
happen. This looks like a mistake in the refactoring.
I don't know what the proper fix is, but if I hack in "curInputID = 55;",
thus ensuring that the last if() statement executes, the input changes as
expected.
Please fix.
One other thing: this fixes the input switch when starting a recording,
but doesn't address a (perhaps) related bug in that inputs also don't
switch when changing channels with live TV. I don't know where to look
for that bug.
Also, tv_rec.cpp is identical in this area from version 28.0 through the
current head.
Thanks.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13247>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list