From d41938053190e075de41c63acfdcea3e239dcaba Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sat, 14 Jan 2006 22:40:07 +0000 Subject: [PATCH] the CI now is useable for tuner A or tuner B (auto switched) --- lib/dvb_ci/dvbci.cpp | 56 ++++++++++++++++++++++++++++++++++++++------ lib/dvb_ci/dvbci.h | 2 +- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index c3f91482..235b0ac3 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -85,7 +85,37 @@ int eDVBCIInterfaces::enableTS(int slotid, int enable) if( (slot = getSlot(slotid)) == 0 ) return -1; - return slot->enableTS(enable); + int tunernum = 0; + if (enable) + { + tunernum=-1; + PMTHandlerList::iterator it = m_pmt_handlers.begin(); + while (it != m_pmt_handlers.end()) + { + if ( it->cislot == slot ) + { + eDVBServicePMTHandler *pmthandler = it->pmthandler; + eUsePtr channel; + if (!pmthandler->getChannel(channel)) + { + ePtr frontend; + if (!channel->getFrontend(frontend)) + { + eDVBFrontend *fe = (eDVBFrontend*) &(*frontend); + tunernum = fe->getID(); + } + } + break; + } + ++it; + } + if ( tunernum == -1 ) + { + eFatal("couldn't find the correct tuner num in enableTS"); + return -1; + } + } + return slot->enableTS(enable, tunernum); } int eDVBCIInterfaces::initialize(int slotid) @@ -537,19 +567,31 @@ int eDVBCISlot::sendCAPMT(eDVBServicePMTHandler *pmthandler, const std::vector