void ScanWizard::SetPage(const QString &pageTitle) { VERBOSE(VB_SIPARSER, QString("SetPage(%1)").arg(pageTitle)); if (pageTitle != ScanWizardScanner::kTitle) return; QMap<QString,QString> start_chan; DTVTunerType parse_type = DTVTunerType::kTunerTypeUnknown; uint cardid = configPane->GetCardID(); QString inputname = configPane->GetInputName(); uint sourceid = configPane->GetSourceID(); int scantype = configPane->GetScanType(); bool do_scan = true; VERBOSE(VB_SIPARSER, LOC + "SetPage(): " + QString("type(%1) cardid(%2) inputname(%3)") .arg(scantype).arg(cardid).arg(inputname)); if (scantype == ScanTypeSetting::DVBUtilsImport) { scannerPane->ImportDVBUtils(sourceid, lastHWCardType, configPane->GetFilename()); } else if (scantype == ScanTypeSetting::NITAddScan_OFDM) { start_chan = configPane->GetStartChan(); parse_type = DTVTunerType::kTunerTypeOFDM; } else if (scantype == ScanTypeSetting::NITAddScan_QPSK) { start_chan = configPane->GetStartChan(); parse_type = DTVTunerType::kTunerTypeQPSK; } else if (scantype == ScanTypeSetting::NITAddScan_QAM) { start_chan = configPane->GetStartChan(); parse_type = DTVTunerType::kTunerTypeQAM; } else if (scantype == ScanTypeSetting::IPTVImport) { do_scan = false; scannerPane->ImportM3U(cardid, inputname, sourceid); } else if ((scantype == ScanTypeSetting::FullScan_ATSC) || (scantype == ScanTypeSetting::FullTransportScan) || (scantype == ScanTypeSetting::TransportScan) || (scantype == ScanTypeSetting::FullScan_OFDM) || (scantype == ScanTypeSetting::FullScan_Analog)) { ; } else { do_scan = false; VERBOSE(VB_SIPARSER, LOC_ERR + "SetPage(): " + QString("type(%1) src(%2) cardid(%3) not handled") .arg(scantype).arg(sourceid).arg(cardid)); MythPopupBox::showOkPopup( gContext->GetMainWindow(), tr("ScanWizard"), "Programmer Error, see console"); } // Just verify what we get from the UI... DTVMultiplex tuning; if ((DTVTunerType::kTunerTypeUnknown != parse_type) && !tuning.ParseTuningParams( parse_type, start_chan["frequency"], start_chan["inversion"], start_chan["symbolrate"], start_chan["fec"], start_chan["polarity"], start_chan["coderate_hp"], start_chan["coderate_lp"], start_chan["constellation"], start_chan["trans_mode"], start_chan["guard_interval"], start_chan["hierarchy"], start_chan["modulation"], start_chan["bandwidth"])) { MythPopupBox::showOkPopup( gContext->GetMainWindow(), tr("ScanWizard"), tr("Error parsing parameters")); do_scan = false; } if (do_scan) { scannerPane->Scan( configPane->GetScanType(), configPane->GetCardID(), configPane->GetInputName(), configPane->GetSourceID(), configPane->DoDeleteChannels(), configPane->DoRenameChannels(), configPane->DoIgnoreSignalTimeout(), configPane->GetMultiplex(), start_chan, configPane->GetFrequencyStandard(), configPane->GetModulation(), configPane->GetFrequencyTable(), configPane->GetATSCFormat()); } }
void ScanWizard::SetPage(const QString &pageTitle) { LOG(VB_CHANSCAN, LOG_INFO, QString("SetPage(%1)").arg(pageTitle)); if (pageTitle != ChannelScannerGUI::kTitle) { scannerPane->quitScanning(); return; } QMap<QString,QString> start_chan; DTVTunerType parse_type = DTVTunerType::kTunerTypeUnknown; uint cardid = configPane->GetCardID(); QString inputname = configPane->GetInputName(); uint sourceid = configPane->GetSourceID(); int scantype = configPane->GetScanType(); bool do_scan = true; LOG(VB_CHANSCAN, LOG_INFO, LOC + "SetPage(): " + QString("type(%1) cardid(%2) inputname(%3)") .arg(scantype).arg(cardid).arg(inputname)); if (scantype == ScanTypeSetting::DVBUtilsImport) { scannerPane->ImportDVBUtils(sourceid, lastHWCardType, configPane->GetFilename()); } else if (scantype == ScanTypeSetting::NITAddScan_DVBT) { start_chan = configPane->GetStartChan(); parse_type = DTVTunerType::kTunerTypeDVBT; } else if (scantype == ScanTypeSetting::NITAddScan_DVBS) { start_chan = configPane->GetStartChan(); parse_type = DTVTunerType::kTunerTypeDVBS1; } else if (scantype == ScanTypeSetting::NITAddScan_DVBS2) { start_chan = configPane->GetStartChan(); parse_type = DTVTunerType::kTunerTypeDVBS2; } else if (scantype == ScanTypeSetting::NITAddScan_DVBC) { start_chan = configPane->GetStartChan(); parse_type = DTVTunerType::kTunerTypeDVBC; } else if (scantype == ScanTypeSetting::IPTVImport) { do_scan = false; scannerPane->ImportM3U(cardid, inputname, sourceid); } else if ((scantype == ScanTypeSetting::FullScan_ATSC) || (scantype == ScanTypeSetting::FullTransportScan) || (scantype == ScanTypeSetting::TransportScan) || (scantype == ScanTypeSetting::CurrentTransportScan) || (scantype == ScanTypeSetting::FullScan_DVBC) || (scantype == ScanTypeSetting::FullScan_DVBT) || (scantype == ScanTypeSetting::FullScan_Analog)) { ; } else if (scantype == ScanTypeSetting::ExistingScanImport) { do_scan = false; uint scanid = configPane->GetScanID(); ScanDTVTransportList transports = LoadScan(scanid); ChannelImporter ci(true, true, true, true, false, configPane->DoFreeToAirOnly(), configPane->GetServiceRequirements()); ci.Process(transports); } else { do_scan = false; LOG(VB_CHANSCAN, LOG_ERR, LOC + "SetPage(): " + QString("type(%1) src(%2) cardid(%3) not handled") .arg(scantype).arg(sourceid).arg(cardid)); MythPopupBox::showOkPopup( GetMythMainWindow(), tr("ScanWizard"), tr("Programmer Error, see console")); } // Just verify what we get from the UI... DTVMultiplex tuning; if ((parse_type != DTVTunerType::kTunerTypeUnknown) && !tuning.ParseTuningParams( parse_type, start_chan["frequency"], start_chan["inversion"], start_chan["symbolrate"], start_chan["fec"], start_chan["polarity"], start_chan["coderate_hp"], start_chan["coderate_lp"], start_chan["constellation"], start_chan["trans_mode"], start_chan["guard_interval"], start_chan["hierarchy"], start_chan["modulation"], start_chan["bandwidth"], start_chan["mod_sys"], start_chan["rolloff"])) { MythPopupBox::showOkPopup( GetMythMainWindow(), tr("ScanWizard"), tr("Error parsing parameters")); do_scan = false; } if (do_scan) { QString table_start, table_end; configPane->GetFrequencyTableRange(table_start, table_end); scannerPane->Scan( configPane->GetScanType(), configPane->GetCardID(), configPane->GetInputName(), configPane->GetSourceID(), configPane->DoIgnoreSignalTimeout(), configPane->DoFollowNIT(), configPane->DoTestDecryption(), configPane->DoFreeToAirOnly(), configPane->GetServiceRequirements(), // stuff needed for particular scans configPane->GetMultiplex(), start_chan, configPane->GetFrequencyStandard(), configPane->GetModulation(), configPane->GetFrequencyTable(), table_start, table_end); } }