dont scan transponders from other satellites in scan (previous implementation doesn...
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 18 Nov 2005 11:21:19 +0000 (11:21 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 18 Nov 2005 11:21:19 +0000 (11:21 +0000)
lib/dvb/scan.cpp
lib/dvb/scan.h

index 961812f..8865f30 100644 (file)
@@ -104,7 +104,6 @@ RESULT eDVBScan::nextChannel()
        }
        
        m_ch_current = m_ch_toScan.front();
        }
        
        m_ch_current = m_ch_toScan.front();
-       m_chid_current = eDVBChannelID();
        
        m_ch_toScan.pop_front();
        
        
        m_ch_toScan.pop_front();
        
@@ -113,7 +112,18 @@ RESULT eDVBScan::nextChannel()
                m_event(evtFail);
                return -ENOTSUP;
        }
                m_event(evtFail);
                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_channel_state = iDVBChannel::state_idle;
        if (fe->tune(*m_ch_current))
        {
        m_channel_state = iDVBChannel::state_idle;
        if (fe->tune(*m_ch_current))
        {
@@ -301,7 +311,8 @@ void eDVBScan::channelDone()
                                                
                                                eDVBNamespace ns = buildNamespace(onid, tsid, hash);
                                                
                                                
                                                eDVBNamespace ns = buildNamespace(onid, tsid, hash);
                                                
-                                               if (m_chid_current && ((ns.get() ^ m_chid_current.dvbnamespace.get()) & 0xFFFF0000))
+                                               if ( m_chid_current.dvbnamespace.get() != -1 &&
+                                                       ((ns.get() ^ m_chid_current.dvbnamespace.get()) & 0xFFFF0000))
                                                        eDebug("dropping this transponder, it's on another satellite.");
                                                else
                                                {
                                                        eDebug("dropping this transponder, it's on another satellite.");
                                                else
                                                {
index 4cad6a2..11d0efd 100644 (file)
@@ -71,7 +71,7 @@ public:
        void start(const eSmartPtrList<iDVBFrontendParameters> &known_transponders, int flags);
 
        enum { evtUpdate, evtFinish, evtFail };
        void start(const eSmartPtrList<iDVBFrontendParameters> &known_transponders, int flags);
 
        enum { evtUpdate, evtFinish, evtFail };
-  RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection);
+       RESULT connectEvent(const Slot1<void,int> &event, ePtr<eConnection> &connection);
        void insertInto(iDVBChannelList *db);
        
        void getStats(int &transponders_done, int &transponders_total, int &services);
        void insertInto(iDVBChannelList *db);
        
        void getStats(int &transponders_done, int &transponders_total, int &services);