Ticket #49: analogrevert.diff
File analogrevert.diff, 6.2 KB (added by , 19 years ago) |
---|
-
channeleditor.cpp
253 253 h->addChild(buttonScan); 254 254 h->addChild(buttonAdvanced); 255 255 addChild(h); 256 #else257 addChild(buttonScan);258 256 #endif 259 257 260 258 connect(source, SIGNAL(valueChanged(const QString&)), … … 337 335 338 336 void ChannelEditor::scan() 339 337 { 340 #ifdef USING_ BACKEND338 #ifdef USING_DVB 341 339 ScanWizard scanwizard; 342 340 scanwizard.exec(false,true); 343 341 344 342 list->fillSelections(); 345 343 list->setFocus(); 346 344 #else 347 VERBOSE(VB_IMPORTANT, "You must compile the backend "345 VERBOSE(VB_IMPORTANT, "You must compile the backend with dvb support" 348 346 "to be able to scan for channels"); 349 347 #endif 350 348 } -
libmythtv.pro
182 182 SOURCES += signalmonitor.cpp dtvsignalmonitor.cpp 183 183 SOURCES += signalmonitorvalue.cpp 184 184 185 # Channel scanner stuff186 HEADERS += scanwizard.h scanwizardhelpers.h187 HEADERS += analogscan.h188 HEADERS += frequencytables.h189 SOURCES += scanwizard.cpp scanwizardhelpers.cpp190 SOURCES += analogscan.cpp191 SOURCES += frequencytables.cpp192 193 185 # TVRec & Recorder base classes 194 186 HEADERS += tv_rec.h 195 187 HEADERS += recorderbase.h dtvrecorder.h … … 268 260 HEADERS += dvbrecorder.h 269 261 SOURCES += dvbrecorder.cpp 270 262 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 271 269 # Misc 272 270 HEADERS += dvbtransporteditor.h dvbconfparser.h dvbdev/dvbci.h 273 271 SOURCES += dvbtransporteditor.cpp dvbconfparser.cpp dvbdev/dvbci.cpp -
scanwizard.cpp
43 43 #endif 44 44 #include "videosource.h" 45 45 #include "frequencies.h" 46 #include "analogscan.h"47 46 #include "mythdbcon.h" 48 47 49 48 #include "scanwizard.h" … … 65 64 dvbchannel = NULL; 66 65 monitor = NULL; 67 66 #endif 68 analogScan = NULL;69 67 scanthread_running = false; 70 68 setLabel(strTitle); 71 69 setUseLabel(false); … … 98 96 dvbchannel = NULL; 99 97 } 100 98 #endif 101 if (analogScan)102 {103 analogScan->stop();104 delete analogScan;105 analogScan=NULL;106 }107 99 } 108 100 109 101 void ScanWizardScanner::customEvent(QCustomEvent *e) … … 303 295 304 296 nScanType = parent->scanType(); 305 297 nVideoSource = parent->videoSource(); 306 if (nScanType == ScanTypeSetting::FullScan_Analog)307 {308 //Create an analog scan object309 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 }346 298 #ifdef USING_DVB 347 elseif (nScanType == ScanTypeSetting::Import)299 if (nScanType == ScanTypeSetting::Import) 348 300 { 349 301 //cerr << "cardtype = " << parent->nCardType << " filename = " << parent->filename() << endl; 350 302 DVBConfParser *parser = NULL; -
scanwizardhelpers.cpp
121 121 "FROM cardinput, videosource, capturecard " 122 122 "WHERE cardinput.sourceid=videosource.sourceid AND " 123 123 " cardinput.cardid=capturecard.cardid AND " 124 " capturecard.cardtype in (\"DVB\" ,\"MPEG\",\"V4L\") AND "124 " capturecard.cardtype in (\"DVB\") AND " 125 125 " capturecard.hostname = '%1'").arg(gContext->GetHostName()); 126 126 127 127 query.prepare(querystr); … … 203 203 "WHERE videosource.sourceid = %1 AND " 204 204 " cardinput.sourceid = videosource.sourceid AND " 205 205 " cardinput.cardid = capturecard.cardid AND " 206 " capturecard.cardtype in (\"DVB\" ,\"MPEG\",\"V4L\") AND "206 " capturecard.cardtype in (\"DVB\") AND " 207 207 " capturecard.hostname = '%2';") 208 208 .arg(nSourceID).arg(gContext->GetHostName()); 209 209 query.prepare(thequery); -
scanwizard.h
54 54 class OptionalTypeSetting; 55 55 class ScanWizard; 56 56 class ScanWizardScanner; 57 class AnalogScan;58 57 59 58 class ScanWizard: public ConfigurationWizard 60 59 { … … 129 128 static void *SpawnTune(void *param); 130 129 131 130 ScanWizard *parent; 132 AnalogScan *analogScan;133 131 LogList *log; 134 132 bool scanthread_running; 135 133 bool tunerthread_running;