diff --git a/src/zapit/src/capmt.cpp b/src/zapit/src/capmt.cpp index 7d27244b4..092e58a37 100644 --- a/src/zapit/src/capmt.cpp +++ b/src/zapit/src/capmt.cpp @@ -312,6 +312,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start INFO("\033[33m socket only\033[0m"); cam->makeCaPmt(channel, true); cam->setCaPmt(true); +#if 0 // CI CaIdVector caids; cCA::GetInstance()->GetCAIDS(caids); @@ -323,6 +324,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI); #else cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, mode, start); +#endif #endif } } @@ -333,6 +335,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start INFO("\033[33m (oldmask == newmask)\033[0m"); if (mode) { if(start) { +#if 0 CaIdVector caids; cCA::GetInstance()->GetCAIDS(caids); uint8_t list = CCam::CAPMT_ONLY; @@ -340,6 +343,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start int len; unsigned char * buffer = channel->getRawPmt(len); cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, mode, start); +#endif } else { cam->sendCaPmt(channel->getChannelID(), NULL, 0, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, mode, start); } @@ -370,6 +374,8 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start } #endif #else + mp = false; + /* don't use StopCam() here: ci-cam needs the real mode stop */ cam->sendCaPmt(channel->getChannelID(), NULL, 0, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, mode, start); cam->sendMessage(NULL, 0, false); @@ -379,9 +385,10 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start } // CI -#if ! HAVE_COOL_HARDWARE if (mode && !start) { -#endif + INFO("\033[33m (mode && !start) do we really need this?\033[0m"); + } + CaIdVector caids; cCA::GetInstance()->GetCAIDS(caids); //uint8_t list = CCam::CAPMT_FIRST; @@ -419,8 +426,6 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start ++it; if(!channel) continue; - if(!channel->scrambled) - continue; #if 0 if (it == channel_map.end()) @@ -432,10 +437,7 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start unsigned char * buffer = channel->getRawPmt(len); #if HAVE_COOL_HARDWARE cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_SMARTCARD); -#else - cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, 0, true); #endif - if (tunerno >= 0 && tunerno != cDemux::GetSource(cam->getSource())) { INFO("CI: configured tuner %d do not match %d, skip [%s]", tunerno, cam->getSource(), channel->getName().c_str()); } else if (filter_channels && !channel->bUseCI) { @@ -443,9 +445,12 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start } else if(channel->scrambled) { useCI = true; INFO("CI: use CI for [%s]", channel->getName().c_str()); - } else - INFO("CI: no CI needed for [%s]", channel->getName().c_str()); +#if HAVE_COOL_HARDWARE + cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI); +#endif + } //list = CCam::CAPMT_MORE; +#if ! HAVE_COOL_HARDWARE if((oldmask != newmask) || force_update || (oldmask == newmask && mode && start)) { //temp debug output @@ -456,23 +461,15 @@ bool CCamManager::SetMode(t_channel_id channel_id, enum runmode mode, bool start if(useCI) { -#if HAVE_COOL_HARDWARE - cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI); -#else cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI, channel->scrambled, channel->camap, 0, true); -#endif } -#if ! HAVE_COOL_HARDWARE else { cam->sendCaPmt(channel->getChannelID(), buffer, len, CA_SLOT_TYPE_CI, false /*channel->scrambled*/, channel->camap, mode, start); } -#endif } - } -#if ! HAVE_COOL_HARDWARE - } #endif + } return true; }