diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-12-23 01:48:56 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-12-23 01:48:56 +0000 |
| commit | 46f910a175efeaf9558cdc4b59e826d0a5f5f34d (patch) | |
| tree | ba1e9883dd0a5e81f0aa67a711d709d39fd61a27 /lib/dvb/scan.cpp | |
| parent | 9c4515c4fd7b8a8a0c96721abb2d92bad32cb328 (diff) | |
| download | enigma2-46f910a175efeaf9558cdc4b59e826d0a5f5f34d.tar.gz enigma2-46f910a175efeaf9558cdc4b59e826d0a5f5f34d.zip | |
do not scan transponders without SDT more than once (this fixes the never
ending transponder scan in some cable regions)
Diffstat (limited to 'lib/dvb/scan.cpp')
| -rw-r--r-- | lib/dvb/scan.cpp | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index 3c952b8f..a57fd53b 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -120,16 +120,7 @@ RESULT eDVBScan::nextChannel() return -ENOTSUP; } - int fetype; - fe->getFrontendType(fetype); - if ( fetype == iDVBFrontend::feSatellite) - { - eDVBFrontendParametersSatellite p; - m_ch_current->getDVBS(p); - m_chid_current = eDVBChannelID(p.orbital_position << 16, -1, -1); - } - else - m_chid_current = eDVBChannelID(); + m_chid_current = eDVBChannelID(); m_channel_state = iDVBChannel::state_idle; if (fe->tune(*m_ch_current)) @@ -454,18 +445,18 @@ void eDVBScan::channelDone() eDVBFrontendParametersSatellite sat; sat.set(d); feparm->setDVBS(sat); - unsigned long hash=0; - feparm->getHash(hash); - - eDVBNamespace ns = buildNamespace(onid, tsid, hash); - - if ( m_chid_current.dvbnamespace.get() != -1 && - ((ns.get() ^ m_chid_current.dvbnamespace.get()) & 0xFFFF0000)) + + eDVBFrontendParametersSatellite p; + m_ch_current->getDVBS(p); + + if ( p.orbital_position != sat.orbital_position ) SCAN_eDebug("dropping this transponder, it's on another satellite."); else { + unsigned long hash=0; + feparm->getHash(hash); addChannelToScan( - eDVBChannelID(ns, tsid, onid), + eDVBChannelID(buildNamespace(onid, tsid, hash), tsid, onid), feparm); } break; @@ -521,27 +512,25 @@ void eDVBScan::channelDone() 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); - - for (std::list<ePtr<iDVBFrontendParameters> >::iterator i(m_ch_toScan.begin()); i != m_ch_toScan.end();) + m_ch_scanned.push_back(m_ch_current); + + for (std::list<ePtr<iDVBFrontendParameters> >::iterator i(m_ch_toScan.begin()); i != m_ch_toScan.end();) + { + if (sameChannel(*i, m_ch_current)) { - if (sameChannel(*i, m_ch_current)) - { - eDebug("remove dupe 2"); - m_ch_toScan.erase(i++); - continue; - } - ++i; + eDebug("remove dupe 2"); + m_ch_toScan.erase(i++); + continue; } + ++i; } - + nextChannel(); } |
