From fbab44c8c69af0d9830e3b1bfacd5125e720d8c7 Mon Sep 17 00:00:00 2001 From: FlatTV Date: Sat, 25 Jun 2016 13:06:12 +0200 Subject: [PATCH] channellist: set CI channel inactive if recording with CI Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/570d1b10f25c327b770ef3f85581bf890f935a7f Author: FlatTV Date: 2016-06-25 (Sat, 25 Jun 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/record.cpp | 16 ++++++++++++++++ src/driver/record.h | 1 + src/gui/channellist.cpp | 4 ++++ 3 files changed, 21 insertions(+) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index ebca39f52..0c36af20e 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -1783,6 +1783,22 @@ CRecordInstance* CRecordManager::getRecordInstance(std::string file) return NULL; } +//NI +CRecordInstance* CRecordManager::getUseCI() +{ + mutex.lock(); + for(recmap_iterator_t it = recmap.begin(); it != recmap.end(); it++) { + CRecordInstance * inst = it->second; + CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(inst->GetChannelId()); + if (channel->bUseCI) { + mutex.unlock(); + return inst; + } + } + mutex.unlock(); + return NULL; +} + #if 0 /* should return true, if recordingstatus changed in this function ? */ bool CRecordManager::doGuiRecord() diff --git a/src/driver/record.h b/src/driver/record.h index 4cb21b809..bbc93ce1f 100644 --- a/src/driver/record.h +++ b/src/driver/record.h @@ -233,6 +233,7 @@ class CRecordManager : public CMenuTarget /*, public CChangeObserver*/ void StartTimeshift(); int GetRecordMode(const t_channel_id channel_id=0); CRecordInstance* getRecordInstance(std::string file); + CRecordInstance* getUseCI(); //NI // old code #if 0 bool MountDirectory(const char *recordingDir); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index a1c55a802..21681ffc4 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2265,6 +2265,10 @@ bool CChannelList::SameTP(CZapitChannel * channel) if (IS_WEBTV(channel->getChannelID())) return true; + //NI + if(channel->bUseCI && CRecordManager::getInstance()->getUseCI()) + return false; + iscurrent = CFEManager::getInstance()->canTune(channel); } return iscurrent;