From cfafa606ab8f1502215738b28da85c008d2f3620 Mon Sep 17 00:00:00 2001 From: focus Date: Tue, 9 Aug 2011 13:15:15 +0000 Subject: [PATCH] Add nvodchannels to search for channel id git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1617 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/driver/record.cpp | 27 +++++++++++++++++++-------- src/zapit/src/cam.cpp | 8 ++++++-- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 9b135bdfe..489ad9209 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -64,6 +64,7 @@ extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */ extern t_channel_id live_channel_id; extern t_channel_id rec_channel_id; extern tallchans allchans; +extern tallchans nvodchannels; bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata); bool sectionsd_getEPGidShort(event_id_t epgID, CShortEPGData * epgdata); @@ -221,8 +222,11 @@ bool CRecordInstance::Update() tallchans_iterator cit = allchans.find(channel_id); if(cit == allchans.end()) { - printf("%s: channel %llx not found!\n", __FUNCTION__, channel_id); - return false; + cit = nvodchannels.find(channel_id); + if(cit == nvodchannels.end()) { + printf("%s: channel %llx not found!\n", __FUNCTION__, channel_id); + return false; + } } CZapitChannel * channel = &(cit->second); @@ -353,8 +357,11 @@ record_error_msg_t CRecordInstance::Record() printf("%s: channel %llx recording_id %d\n", __FUNCTION__, channel_id, recording_id); tallchans_iterator cit = allchans.find(channel_id); if(cit == allchans.end()) { - printf("%s: channel %llx not found!\n", __FUNCTION__, channel_id); - return RECORD_INVALID_CHANNEL; + cit = nvodchannels.find(channel_id); + if(cit == nvodchannels.end()) { + printf("%s: channel %llx not found!\n", __FUNCTION__, channel_id); + return RECORD_INVALID_CHANNEL; + } } CZapitChannel * channel = &(cit->second); @@ -602,10 +609,14 @@ record_error_msg_t CRecordInstance::MakeFileName(CZapitChannel * channel) void CRecordInstance::GetRecordString(std::string &str) { tallchans_iterator cit = allchans.find(channel_id); - if(cit == allchans.end()) - str = "Unknown channel : " + GetEpgTitle(); - else - str = cit->second.getName() + ": " + GetEpgTitle(); + if(cit == allchans.end()) { + cit = nvodchannels.find(channel_id); + if(cit == nvodchannels.end()) { + str = "Unknown channel : " + GetEpgTitle(); + return; + } + } + str = cit->second.getName() + ": " + GetEpgTitle(); } //------------------------------------------------------------------------- diff --git a/src/zapit/src/cam.cpp b/src/zapit/src/cam.cpp index 463e5a666..00f29a664 100644 --- a/src/zapit/src/cam.cpp +++ b/src/zapit/src/cam.cpp @@ -29,6 +29,7 @@ #include extern tallchans allchans; +extern tallchans nvodchannels; CCam::CCam() { @@ -137,8 +138,11 @@ bool CCamManager::SetMode(t_channel_id id, enum runmode mode, bool start, bool f tallchans_iterator cit = allchans.find(id); if(cit == allchans.end()) { - printf("CCamManager: channel %llx not found\n", id); - return false; + cit = nvodchannels.find(id); + if(cit == nvodchannels.end()) { + printf("CCamManager: channel %llx not found\n", id); + return false; + } } CZapitChannel * channel = &(cit->second);