From 8b6e826c85a1e6b3f3663642c2047f824dedf6d3 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Wed, 25 Jan 2012 17:34:28 +0400 Subject: [PATCH] cam: restore code from master Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c9bcd79ac0fdcabacc8eb1f348c68ff9c528b029 Author: [CST] Focus Date: 2012-01-25 (Wed, 25 Jan 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/zapit/include/zapit/cam.h | 2 -- src/zapit/src/cam.cpp | 14 +++++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/zapit/include/zapit/cam.h b/src/zapit/include/zapit/cam.h index ebfcf5d7c..3d8c8b735 100644 --- a/src/zapit/include/zapit/cam.h +++ b/src/zapit/include/zapit/cam.h @@ -46,7 +46,6 @@ class CCam : public CBasicClient virtual unsigned char getVersion(void) const; virtual const char *getSocketName(void) const; int camask, demuxes[3]; - int source_demux; public: CCam(); @@ -54,7 +53,6 @@ class CCam : public CBasicClient bool setCaPmt(CCaPmt * const caPmt, int _demux = 0, int _camask = 1, bool update = false); int getCaMask(void) { return camask; }; int makeMask(int demux, bool add); - int getSource() { return source_demux; }; }; typedef std::map cammap_t; diff --git a/src/zapit/src/cam.cpp b/src/zapit/src/cam.cpp index d66212b3b..99b42ee28 100644 --- a/src/zapit/src/cam.cpp +++ b/src/zapit/src/cam.cpp @@ -33,7 +33,6 @@ CCam::CCam() { camask = 0; demuxes[0] = demuxes[1] = demuxes[2] = 0; - source_demux = -1; } unsigned char CCam::getVersion(void) const @@ -73,7 +72,6 @@ bool CCam::sendMessage(const char * const data, const size_t length, bool update bool CCam::setCaPmt(CCaPmt * const caPmt, int _demux, int _camask, bool update) { camask = _camask; - source_demux = _demux; printf("CCam::setCaPmt cam %x source %d camask %d update %s\n", (int) this, _demux, camask, update ? "yes" : "no" ); if(camask == 0) { @@ -142,7 +140,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start printf("CCamManager: channel %llx not found\n", channel_id); return false; } -printf("CCam::SetMode: channel %llx [%s] mode %d %s update %d\n", channel_id, channel->getName().c_str(), mode, start ? "START" : "STOP", force_update); + mutex.lock(); if(channel->getCaPmt() == NULL) { printf("CCamManager: channel %llx dont have caPmt\n", channel_id); @@ -150,6 +148,8 @@ printf("CCam::SetMode: channel %llx [%s] mode %d %s update %d\n", channel_id, ch return false; } + sat_iterator_t sit = satellitePositions.find(channel->getSatellitePosition()); + cammap_iterator_t it = channel_map.find(channel_id); if(it != channel_map.end()) { cam = it->second; @@ -167,8 +167,8 @@ printf("CCam::SetMode: channel %llx [%s] mode %d %s update %d\n", channel_id, ch demux = LIVE_DEMUX; break; case RECORD: - source = channel->getRecordDemux(); //DEMUX_SOURCE_0;//FIXME - demux = channel->getRecordDemux(); //RECORD_DEMUX;//FIXME + source = DEMUX_SOURCE_0; + demux = RECORD_DEMUX;//FIXME break; case STREAM: source = DEMUX_SOURCE_0; @@ -182,10 +182,6 @@ printf("CCam::SetMode: channel %llx [%s] mode %d %s update %d\n", channel_id, ch else newmask = cam->makeMask(demux, start); - if(cam->getSource() > 0) - source = cam->getSource(); - -printf("CCam::SetMode: source %d old mask %d new mask %d force update %s\n", source, oldmask, newmask, force_update ? "yes" : "no"); if((oldmask != newmask) || force_update) cam->setCaPmt(channel->getCaPmt(), source, newmask, true);