add workaround also for duplicate(non dvb compliant) tsid/nid combinations in cable /
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 29 Apr 2008 12:24:22 +0000 (12:24 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Tue, 29 Apr 2008 12:24:22 +0000 (12:24 +0000)
terrestrial networks

lib/dvb/db.cpp
lib/dvb/frontend.cpp

index 03c5121..e4a9771 100644 (file)
@@ -1160,10 +1160,15 @@ RESULT eDVBDB::removeServices(eDVBChannelID chid, unsigned int orbpos)
                        if ((unsigned int)sat.orbital_position != orbpos)
                                remove=false;
                }
                        if ((unsigned int)sat.orbital_position != orbpos)
                                remove=false;
                }
-               else if (orbpos != 0xFFFFFFFF) // do not remove -C or -T transponders when a orbital position is given..
-                       remove=false;
-               if ( remove && chid.dvbnamespace != eNs && chid.dvbnamespace != ch.dvbnamespace )
-                       remove=false;
+               if ( remove && chid.dvbnamespace != eNs )
+               {
+                       if (system == iDVBFrontend::feCable && chid.dvbnamespace.get() == 0xFFFF0000)
+                               ;
+                       else if (system == iDVBFrontend::feTerrestrial && chid.dvbnamespace.get() == 0xEEEE0000)
+                               ;
+                       else if ( chid.dvbnamespace != ch.dvbnamespace )
+                               remove=false;
+               }
                if ( remove && chid.original_network_id != eOnid && chid.original_network_id != ch.original_network_id )
                        remove=false;
                if ( remove && chid.transport_stream_id != eTsid && chid.transport_stream_id != ch.transport_stream_id )
                if ( remove && chid.original_network_id != eOnid && chid.original_network_id != ch.original_network_id )
                        remove=false;
                if ( remove && chid.transport_stream_id != eTsid && chid.transport_stream_id != ch.transport_stream_id )
@@ -1249,8 +1254,15 @@ RESULT eDVBDB::removeFlags(unsigned int flagmask, eDVBChannelID chid, unsigned i
                        if ((unsigned int)sat.orbital_position != orbpos)
                                remove=false;
                }
                        if ((unsigned int)sat.orbital_position != orbpos)
                                remove=false;
                }
-               if ( remove && chid.dvbnamespace != eNs && chid.dvbnamespace != ch.dvbnamespace )
-                       remove=false;
+               if ( remove && chid.dvbnamespace != eNs )
+               {
+                       if (system == iDVBFrontend::feCable && chid.dvbnamespace.get() == 0xFFFF0000)
+                               ;
+                       else if (system == iDVBFrontend::feTerrestrial && chid.dvbnamespace.get() == 0xEEEE0000)
+                               ;
+                       else if ( chid.dvbnamespace != ch.dvbnamespace )
+                               remove=false;
+               }
                if ( remove && chid.original_network_id != eOnid && chid.original_network_id != ch.original_network_id )
                        remove=false;
                if ( remove && chid.transport_stream_id != eTsid && chid.transport_stream_id != ch.transport_stream_id )
                if ( remove && chid.original_network_id != eOnid && chid.original_network_id != ch.original_network_id )
                        remove=false;
                if ( remove && chid.transport_stream_id != eTsid && chid.transport_stream_id != ch.transport_stream_id )
index c7a475d..8754e77 100644 (file)
@@ -371,9 +371,11 @@ RESULT eDVBFrontendParameters::getHash(unsigned long &hash) const
        }
        case iDVBFrontend::feCable:
                hash = 0xFFFF0000;
        }
        case iDVBFrontend::feCable:
                hash = 0xFFFF0000;
+               hash |= (cable.frequency/1000)&0xFFFF;
                return 0;
        case iDVBFrontend::feTerrestrial:
                hash = 0xEEEE0000;
                return 0;
        case iDVBFrontend::feTerrestrial:
                hash = 0xEEEE0000;
+               hash |= (terrestrial.frequency/1000)&0xFFFF;
                return 0;
        default:
                return -1;
                return 0;
        default:
                return -1;