Re: reelchannelscan for S2API-patched VDR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

you hit a problem with gcc 4.3 changes ;)

svn co
svn://reelbox.org/testing/src/vdr-plugins/src/channelscan-0.6.1 -r9040

The attached patch is absolutley untested. I may work or not.
Basicly it survives the compile test ;)

cu

Edgar (gimli) Hucek

Goga777 schrieb:
> Приветствую, Frank
> 
> thanks for your patch, but I couldn't compile it
> I have
> 
> VDR 1.7.0 with s2api patch from Niels and h264 patch from Reinchard
> gcc version 4.3.2 (Debian 4.3.2-1)
> 
> 
> I have this error 
> 
> make[1]: Entering directory `/usr/src/vdr170_0/PLUGINS/src/channelscan_fks-0.6.1'
> g++ -fPIC -O2 -Wall -Woverloaded-virtual -fno-strict-aliasing -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"reelchannelscan"' -DVDRDIR=\"../../..\" -DBOOST_IOSTREAMS_NO_LIB  -DNDEBUG -I../../../include -I../..//include channelscan.c
> In file included from filter.h:42,
>                   from scan.h:34,
>                   from csmenu.h:42,
>                   from channelscan.c:31:
> transponders.h:358: error: ISO C++ forbids declaration of ‘auto_ptr’ with no type
> transponders.h:358: error: invalid use of ‘::’
> transponders.h:358: error: expected ‘;’ before ‘<’ token
> transponders.h: In member function ‘void cTransponders::ResetNITStartTransponder(cSatTransponder*)’:
> transponders.h:351: error: ‘nitStartTransponder_’ was not declared in this scope
> transponders.h: In member function ‘cTransponder* cTransponders::GetNITStartTransponder()’:
> transponders.h:406: error: ‘nitStartTransponder_’ was not declared in this scope
> In file included from channelscan.c:31:
> csmenu.h: At global scope:
> csmenu.h:224: error: ISO C++ forbids declaration of ‘auto_ptr’ with no type
> csmenu.h:224: error: invalid use of ‘::’
> csmenu.h:224: error: expected ‘;’ before ‘<’ token
> 
> I added #include <memory> in  transponders.h (thanks to free-x for advice) and I have others errors
> 
> Plugin reelchannelscan:
> make[1]: Entering directory `/usr/src/vdr170_0/PLUGINS/src/channelscan_fks-0.6.1'
> make[1]: Leaving directory `/usr/src/vdr170_0/PLUGINS/src/channelscan_fks-0.6.1'
> make[1]: Entering directory `/usr/src/vdr170_0/PLUGINS/src/channelscan_fks-0.6.1'
> g++ -fPIC -O2 -Wall -Woverloaded-virtual -fno-strict-aliasing -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"reelchannelscan"' -DVDRDIR=\"../../..\" -DBOOST_IOSTREAMS_NO_LIB  -DNDEBUG -I../../../include -I../..//include channelscan.c
> g++ -fPIC -O2 -Wall -Woverloaded-virtual -fno-strict-aliasing -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"reelchannelscan"' -DVDRDIR=\"../../..\" -DBOOST_IOSTREAMS_NO_LIB  -DNDEBUG -I../../../include -I../..//include csmenu.c
> csmenu.c: In member function ‘void cMenuScanActive::Setup()’:
> csmenu.c:954: warning: deprecated conversion from string constant to ‘char*’
> csmenu.c:954: warning: deprecated conversion from string constant to ‘char*’
> csmenu.c:954: warning: deprecated conversion from string constant to ‘char*’
> csmenu.c:954: warning: deprecated conversion from string constant to ‘char*’
> g++ -fPIC -O2 -Wall -Woverloaded-virtual -fno-strict-aliasing -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"reelchannelscan"' -DVDRDIR=\"../../..\" -DBOOST_IOSTREAMS_NO_LIB  -DNDEBUG -I../../../include -I../..//include filter.c
> filter.c: In member function ‘virtual void PatFilter::Process(u_short, u_char, const u_char*, int)’:
> filter.c:681: error: no matching function for call to ‘cChannel::SetPids(int&, int, int, int [33], char [33][8], int [17], char [17][8], int [33], char [33][8], int&)’
> ../../../include/vdr/channels.h:232: note: candidates are: void cChannel::SetPids(int, int, int*, char (*)[8], int*, char (*)[8], int*, char (*)[8], int)
> make[1]: *** [filter.o] Ошибка 1
> make[1]: Leaving directory `/usr/src/vdr170_0/PLUGINS/src/channelscan_fks-0.6.1'
> 
> 
> can someone to help me please
> 
> Goga
> 
> 
> 
> 
> 
>> reelchannelscan-plugin from svn
>> svn co svn://reelbox.org/testing/src/vdr-plugins/src/channelscan-0.6.1
>> -r9031
>>
>> and my attached patch.
>>
>> Beware: I DON'T KNOW WHAT I AM DOING HERE!
>> It compiles, it scans transponder and finds channels.
>> It works for me, but I'm no C or C++ programmer...
> 
> _______________________________________________
> vdr mailing list
> vdr@xxxxxxxxxxx
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

diff -uNr channelscan-0.6.1/channelscan.c channelscan-0.6.1.patched/channelscan.c
--- channelscan-0.6.1/channelscan.c	2008-10-17 17:48:21.000000000 +0200
+++ channelscan-0.6.1.patched/channelscan.c	2008-10-17 17:47:03.000000000 +0200
@@ -74,9 +74,11 @@
 #ifdef REELVDR
     SetupStore("ServiceType", "channelscan", ScanSetup.ServiceType);
     SetupStore("Logfile", "channelscan", ScanSetup.EnableLogfile);
+	SetupStore("AddNewChannels", "channelscan", ScanSetup.AddNewChannels);
 #else
     SetupStore("ServiceType", ScanSetup.ServiceType);
     SetupStore("Logfile", ScanSetup.EnableLogfile);
+	SetupStore("AddNewChannels", ScanSetup.AddNewChannels);
 #endif
 }
 
diff -uNr channelscan-0.6.1/channelscan.h channelscan-0.6.1.patched/channelscan.h
--- channelscan-0.6.1/channelscan.h	2008-10-17 17:48:21.000000000 +0200
+++ channelscan-0.6.1.patched/channelscan.h	2008-10-17 17:47:03.000000000 +0200
@@ -49,6 +49,8 @@
     int ServiceType;
     int EnableLogfile;
       std::string logfile;
+    int AddNewChannels;
+
 };
 
 
diff -uNr channelscan-0.6.1/csmenu.c channelscan-0.6.1.patched/csmenu.c
--- channelscan-0.6.1/csmenu.c	2008-10-17 17:48:21.000000000 +0200
+++ channelscan-0.6.1.patched/csmenu.c	2008-10-17 17:47:03.000000000 +0200
@@ -164,7 +164,7 @@
     addNewChannelsToTexts[1] = tr("new channellist");
     addNewChannelsToTexts[2] = tr("bouquets");
 
-    addNewChannelsTo = Setup.AddNewChannels==1?2:0;
+    addNewChannelsTo = ScanSetup.AddNewChannels==1?2:0;
 
     scanMode = 1;               // auto scan
 
@@ -241,7 +241,8 @@
 
             else if (device->ProvidesSource(cSource::stSat))
             {
-                if (device->ProvidesS2())
+                //if (device->ProvidesS2())
+		if (1==1)
                 {
                     asprintf(&txt, "%s (%s %i)", tr("DVB-S2 - Satellite"),
                              tr("Tuner"), tuner + 1);
@@ -591,7 +592,7 @@
             switch( addNewChannelsTo )
             {
                 case 0:
-                    Setup.AddNewChannels = 0;
+                    ScanSetup.AddNewChannels = 0;
                     break;
                 case 1: 
                     //clear channellist
@@ -628,7 +629,7 @@
                     // fallthrough: no break
                 case 2:
                     //add to own Bouquets
-                    Setup.AddNewChannels = 1;
+                    ScanSetup.AddNewChannels = 1;
                     Setup.Save();
                     break;
                 default: 
@@ -1128,6 +1129,9 @@
     }
 }
 
+
+bool scanning_on_receiving_device;
+
 cMenuScanActive::~cMenuScanActive()
 {
     Scan->ShutDown();
diff -uNr channelscan-0.6.1/csmenu.h channelscan-0.6.1.patched/csmenu.h
--- channelscan-0.6.1/csmenu.h	2008-10-17 17:48:21.000000000 +0200
+++ channelscan-0.6.1.patched/csmenu.h	2008-10-17 17:47:03.000000000 +0200
@@ -75,6 +75,8 @@
     dataChannelList;
 #endif
 
+extern bool scanning_on_receiving_device;
+
 // --- cMenuChannelscan  ----------------------------------------------------
 
 class cMenuChannelscan:  public  cOsdMenu
diff -uNr channelscan-0.6.1/filter.c channelscan-0.6.1.patched/filter.c
--- channelscan-0.6.1/filter.c	2008-10-17 17:48:21.000000000 +0200
+++ channelscan-0.6.1.patched/filter.c	2008-10-17 17:47:03.000000000 +0200
@@ -677,7 +677,7 @@
                 }
             }
 #if APIVERSNUM >= 10509 || defined(REELVDR)
-            Channel->SetPids(Vpid, Vpid ? Ppid : 0, Apids, ALangs, Dpids,
+            Channel->SetPids(Vpid, Vpid ? Ppid : 0, 0, Apids, ALangs, Dpids,
                              DLangs, Spids, SLangs, Tpid);
 #else
             Channel->SetPids(Vpid, Vpid ? Ppid : 0, Apids, ALangs, Dpids,
@@ -1233,7 +1233,7 @@
 
                     // same as in channels.c
                     static int CodeRates[] = { FEC_NONE, FEC_1_2, FEC_2_3, FEC_3_4, FEC_4_5, FEC_5_6, FEC_6_7, FEC_7_8, FEC_8_9,        // DVB-S
-                        FEC_1_3, FEC_1_4, FEC_2_5, FEC_3_5, FEC_9_10,
+                        FEC_9_10,
                             FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO, FEC_AUTO,
                             FEC_NONE
                     };          // DVB-S2
@@ -1255,8 +1255,8 @@
                                ts.getOriginalNetworkId());
 
                         static int Rolloffs[] =
-                            { FE_ROLLOFF_35, FE_ROLLOFF_25, FE_ROLLOFF_20,
-            FE_ROLLOFF_35 };
+                            { ROLLOFF_35, ROLLOFF_25, ROLLOFF_20,
+            ROLLOFF_35 };
 
 
                         int Modulation = QPSK;
@@ -1267,7 +1267,7 @@
                          */
 
                         static int ModulationsS2[] =
-                            { QPSK, QPSK_S2, PSK8, QPSK,
+                            { QPSK, PSK_8, QPSK,
                             QPSK, QPSK, QPSK, QPSK
                         };      // DVB-S2
 
diff -uNr channelscan-0.6.1/scan.c channelscan-0.6.1.patched/scan.c
--- channelscan-0.6.1/scan.c	2008-10-17 17:48:21.000000000 +0200
+++ channelscan-0.6.1.patched/scan.c	2008-10-17 17:47:03.000000000 +0200
@@ -405,7 +405,8 @@
 cScan::ScanDVB_S(cTransponder * tp, cChannel * c)
 {
   //const time_t tt = time(NULL);
-    int maxmods = device->ProvidesS2()? 4 : 2;
+//     int maxmods = device->ProvidesS2()? 3 : 1;
+    int maxmods =  3;
 
    // esyslog("%s cTransponder* tp = %x  cChannel *c = %x", __PRETTY_FUNCTION__);
     esyslog("maxmods = %d",maxmods);
@@ -415,7 +416,7 @@
         ;
 
     // skip HD Transonders on SD Tuner
-    if ( !device->ProvidesS2() && static_cast < cSatTransponder * >(tp)->System() == 1)
+    if (maxmods == 1 && static_cast < cSatTransponder * >(tp)->System() == 1)
         return;
 
   unsigned  int nRadio = radioChannelNames.size();
@@ -442,24 +443,20 @@
                        tp->Frequency(), tp->Symbolrate(), tp->Modulation());
             break;
         case 1:
-            tp->SetModulation(QPSK);
-            break;
-
-        case 2:
-            tp->SetModulation(PSK8);
+            tp->SetModulation(PSK_8);
             //static_cast < cSatTransponder * >(tp)->SetFEC(FEC_2_3);
-            static_cast < cSatTransponder * >(tp)->SetRollOff(FE_ROLLOFF_35);
+            static_cast < cSatTransponder * >(tp)->SetRollOff(ROLLOFF_35);
             DEBUG_SCAN
                 (" DEBUG [DVB_S]; trying PSK8: freq: %d srate:%d   mod: %d  \n",
                  tp->Frequency(), tp->Symbolrate(), tp->Modulation());
 
             break;
-        case 3:
-            tp->SetModulation(QPSK_S2);
+        case 2:
+            tp->SetModulation(QPSK);
             //static_cast < cSatTransponder * >(tp)->SetFEC(FEC_9_10);
-            static_cast < cSatTransponder * >(tp)->SetRollOff(FE_ROLLOFF_35);
+            static_cast < cSatTransponder * >(tp)->SetRollOff(ROLLOFF_35);
             DEBUG_SCAN
-                (" DEBUG [DVB_S]; trying QPSK_S2: freq: %d srate:%d   mod: %d  \n",
+                (" DEBUG [DVB_S]; trying QPSK: freq: %d srate:%d   mod: %d  \n",
                  tp->Frequency(), tp->Symbolrate(), tp->Modulation());
             break;
         default:
diff -uNr channelscan-0.6.1/transponders.c channelscan-0.6.1.patched/transponders.c
--- channelscan-0.6.1/transponders.c	2008-10-17 17:48:21.000000000 +0200
+++ channelscan-0.6.1.patched/transponders.c	2008-10-17 17:47:03.000000000 +0200
@@ -191,10 +191,10 @@
     int stat2fecs2[] = {
         FEC_AUTO,
         FEC_1_2,
-        FEC_1_3, //S2
-        FEC_1_4, //S2
+//         FEC_1_3, //S2
+//         FEC_1_4, //S2
         FEC_2_3,
-        FEC_2_5, //S2
+//         FEC_2_5, //S2
         FEC_3_4,
         FEC_3_5, //S2
         FEC_4_5,
@@ -219,9 +219,9 @@
     case 0:
         return 0;               // auto  (SD only)
     case 1:
-        return QPSK_S2;
+        return QPSK;
     case 2:
-        return PSK8;
+        return PSK_8;
     case 3:
         return VSB_8;
     case 4:
@@ -229,7 +229,7 @@
     case 5:
         return 999;             // try all
     }
-    return PSK8;
+    return PSK_8;
 }
 
 //----------- Class cSatTransponder -------------------------------
@@ -252,14 +252,17 @@
                       frequency_, pol_, symbolrate_, modulation_, fec_);
 }
 
+//extern bool VagHackIsS2;
+
 bool
 cSatTransponder::SetTransponderData(cChannel * c, int Code)
 {
     DEBUG_TRANSPONDER(DBGT
                       " SetSatTransponderData(source:%d,f:%6d,p:%c,sRate:%d,mod%3d,fec%d \n",
                       Code, frequency_, pol_, symbolrate_, modulation_, fec_);
-    return c->SetSatTransponderData(Code, frequency_, pol_, symbolrate_, fec_,
-                                    modulation_, rolloff_);
+//    return c->SetSatTransponderData(Code, frequency_, pol_, symbolrate_, fec_,
+//                                    modulation_, rolloff_);
+return c->SetSatTransponderData(Code, frequency_, pol_, symbolrate_, FEC_AUTO, QPSK, SYS_DVBS, ROLLOFF_AUTO); 
 }
 
 
@@ -360,7 +363,10 @@
     else
         bandwidth_ = BANDWIDTH_8_MHZ;
 
-    return c->SetTerrTransponderData(type, frequency_, bandwidth_, modulation_, hierarchy_, fec_h_, fec_l_, guard_, transmission_);     //
+//    return c->SetTerrTransponderData(type, frequency_, bandwidth_, modulation_, hierarchy_, fec_h_, fec_l_, guard_, transmission_);     //
+
+return c->SetTerrTransponderData(type, frequency_, bandwidth_, modulation_, 
+hierarchy_, fec_h_, fec_l_, guard_, transmission_);
 
 }
 
diff -uNr channelscan-0.6.1/transponders.h channelscan-0.6.1.patched/transponders.h
--- channelscan-0.6.1/transponders.h	2008-10-17 17:48:21.000000000 +0200
+++ channelscan-0.6.1.patched/transponders.h	2008-10-17 17:47:03.000000000 +0200
@@ -34,6 +34,7 @@
 #include <sstream>
 #include <string>
 #include <vector>
+#include <memory>
 
 #include <assert.h>
 #include <dirent.h>
@@ -106,7 +107,7 @@
     }
     int  ChannelNum() const;
     int  Frequency() const;
-    int  Modulation()
+    int  Modulation()	
     {
         return modulation_;
     };
@@ -195,6 +196,7 @@
     int FEC() const;
     void SetRollOff(int rolloff);
     void SetFEC(int fec);
+    void SetSystem(int syst) {system_=syst;};
     int System() const;
     bool Parse(const std::string & line);
     /* over write */ void PrintData();
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux