X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdvb_ci%2Fdvbci.cpp;h=7c2774e989d6a1eb9876d80dc33cb515c5a89662;hb=45e3ce941d85ae909f9cb9e350e79e765a9fd5a1;hp=b15fcce39fdecaa8f4a54d4d8dde7deaeb9316ad;hpb=d290a6895aaba9660184b2ac9c1bb90d81ae494c;p=vuplus_dvbapp diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index b15fcce..7c2774e 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -73,6 +73,8 @@ int eDVBCIInterfaces::reset(int slotid) if( (slot = getSlot(slotid)) == 0 ) return -1; + eDVBCISession::deleteSessions(slot); + return slot->reset(); } @@ -83,7 +85,31 @@ int eDVBCIInterfaces::enableTS(int slotid, int enable) if( (slot = getSlot(slotid)) == 0 ) return -1; - return slot->enableTS(enable); + int tunernum = 0; + if (enable) + { + 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; + } + } + return slot->enableTS(enable, tunernum); } int eDVBCIInterfaces::initialize(int slotid) @@ -299,6 +325,7 @@ void eDVBCISlot::data(int what) state = stateRemoved; enableTS(0); printf("ci removed\n"); + eDVBCISession::deleteSessions(this); notifier->setRequested(eSocketNotifier::Read); //HACK eDVBCI_UI::getInstance()->setState(0,0); @@ -531,23 +558,34 @@ int eDVBCISlot::sendCAPMT(eDVBServicePMTHandler *pmthandler, const std::vector