aboutsummaryrefslogtreecommitdiff
path: root/lib/dvb_ci
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-07-19 18:19:48 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-07-19 18:19:48 +0000
commit0d8132d3512dbf77d817aa8fb6684384155b642e (patch)
tree638671e91da1631c59c8b26e8813d506c5c77bdc /lib/dvb_ci
parente794d772380ab8b74a2459a07d2f61b49e3a1cf0 (diff)
downloadenigma2-0d8132d3512dbf77d817aa8fb6684384155b642e.tar.gz
enigma2-0d8132d3512dbf77d817aa8fb6684384155b642e.zip
add ability to choose "Multiple service support (auto/no/yes)" in Ci Setup
Diffstat (limited to 'lib/dvb_ci')
-rw-r--r--lib/dvb_ci/dvbci.cpp29
1 files changed, 20 insertions, 9 deletions
diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp
index 9c4e0ac2..f6462620 100644
--- a/lib/dvb_ci/dvbci.cpp
+++ b/lib/dvb_ci/dvbci.cpp
@@ -6,6 +6,7 @@
#include <lib/base/ebase.h>
#include <lib/base/eerror.h>
+#include <lib/base/nconfig.h> // access to python config
#include <lib/dvb/pmt.h>
#include <lib/dvb_ci/dvbci.h>
#include <lib/dvb_ci/dvbci_session.h>
@@ -217,6 +218,24 @@ void eDVBCIInterfaces::ciRemoved(eDVBCISlot *slot)
}
}
+static bool canDescrambleMultipleServices(int slotid)
+{
+ char configStr[255];
+ snprintf(configStr, 255, "config.ci%d.canDescrambleMultipleServices", slotid);
+ std::string str;
+ ePythonConfigQuery::getConfigValue(configStr, str);
+ eDebug("str is %s", str.empty()?"empty" : str.c_str());
+ if ( str == "auto" )
+ {
+ std::string appname = eDVBCI_UI::getInstance()->getAppName(slotid);
+ if (appname.find("AlphaCrypt") != std::string::npos)
+ return true;
+ }
+ else if (str == "yes")
+ return true;
+ return false;
+}
+
void eDVBCIInterfaces::recheckPMTHandlers()
{
// eDebug("recheckPMTHAndlers()");
@@ -278,7 +297,6 @@ void eDVBCIInterfaces::recheckPMTHandlers()
{
if ( tmp->cislot )
{
- bool canHandleMultipleServices=false;
eServiceReferenceDVB ref2;
tmp->pmthandler->getServiceReference(ref2);
eDVBChannelID s1, s2;
@@ -286,15 +304,8 @@ void eDVBCIInterfaces::recheckPMTHandlers()
{
ref.getChannelID(s1);
ref2.getChannelID(s2);
- // FIXME .. build a "ci can handle multiple services" config entry
- // Yes / No / Auto
- if ( eDVBCI_UI::getInstance()->getAppName(ci_it->getSlotID()) == "AlphaCrypt" )
- {
- canHandleMultipleServices = true;
- eDebug("Alphacrypt can handle multiple services");
- }
}
- if (ref == ref2 || (s1 == s2 && canHandleMultipleServices) )
+ if (ref == ref2 || (s1 == s2 && canDescrambleMultipleServices(ci_it->getSlotID())))
{
it->cislot = tmp->cislot;
++it->cislot->use_count;