From patchwork Fri Oct 17 13:22:44 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Scherthan X-Patchwork-Id: 12675 Received: from julia.rz.uni-landau.de ([139.14.1.22] helo=po.uni-landau.de) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1KqpIA-0004nh-7U for vdr@linuxtv.org; Fri, 17 Oct 2008 15:23:01 +0200 Received: from [139.14.28.18] Schertha [139.14.28.18] by po.uni-landau.de with NetMail SMTP Agent $Revision: 3.22.1.16 $ on Novell NetWare via secured & encrypted transport (TLS); Fri, 17 Oct 2008 15:22:54 +0200 Message-ID: <48F891A4.80400@gmx.de> Date: Fri, 17 Oct 2008 15:22:44 +0200 From: Frank Scherthan User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.8.1.17) Gecko/20080914 Lightning/0.9 Thunderbird/2.0.0.17 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: VDR Mailing List X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=AWL=0.000, BAYES_00=-2.599 autolearn=ham Subject: [vdr] reelchannelscan for S2API-patched VDR X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Oct 2008 13:23:01 -0000 Status: O X-Status: X-Keywords: X-UID: 18090 Hi, I patched the reelchannelscan-plugin to compile with my patched S2API-VDR. What I use: VDR 1.7.1 with - vdr-1.7.1_extensions.diff - vdr-1.7.1-ext_h264.diff - vdr-1.7.1-s2api-ext64.patch 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... --- Frank Scherthan diff -Nu channelscan-0.6.1/channelscan.c channelscan-0.6.1_fks/channelscan.c --- channelscan-0.6.1/channelscan.c 2008-10-17 14:33:07.000000000 +0200 +++ channelscan-0.6.1_fks/channelscan.c 2008-10-17 13:57:11.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 -Nu channelscan-0.6.1/channelscan.h channelscan-0.6.1_fks/channelscan.h --- channelscan-0.6.1/channelscan.h 2008-10-17 14:33:07.000000000 +0200 +++ channelscan-0.6.1_fks/channelscan.h 2008-10-17 07:46:26.000000000 +0200 @@ -49,6 +49,8 @@ int ServiceType; int EnableLogfile; std::string logfile; + int AddNewChannels; + }; diff -Nu channelscan-0.6.1/csmenu.c channelscan-0.6.1_fks/csmenu.c --- channelscan-0.6.1/csmenu.c 2008-10-17 14:33:07.000000000 +0200 +++ channelscan-0.6.1_fks/csmenu.c 2008-10-17 07:46:24.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 -Nu channelscan-0.6.1/filter.c channelscan-0.6.1_fks/filter.c --- channelscan-0.6.1/filter.c 2008-10-17 14:33:07.000000000 +0200 +++ channelscan-0.6.1_fks/filter.c 2008-10-17 07:46:25.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 Gemeinsame Unterverzeichnisse: channelscan-0.6.1/patches und channelscan-0.6.1_fks/patches. Gemeinsame Unterverzeichnisse: channelscan-0.6.1/po und channelscan-0.6.1_fks/po. diff -Nu channelscan-0.6.1/scan.c channelscan-0.6.1_fks/scan.c --- channelscan-0.6.1/scan.c 2008-10-17 14:33:07.000000000 +0200 +++ channelscan-0.6.1_fks/scan.c 2008-10-17 07:46:26.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: Gemeinsame Unterverzeichnisse: channelscan-0.6.1/.svn und channelscan-0.6.1_fks/.svn. Gemeinsame Unterverzeichnisse: channelscan-0.6.1/transponders und channelscan-0.6.1_fks/transponders. diff -Nu channelscan-0.6.1/transponders.c channelscan-0.6.1_fks/transponders.c --- channelscan-0.6.1/transponders.c 2008-10-17 14:33:07.000000000 +0200 +++ channelscan-0.6.1_fks/transponders.c 2008-10-17 07:46:25.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 -Nu channelscan-0.6.1/transponders.h channelscan-0.6.1_fks/transponders.h --- channelscan-0.6.1/transponders.h 2008-10-17 14:33:07.000000000 +0200 +++ channelscan-0.6.1_fks/transponders.h 2008-10-17 07:46:25.000000000 +0200 @@ -106,7 +106,7 @@ } int ChannelNum() const; int Frequency() const; - int Modulation() + int Modulation() { return modulation_; }; @@ -195,6 +195,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();