diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-09-26 17:24:10 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-09-26 17:24:10 +0000 |
| commit | 865b494130c35c6bda653b196fdbc61890ea76b5 (patch) | |
| tree | e9ad1523882dac50201e5914f2d3a03cf56a7ee5 /lib/dvb/scan.cpp | |
| parent | d1ba8203832c54b4a98978c6033296183a24b4d0 (diff) | |
| download | enigma2-865b494130c35c6bda653b196fdbc61890ea76b5.tar.gz enigma2-865b494130c35c6bda653b196fdbc61890ea76b5.zip | |
- fix scan: initial transponder wasn't used.
Diffstat (limited to 'lib/dvb/scan.cpp')
| -rw-r--r-- | lib/dvb/scan.cpp | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index 4b31aada..7e603314 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -93,6 +93,8 @@ RESULT eDVBScan::nextChannel() } m_ch_current = m_ch_toScan.front(); + m_chid_current = eDVBChannelID(); + m_ch_toScan.pop_front(); if (m_channel->getFrontend(fe)) @@ -163,12 +165,15 @@ void eDVBScan::BATready(int err) channelDone(); } -void eDVBScan::addChannel(const eDVBChannelID &chid, iDVBFrontendParameters *feparm) +void eDVBScan::addKnownGoodChannel(const eDVBChannelID &chid, iDVBFrontendParameters *feparm) { /* add it to the list of known channels. */ if (chid) m_new_channels.insert(std::pair<eDVBChannelID,ePtr<iDVBFrontendParameters> >(chid, feparm)); - +} + +void eDVBScan::addChannelToScan(const eDVBChannelID &chid, iDVBFrontendParameters *feparm) +{ /* check if we don't already have that channel ... */ /* ... in the list of channels to scan */ @@ -271,7 +276,7 @@ void eDVBScan::channelDone() eDVBNamespace ns = buildNamespace(onid, tsid, hash); - addChannel( + addChannelToScan( eDVBChannelID(ns, tsid, onid), feparm); break; @@ -290,6 +295,33 @@ void eDVBScan::channelDone() if ((m_ready & readyAll) != readyAll) return; SCAN_eDebug("channel done!"); + + /* if we had services on this channel, we declare + this channels as "known good". add it. + + (TODO: not yet implemented) + a NIT entry could have possible overridden + our frontend data with more exact data. + + (TODO: not yet implemented) + the tuning process could have lead to more + exact data than the user entered. + + The channel id was probably corrected + by the data written in the SDT. this is + important, as "initial transponder lists" + usually don't have valid CHIDs (and that's + good). + + These are the reasons for adding the transponder + here, and not before. + */ + + if (!m_chid_current) + eWarning("SCAN: the current channel's ID was not corrected - not adding channel."); + else + addKnownGoodChannel(m_chid_current, m_ch_current); + m_ch_scanned.push_back(m_ch_current); nextChannel(); } @@ -327,6 +359,10 @@ RESULT eDVBScan::processSDT(eDVBNamespace dvbnamespace, const ServiceDescription SCAN_eDebug("ONID: %04x", sdt.getOriginalNetworkId()); eDVBChannelID chid(dvbnamespace, sdt.getTransportStreamId(), sdt.getOriginalNetworkId()); + /* save correct CHID for this channel if this is an ACTUAL_SDT */ + if (sdt.getTableId() == TID_SDT_ACTUAL) + m_chid_current = chid; + for (ServiceDescriptionConstIterator s(services.begin()); s != services.end(); ++s) { SCAN_eDebugNoNewLine("SID %04x: ", (*s)->getServiceId()); |
