Skip to content
Browse files

Support limited multirec on digital tuners that don't use multiplexes.

This is primarily intended for cable card tuners like the Ceton and
HDHomerun Prime.  In theory, other tuners which produce digital
output, such as firewire and the analog side of the HVR-2250, could do
this too when they are converted to use the newer stream handler.

This change will not magically make these cards capable of recording
more than one channel at a time on the same tuner.  It will, hoever,
let the same content be written to different recordings when they
overlap because of pre/post-roll or start-early/end-late settings.

Note that the scheduler does not currently try to place overlapping
programs to take advantage of multirec.  A future change will try to
address that.
  • Loading branch information...
1 parent 244ce4f commit cd86668485773e271f6950b79e2921e9130a8886 @gigem gigem committed May 8, 2014
View
4 mythtv/bindings/perl/MythTV.pm
@@ -107,8 +107,8 @@ package MythTV;
# Note: as of July 21, 2010, this is actually a string, to account for proto
# versions of the form "58a". This will get used if protocol versions are
# changed on a fixes branch ongoing.
- our $PROTO_VERSION = "80";
- our $PROTO_TOKEN = "TaDah!";
+ our $PROTO_VERSION = "81";
+ our $PROTO_TOKEN = "MultiRecDos";
# currentDatabaseVersion is defined in libmythtv in
# mythtv/libs/libmythtv/dbcheck.cpp and should be the current MythTV core
View
4 mythtv/bindings/php/MythBackend.php
@@ -11,8 +11,8 @@ class MythBackend {
// MYTH_PROTO_VERSION is defined in libmyth in mythtv/libs/libmyth/mythcontext.h
// and should be the current MythTV protocol version.
- static $protocol_version = '80';
- static $protocol_token = 'TaDah!';
+ static $protocol_version = '81';
+ static $protocol_token = 'MultiRecDos';
// The character string used by the backend to separate records
static $backend_separator = '[]:[]';
View
4 mythtv/bindings/python/MythTV/static.py
@@ -8,8 +8,8 @@
SCHEMA_VERSION = 1324
NVSCHEMA_VERSION = 1007
MUSICSCHEMA_VERSION = 1018
-PROTO_VERSION = '80'
-PROTO_TOKEN = 'TaDah!'
+PROTO_VERSION = '81'
+PROTO_TOKEN = 'MultiRecDos'
BACKEND_SEP = '[]:[]'
INSTALL_PREFIX = '/usr/local'
View
4 mythtv/libs/libmythbase/mythversion.h
@@ -39,8 +39,8 @@
* http://www.mythtv.org/wiki/Category:Myth_Protocol_Commands
* http://www.mythtv.org/wiki/Category:Myth_Protocol
*/
-#define MYTH_PROTO_VERSION "80"
-#define MYTH_PROTO_TOKEN "TaDah!"
+#define MYTH_PROTO_VERSION "81"
+#define MYTH_PROTO_TOKEN "MultiRecDos"
/** \brief Increment this whenever the MythTV core database schema changes.
*
View
4 mythtv/libs/libmythtv/cardutil.cpp
@@ -1239,14 +1239,14 @@ QList<InputInfo> CardUtil::GetAllInputInfo()
uint CardUtil::GetCardID(uint inputid)
{
- InputInfo info(QString::null, 0, inputid, 0, 0, 0);
+ InputInfo info(QString::null, 0, inputid, 0, 0, 0, 0);
GetInputInfo(info);
return info.cardid;
}
QString CardUtil::GetInputName(uint inputid)
{
- InputInfo info(QString::null, 0, inputid, 0, 0, 0);
+ InputInfo info(QString::null, 0, inputid, 0, 0, 0, 0);
GetInputInfo(info);
return info.name;
}
View
15 mythtv/libs/libmythtv/channelutil.cpp
@@ -1885,7 +1885,8 @@ bool ChannelUtil::GetATSCChannel(uint sourceid, const QString &channum,
}
bool ChannelUtil::GetChannelData(
- uint sourceid, const QString &channum,
+ uint sourceid,
+ uint &chanid, const QString &channum,
QString &tvformat, QString &modulation,
QString &freqtable, QString &freqid,
int &finetune, uint64_t &frequency,
@@ -1908,7 +1909,7 @@ bool ChannelUtil::GetChannelData(
query.prepare(
"SELECT finetune, freqid, tvformat, freqtable, "
" commmethod, mplexid, "
- " atsc_major_chan, atsc_minor_chan, serviceid "
+ " atsc_major_chan, atsc_minor_chan, serviceid, chanid "
"FROM channel, videosource "
"WHERE videosource.sourceid = channel.sourceid AND "
" channum = :CHANNUM AND "
@@ -1939,6 +1940,7 @@ bool ChannelUtil::GetChannelData(
atsc_major = query.value(6).toUInt();
atsc_minor = query.value(7).toUInt();
mpeg_prog_num = (query.value(8).isNull()) ? -1 : query.value(8).toInt();
+ chanid = query.value(9).toUInt();
if (!mplexid || (mplexid == 32767)) /* 32767 deals with old lineups */
return true;
@@ -2305,6 +2307,7 @@ uint ChannelUtil::GetNextChannel(
const ChannelInfoList &sorted,
uint old_chanid,
uint mplexid_restriction,
+ uint chanid_restriction,
ChannelChangeDirection direction,
bool skip_non_visible,
bool skip_same_channum_and_callsign)
@@ -2342,7 +2345,9 @@ uint ChannelUtil::GetNextChannel(
it->channum == start->channum &&
it->callsign == start->callsign) ||
(mplexid_restriction &&
- (mplexid_restriction != it->mplexid))));
+ (mplexid_restriction != it->mplexid)) ||
+ (chanid_restriction &&
+ (chanid_restriction != it->chanid))));
}
else if ((CHANNEL_DIRECTION_UP == direction) ||
(CHANNEL_DIRECTION_FAVORITE == direction))
@@ -2359,7 +2364,9 @@ uint ChannelUtil::GetNextChannel(
it->channum == start->channum &&
it->callsign == start->callsign) ||
(mplexid_restriction &&
- (mplexid_restriction != it->mplexid))));
+ (mplexid_restriction != it->mplexid)) ||
+ (chanid_restriction &&
+ (chanid_restriction != it->chanid))));
}
return it->chanid;
View
4 mythtv/libs/libmythtv/channelutil.h
@@ -171,7 +171,8 @@ class MTV_PUBLIC ChannelUtil
static int GetChanID(uint sourceid, const QString &channum)
{ return GetChannelValueInt("chanid", sourceid, channum); }
static bool GetChannelData(
- uint sourceid, const QString &channum,
+ uint sourceid,
+ uint &chanid, const QString &channum,
QString &tvformat, QString &modulation,
QString &freqtable, QString &freqid,
int &finetune, uint64_t &frequency,
@@ -208,6 +209,7 @@ class MTV_PUBLIC ChannelUtil
static uint GetNextChannel(const ChannelInfoList &sorted,
uint old_chanid,
uint mplexid_restriction,
+ uint chanid_restriction,
ChannelChangeDirection direction,
bool skip_non_visible = true,
bool skip_same_channum_and_callsign = false);
View
18 mythtv/libs/libmythtv/inputinfo.cpp
@@ -5,13 +5,14 @@
InputInfo::InputInfo(
const QString &_name,
- uint _sourceid, uint _inputid, uint _cardid, uint _mplexid,
+ uint _sourceid, uint _inputid, uint _cardid, uint _mplexid, uint _chanid,
uint _livetvorder) :
name(_name),
sourceid(_sourceid),
inputid(_inputid),
cardid(_cardid),
mplexid(_mplexid),
+ chanid(_chanid),
livetvorder(_livetvorder)
{
name.detach();
@@ -48,7 +49,8 @@ bool InputInfo::FromStringList(QStringList::const_iterator &it,
recPriority = (*it).toInt(); NEXT();
scheduleOrder = (*it).toUInt(); NEXT();
- quickTune = (*it).toUInt(); ++it;
+ quickTune = (*it).toUInt(); NEXT();
+ chanid = (*it).toUInt(); ++it;
return true;
}
@@ -66,19 +68,20 @@ void InputInfo::ToStringList(QStringList &list) const
list.push_back(QString::number(recPriority));
list.push_back(QString::number(scheduleOrder));
list.push_back(QString::number(quickTune));
+ list.push_back(QString::number(chanid));
}
TunedInputInfo::TunedInputInfo(
const QString &_name,
uint _sourceid, uint _inputid, uint _cardid, uint _mplexid,
uint _livetvorder, uint _chanid) :
- InputInfo(_name, _sourceid, _inputid, _cardid, _mplexid, _livetvorder),
- chanid(_chanid)
+ InputInfo(_name, _sourceid, _inputid, _cardid, _mplexid, _chanid,
+ _livetvorder)
{
}
TunedInputInfo::TunedInputInfo(const TunedInputInfo &other) :
- InputInfo(other), chanid(other.chanid)
+ InputInfo(other)
{
}
@@ -98,18 +101,15 @@ void TunedInputInfo::Clear(void)
bool TunedInputInfo::FromStringList(QStringList::const_iterator &it,
QStringList::const_iterator end)
{
- if (!InputInfo::FromStringList(it, end) || (it == end))
+ if (!InputInfo::FromStringList(it, end))
return false;
- chanid = (*it).toUInt();
- ++it;
return true;
}
void TunedInputInfo::ToStringList(QStringList &list) const
{
InputInfo::ToStringList(list);
- list.push_back(QString::number(chanid));
}
ChannelInputInfo::ChannelInputInfo(const ChannelInputInfo &other) :
View
15 mythtv/libs/libmythtv/inputinfo.h
@@ -14,18 +14,19 @@ class MTV_PUBLIC InputInfo
public:
InputInfo() : name(QString::null),
sourceid(0), inputid(0), cardid(0), mplexid(0),
- recPriority(0), scheduleOrder(0),
+ chanid(0), recPriority(0), scheduleOrder(0),
livetvorder(0), quickTune(false) {}
InputInfo(const QString &name,
uint sourceid, uint inputid, uint cardid, uint mplexid,
- uint livetvorder);
+ uint chanid, uint livetvorder);
InputInfo(const InputInfo &other) :
name(other.name),
sourceid(other.sourceid),
inputid(other.inputid),
cardid(other.cardid),
mplexid(other.mplexid),
+ chanid(other.chanid),
displayName(other.displayName),
recPriority(other.recPriority),
scheduleOrder(other.scheduleOrder),
@@ -43,6 +44,7 @@ class MTV_PUBLIC InputInfo
inputid = other.inputid;
cardid = other.cardid;
mplexid = other.mplexid;
+ chanid = other.chanid;
displayName = other.displayName;
recPriority = other.recPriority;
scheduleOrder = other.scheduleOrder;
@@ -72,6 +74,7 @@ class MTV_PUBLIC InputInfo
uint inputid; ///< unique key in DB for this input
uint cardid; ///< card id associated with input
uint mplexid; ///< mplexid restriction if applicable
+ uint chanid; ///< chanid restriction if applicable
QString displayName;
int recPriority;
uint scheduleOrder;
@@ -82,7 +85,7 @@ class MTV_PUBLIC InputInfo
class MTV_PUBLIC TunedInputInfo : public InputInfo
{
public:
- TunedInputInfo() : chanid(0) { }
+ TunedInputInfo() { }
TunedInputInfo(const QString &name,
uint _sourceid, uint _inputid,
uint _cardid, uint _mplexid, uint _livetvorder,
@@ -96,9 +99,6 @@ class MTV_PUBLIC TunedInputInfo : public InputInfo
virtual void ToStringList(QStringList &list) const;
virtual void Clear(void);
-
- public:
- uint chanid;
};
class MTV_PUBLIC ChannelInputInfo : public InputInfo
@@ -114,7 +114,8 @@ class MTV_PUBLIC ChannelInputInfo : public InputInfo
uint _inputid, uint _mplexid,
uint _livetvorder,
const ChannelInfoList &_channels) :
- InputInfo(_name, _sourceid, _inputid, _cardid, _mplexid, _livetvorder),
+ InputInfo(_name, _sourceid, _inputid, _cardid, _mplexid, 0,
+ _livetvorder),
startChanNum(_startChanNum),
tuneToChannel(_tuneToChannel), externalChanger(_externalChanger),
channels(_channels),
View
62 mythtv/libs/libmythtv/recorders/channelbase.cpp
@@ -125,14 +125,16 @@ bool ChannelBase::Init(QString &inputname, QString &startchannel, bool setchan)
while (it != inputs.end() && !ok)
{
uint mplexid_restriction = 0;
+ uint chanid_restriction = 0;
ChannelInfoList channels = GetChannels(*it);
if (channels.size() &&
- IsInputAvailable(GetInputByName(*it), mplexid_restriction))
+ IsInputAvailable(GetInputByName(*it), mplexid_restriction,
+ chanid_restriction))
{
uint chanid = ChannelUtil::GetNextChannel(
channels, channels[0].chanid,
- mplexid_restriction, CHANNEL_DIRECTION_UP);
+ mplexid_restriction, chanid_restriction, CHANNEL_DIRECTION_UP);
ChannelInfoList::const_iterator cit =
find(channels.begin(), channels.end(), chanid);
@@ -141,7 +143,8 @@ bool ChannelBase::Init(QString &inputname, QString &startchannel, bool setchan)
{
if (!setchan)
{
- ok = IsTunable(*it, (mplexid_restriction) ?
+ ok = IsTunable(*it, (mplexid_restriction ||
+ chanid_restriction) ?
(*cit).channum : startchannel);
}
else
@@ -150,7 +153,7 @@ bool ChannelBase::Init(QString &inputname, QString &startchannel, bool setchan)
if (ok)
{
inputname = *it;
- if (mplexid_restriction)
+ if (mplexid_restriction || chanid_restriction)
{
startchannel = (*cit).channum;
startchannel.detach();
@@ -193,7 +196,8 @@ bool ChannelBase::IsTunable(const QString &input, const QString &channum) const
}
uint mplexid_restriction;
- if (!IsInputAvailable(inputid, mplexid_restriction))
+ uint chanid_restriction;
+ if (!IsInputAvailable(inputid, mplexid_restriction, chanid_restriction))
{
LOG(VB_GENERAL, LOG_ERR, loc + " " +
QString("Requested channel is on input '%1' "
@@ -208,10 +212,10 @@ bool ChannelBase::IsTunable(const QString &input, const QString &channum) const
int finetune;
uint64_t frequency;
int mpeg_prog_num;
- uint atsc_major, atsc_minor, mplexid, tsid, netid;
+ uint atsc_major, atsc_minor, mplexid, chanid, tsid, netid;
bool commfree;
- if (!ChannelUtil::GetChannelData((*it)->sourceid, channum,
+ if (!ChannelUtil::GetChannelData((*it)->sourceid, chanid, channum,
tvformat, modulation, freqtable, freqid,
finetune, frequency, dtv_si_std,
mpeg_prog_num, atsc_major, atsc_minor,
@@ -224,12 +228,14 @@ bool ChannelBase::IsTunable(const QString &input, const QString &channum) const
return false;
}
- if (mplexid_restriction && (mplexid != mplexid_restriction))
+ if ((mplexid_restriction && (mplexid != mplexid_restriction)) ||
+ (chanid_restriction && (chanid != chanid_restriction)))
{
LOG(VB_GENERAL, LOG_ERR, loc + " " +
QString("Channel is valid, but tuner is busy "
- "on different multiplex (%1 != %2)")
- .arg(mplexid).arg(mplexid_restriction));
+ "on different multiplex/channel (%1 != %2) / (%3 != %4)")
+ .arg(mplexid).arg(mplexid_restriction)
+ .arg(chanid).arg(chanid_restriction));
return false;
}
@@ -249,10 +255,13 @@ uint ChannelBase::GetNextChannel(uint chanid, ChannelChangeDirection direction)
}
uint mplexid_restriction = 0;
- (void)IsInputAvailable(m_currentInputID, mplexid_restriction);
+ uint chanid_restriction = 0;
+ (void)IsInputAvailable(m_currentInputID, mplexid_restriction,
+ chanid_restriction);
return ChannelUtil::GetNextChannel(
- m_allchannels, chanid, mplexid_restriction, direction);
+ m_allchannels, chanid, mplexid_restriction, chanid_restriction,
+ direction);
}
uint ChannelBase::GetNextChannel(const QString &channum, ChannelChangeDirection direction) const
@@ -387,7 +396,9 @@ bool ChannelBase::SwitchToInput(int newInputNum, bool setstarting)
return false;
uint mplexid_restriction;
- if (!IsInputAvailable(newInputNum, mplexid_restriction))
+ uint chanid_restriction;
+ if (!IsInputAvailable(newInputNum, mplexid_restriction,
+ chanid_restriction))
return false;
// input switching code would go here
@@ -405,7 +416,8 @@ static bool is_input_group_busy(
QMap<uint,bool> &busygrp,
QMap<uint,bool> &busyrec,
QMap<uint,TunedInputInfo> &busyin,
- uint &mplexid_restriction)
+ uint &mplexid_restriction,
+ uint &chanid_restriction)
{
static QMutex igrpLock;
static InputGroupMap igrp;
@@ -462,8 +474,6 @@ static bool is_input_group_busy(
if (is_busy_input)
return true;
- // If the source's channels aren't digitally tuned then there is a conflict
- is_busy_input = !SourceUtil::HasDigitalChannel(in.sourceid);
if (!is_busy_input && conflicts[0].chanid)
{
MSqlQuery query(MSqlQuery::InitCon());
@@ -479,6 +489,10 @@ static bool is_input_group_busy(
mplexid_restriction = query.value(0).toUInt();
mplexid_restriction = (32767 == mplexid_restriction) ?
0 : mplexid_restriction;
+ if (mplexid_restriction)
+ chanid_restriction = 0;
+ else
+ chanid_restriction = conflicts[0].chanid;
}
}
@@ -492,20 +506,21 @@ static bool is_input_busy(
QMap<uint,bool> &busygrp,
QMap<uint,bool> &busyrec,
QMap<uint,TunedInputInfo> &busyin,
- uint &mplexid_restriction)
+ uint &mplexid_restriction,
+ uint &chanid_restriction)
{
bool is_busy = false;
for (uint i = 0; i < groupids.size() && !is_busy; i++)
{
is_busy |= is_input_group_busy(
inputid, groupids[i], excluded_cardids,
- busygrp, busyrec, busyin, mplexid_restriction);
+ busygrp, busyrec, busyin, mplexid_restriction, chanid_restriction);
}
return is_busy;
}
bool ChannelBase::IsInputAvailable(
- int inputid, uint &mplexid_restriction) const
+ int inputid, uint &mplexid_restriction, uint &chanid_restriction) const
{
if (inputid < 0)
return false;
@@ -533,11 +548,14 @@ bool ChannelBase::IsInputAvailable(
excluded_cardids.push_back(cid);
mplexid_restriction = 0;
+ chanid_restriction = 0;
vector<uint> groupids = CardUtil::GetInputGroups(inputid);
- return !is_input_busy(inputid, groupids, excluded_cardids,
- busygrp, busyrec, busyin, mplexid_restriction);
+ bool res = !is_input_busy(inputid, groupids, excluded_cardids,
+ busygrp, busyrec, busyin, mplexid_restriction,
+ chanid_restriction);
+ return res;
}
/** \fn ChannelBase::GetFreeInputs(const vector<uint>&) const
@@ -597,7 +615,7 @@ vector<InputInfo> ChannelBase::GetFreeInputs(
bool is_busy_grp = is_input_busy(
info.inputid, groupids, excluded_cardids,
- busygrp, busyrec, busyin, info.mplexid);
+ busygrp, busyrec, busyin, info.mplexid, info.chanid);
if (!is_busy_grp && info.livetvorder)
new_list.push_back(info);
View
3 mythtv/libs/libmythtv/recorders/channelbase.h
@@ -136,7 +136,8 @@ class ChannelBase
/// and sets the channel is setstarting is true.
virtual bool SwitchToInput(int inputNum, bool setstarting);
virtual bool IsInputAvailable(
- int inputNum, uint &mplexid_restriction) const;
+ int inputNum, uint &mplexid_restriction,
+ uint &chanid_restrtiction) const;
virtual bool IsExternalChannelChangeSupported(void) { return false; }
int GetStartInput(uint cardid);
View
11 mythtv/libs/libmythtv/recorders/dtvchannel.cpp
@@ -214,7 +214,9 @@ bool DTVChannel::SetChannelByString(const QString &channum)
return false;
uint mplexid_restriction;
- if (!IsInputAvailable(m_currentInputID, mplexid_restriction))
+ uint chanid_restriction;
+ if (!IsInputAvailable(m_currentInputID, mplexid_restriction,
+ chanid_restriction))
{
LOG(VB_GENERAL, LOG_INFO, loc +
QString("Requested channel '%1' is on input '%2' "
@@ -229,10 +231,10 @@ bool DTVChannel::SetChannelByString(const QString &channum)
int finetune;
uint64_t frequency;
int mpeg_prog_num;
- uint atsc_major, atsc_minor, mplexid, tsid, netid;
+ uint atsc_major, atsc_minor, mplexid, chanid, tsid, netid;
if (!ChannelUtil::GetChannelData(
- (*it)->sourceid, channum,
+ (*it)->sourceid, chanid, channum,
tvformat, modulation, freqtable, freqid,
finetune, frequency,
si_std, mpeg_prog_num, atsc_major, atsc_minor, tsid, netid,
@@ -243,7 +245,8 @@ bool DTVChannel::SetChannelByString(const QString &channum)
return false;
}
- if (mplexid_restriction && (mplexid != mplexid_restriction))
+ if ((mplexid_restriction && (mplexid != mplexid_restriction)) ||
+ (chanid_restriction && (chanid != chanid_restriction)))
{
LOG(VB_GENERAL, LOG_ERR, loc +
QString("Requested channel '%1' is not available because "
View
3 mythtv/libs/libmythtv/recorders/v4lchannel.cpp
@@ -631,7 +631,8 @@ bool V4LChannel::SwitchToInput(int inputnum, bool setstarting)
.arg(setstarting ? channum : QString("")));
uint mplexid_restriction;
- if (!IsInputAvailable(inputnum, mplexid_restriction))
+ uint chanid_restriction;
+ if (!IsInputAvailable(inputnum, mplexid_restriction, chanid_restriction))
return false;
QString newFmt = mode_to_format((*it)->videoModeV4L2);
View
15 mythtv/libs/libmythtv/tv_play.cpp
@@ -1919,8 +1919,10 @@ void TV::ShowOSDAskAllow(PlayerContext *ctx)
(*it).is_conflicting = true;
else if (!CardUtil::IsTunerShared(cardid, (*it).info->GetCardID()))
(*it).is_conflicting = true;
- else if ((busy_input.sourceid == (uint)(*it).info->GetSourceID()) &&
- (busy_input.mplexid == (uint)(*it).info->QueryMplexID()))
+ else if ((busy_input.mplexid &&
+ (busy_input.mplexid == (*it).info->QueryMplexID())) ||
+ (!busy_input.mplexid &&
+ (busy_input.chanid == (*it).info->GetChanID())))
(*it).is_conflicting = false;
else
(*it).is_conflicting = true;
@@ -7535,7 +7537,7 @@ void TV::ChangeChannel(PlayerContext *ctx, ChannelChangeDirection direction)
if (channelGroupId > -1)
{
uint chanid = ChannelUtil::GetNextChannel(
- channelGroupChannelList, old_chanid, 0, direction);
+ channelGroupChannelList, old_chanid, 0, 0, direction);
if (chanid)
ChangeChannel(ctx, chanid, "");
return;
@@ -8487,13 +8489,14 @@ QSet<uint> TV::IsTunableOn(TV *tv,
for (uint j = 0; j < inputs.size(); j++)
{
- if (inputs[j].sourceid != sourceid)
- continue;
-
if (inputs[j].mplexid &&
inputs[j].mplexid != mplexid)
continue;
+ if (!inputs[j].mplexid && inputs[j].chanid &&
+ inputs[j].chanid != chanid)
+ continue;
+
tunable_cards.insert(cardids[i]);
break;
View
7 mythtv/libs/libmythtv/tv_rec.cpp
@@ -486,7 +486,7 @@ RecStatusType TVRec::StartRecording(const ProgramInfo *pginfo)
"Checking input group recorders - begin");
vector<uint> &cardids = pendinfo.possibleConflicts;
- uint mplexid = 0, sourceid = 0;
+ uint mplexid = 0, chanid = 0, sourceid = 0;
vector<uint> cardids2;
vector<TVState> states;
@@ -508,12 +508,15 @@ RecStatusType TVRec::StartRecording(const ProgramInfo *pginfo)
if (is_busy && !sourceid)
{
mplexid = pendinfo.info->QueryMplexID();
+ chanid = pendinfo.info->GetChanID();
sourceid = pendinfo.info->GetSourceID();
}
if (is_busy &&
((sourceid != busy_input.sourceid) ||
- (mplexid != busy_input.mplexid)))
+ (mplexid != busy_input.mplexid) ||
+ ((mplexid == 0 || mplexid == 32767) &&
+ chanid != busy_input.chanid)))
{
states.push_back((TVState) RemoteGetState(cardids[i]));
cardids2.push_back(cardids[i]);
View
3 mythtv/libs/libmythtv/tvbrowsehelper.cpp
@@ -359,6 +359,7 @@ void TVBrowseHelper::GetNextProgramDB(
{
chanid = ChannelUtil::GetNextChannel(
db_all_visible_channels, chanid, 0 /*mplexid_restriction*/,
+ 0 /* chanid restriction */,
static_cast<ChannelChangeDirection>(chandir),
true /*skip non visible*/, true /*skip same callsign*/);
}
@@ -495,7 +496,7 @@ void TVBrowseHelper::run()
dir = CHANNEL_DIRECTION_DOWN;
uint chanid = ChannelUtil::GetNextChannel(
- m_tv->channelGroupChannelList, m_chanid, 0, dir);
+ m_tv->channelGroupChannelList, m_chanid, 0, 0, dir);
direction = BROWSE_SAME;
m_tv->channelGroupLock.unlock();
View
5 mythtv/programs/mythbackend/scheduler.cpp
@@ -1092,7 +1092,8 @@ bool Scheduler::FindNextConflict(
// unless the programs are on the same multiplex.
if (p->GetCardID() != q->GetCardID())
{
- if (p->mplexid && (p->mplexid == q->mplexid))
+ if ((p->mplexid && p->mplexid == q->mplexid) ||
+ (!p->mplexid && p->GetChanID() == q->GetChanID()))
continue;
}
@@ -1758,6 +1759,8 @@ bool Scheduler::IsBusyRecording(const RecordingInfo *rcinfo)
(busy_input.mplexid == 0 ||
busy_input.mplexid == 32767 ||
busy_input.mplexid != rcinfo->mplexid) &&
+ (busy_input.chanid == 0 ||
+ busy_input.chanid != rcinfo->GetChanID()) &&
igrp.GetSharedInputGroup(busy_input.inputid, inputid))
{
return true;

0 comments on commit cd86668

Please sign in to comment.
Something went wrong with that request. Please try again.