Ticket #49: analogrevert.diff

File analogrevert.diff, 6.2 KB (added by john.pullan@…, 19 years ago)

diff to revert analog scan back out

  • channeleditor.cpp

     
    253253    h->addChild(buttonScan);
    254254    h->addChild(buttonAdvanced);
    255255    addChild(h);
    256 #else
    257     addChild(buttonScan);
    258256#endif
    259257
    260258    connect(source, SIGNAL(valueChanged(const QString&)),
     
    337335
    338336void ChannelEditor::scan()
    339337{
    340 #ifdef USING_BACKEND
     338#ifdef USING_DVB
    341339    ScanWizard scanwizard;
    342340    scanwizard.exec(false,true);
    343341
    344342    list->fillSelections();
    345343    list->setFocus();
    346344#else
    347     VERBOSE(VB_IMPORTANT,  "You must compile the backend "
     345    VERBOSE(VB_IMPORTANT,  "You must compile the backend with dvb support"
    348346            "to be able to scan for channels");
    349347#endif
    350348}
  • libmythtv.pro

     
    182182    SOURCES += signalmonitor.cpp           dtvsignalmonitor.cpp
    183183    SOURCES += signalmonitorvalue.cpp
    184184
    185     # Channel scanner stuff
    186     HEADERS += scanwizard.h                scanwizardhelpers.h
    187     HEADERS += analogscan.h
    188     HEADERS += frequencytables.h
    189     SOURCES += scanwizard.cpp              scanwizardhelpers.cpp
    190     SOURCES += analogscan.cpp
    191     SOURCES += frequencytables.cpp
    192 
    193185    # TVRec & Recorder base classes
    194186    HEADERS += tv_rec.h
    195187    HEADERS += recorderbase.h              dtvrecorder.h
     
    268260        HEADERS += dvbrecorder.h
    269261        SOURCES += dvbrecorder.cpp
    270262
     263        # Channel scanner stuff
     264        HEADERS += scanwizard.h                scanwizardhelpers.h
     265        HEADERS += frequencytables.h
     266        SOURCES += scanwizard.cpp              scanwizardhelpers.cpp
     267        SOURCES += frequencytables.cpp
     268
    271269        # Misc
    272270        HEADERS += dvbtransporteditor.h   dvbconfparser.h   dvbdev/dvbci.h
    273271        SOURCES += dvbtransporteditor.cpp dvbconfparser.cpp dvbdev/dvbci.cpp
  • scanwizard.cpp

     
    4343#endif
    4444#include "videosource.h"
    4545#include "frequencies.h"
    46 #include "analogscan.h"
    4746#include "mythdbcon.h"
    4847
    4948#include "scanwizard.h"
     
    6564    dvbchannel = NULL;
    6665    monitor = NULL;
    6766#endif
    68     analogScan = NULL;
    6967    scanthread_running = false;
    7068    setLabel(strTitle);
    7169    setUseLabel(false);
     
    9896        dvbchannel = NULL;
    9997    }
    10098#endif
    101     if (analogScan)
    102     {
    103         analogScan->stop();
    104         delete analogScan;
    105         analogScan=NULL;
    106     }
    10799}
    108100
    109101void ScanWizardScanner::customEvent(QCustomEvent *e)
     
    303295
    304296    nScanType = parent->scanType();
    305297    nVideoSource = parent->videoSource();
    306     if (nScanType == ScanTypeSetting::FullScan_Analog)
    307     {
    308         //Create an analog scan object
    309         analogScan = new AnalogScan(nVideoSource, parent->captureCard());
    310 
    311         MSqlQuery query(MSqlQuery::InitCon());
    312 
    313         QString thequery = QString("SELECT freqtable "
    314                                "FROM videosource WHERE "
    315                                "sourceid = \"%1\";")
    316                                .arg(nVideoSource);
    317         query.prepare(thequery);
    318 
    319         if (!query.exec() || !query.isActive())
    320             MythContext::DBError("fetchtuningparams", query);
    321         if (query.size() <= 0)
    322              return;
    323         query.next();
    324 
    325         QString freqtable = query.value(0).toString();
    326 //        cerr << "frequency table = " << freqtable.ascii() << endl;
    327 
    328         popupProgress = new ScanProgressPopup(this,false);
    329         connect(analogScan,SIGNAL(serviceScanComplete(void)),
    330                 this,SLOT(scanComplete(void)));
    331         connect(analogScan,SIGNAL(serviceScanUpdateText(const QString&)),
    332                 this,SLOT(updateText(const QString&)));
    333         connect(analogScan,SIGNAL(serviceScanPCTComplete(int)),
    334                 this,SLOT(serviceScanPctComplete(int)));
    335         popupProgress->progress(0);
    336         popupProgress->exec(this);
    337 
    338         if (!analogScan->scan(freqtable))
    339         {
    340              MythPopupBox::showOkPopup(gContext->GetMainWindow(),
    341                                       tr("ScanWizard"),
    342                                       tr("Error starting scan"));
    343              cancelScan();
    344         }
    345     }
    346298#ifdef USING_DVB
    347     else if (nScanType == ScanTypeSetting::Import)
     299    if (nScanType == ScanTypeSetting::Import)
    348300    {
    349301        //cerr << "cardtype = " << parent->nCardType << " filename = " << parent->filename() << endl;
    350302        DVBConfParser *parser = NULL;
  • scanwizardhelpers.cpp

     
    121121        "FROM cardinput, videosource, capturecard "
    122122        "WHERE cardinput.sourceid=videosource.sourceid AND "
    123123        "      cardinput.cardid=capturecard.cardid AND "
    124         "      capturecard.cardtype in (\"DVB\",\"MPEG\",\"V4L\") AND "
     124        "      capturecard.cardtype in (\"DVB\") AND "
    125125        "      capturecard.hostname = '%1'").arg(gContext->GetHostName());
    126126   
    127127    query.prepare(querystr);
     
    203203        "WHERE videosource.sourceid = %1 AND "
    204204        "      cardinput.sourceid   = videosource.sourceid AND "
    205205        "      cardinput.cardid     = capturecard.cardid AND "
    206         "      capturecard.cardtype in (\"DVB\",\"MPEG\",\"V4L\") AND "
     206        "      capturecard.cardtype in (\"DVB\") AND "
    207207        "      capturecard.hostname = '%2';")
    208208        .arg(nSourceID).arg(gContext->GetHostName());
    209209    query.prepare(thequery);
  • scanwizard.h

     
    5454class OptionalTypeSetting;
    5555class ScanWizard;
    5656class ScanWizardScanner;
    57 class AnalogScan;
    5857
    5958class ScanWizard: public ConfigurationWizard
    6059{
     
    129128    static void *SpawnTune(void *param);
    130129
    131130    ScanWizard        *parent;
    132     AnalogScan        *analogScan;
    133131    LogList           *log;
    134132    bool               scanthread_running;
    135133    bool               tunerthread_running;