Ticket #5882: t5882_s2api_support_21249.diff
File t5882_s2api_support_21249.diff, 64.7 KB (added by , 15 years ago) |
---|
-
mythtv/configure
diff --git a/mythtv/configure b/mythtv/configure index 1363586..d231bcb 100755
a b HAVE_LIST=" 1123 1123 fast_64bit 1124 1124 fast_cmov 1125 1125 fast_unaligned 1126 fe_can_2g_modulation 1126 1127 fork 1127 1128 freetype2 1128 1129 ftime … … if enabled dvb; then 3382 3383 fi 3383 3384 fi 3384 3385 3386 3387 enabled dvb && check_cc -I"$dvb_path" <<EOF && enable fe_can_2g_modulation 3388 #include <linux/dvb/frontend.h> 3389 int main(void) { 3390 if (FE_CAN_2G_MODULATION != 0x10000000) 3391 return 1; 3392 return 0; 3393 } 3394 EOF 3395 3385 3396 # Check that all MythTV build "requirements" are met: 3386 3397 3387 3398 enabled freetype2 || … … if enabled backend; then 3789 3800 echo "HR-PVR support ${hdpvr-no}" 3790 3801 echo "FireWire support ${firewire-no}" 3791 3802 echo "DVB support ${dvb-no} [$dvb_path]" 3803 echo "DVB-S2 support ${fe_can_2g_modulation-no}" 3792 3804 # echo "DBox2 support ${dbox2-no}" 3793 3805 echo "HDHomeRun support ${hdhomerun-no}" 3794 3806 echo "IPTV support ${iptv-no}" -
mythtv/libs/libmythtv/cardutil.cpp
diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp index 6c2cf39..cba395a 100644
a b 13 13 #include <QDir> 14 14 15 15 // MythTV headers 16 #include "mythconfig.h" 16 17 #include "cardutil.h" 17 18 #include "videosource.h" 18 19 #include "dvbchannel.h" … … QString CardUtil::ProbeDVBType(const QString &device) 293 294 close(fd_frontend); 294 295 295 296 DTVTunerType type(info.type); 297 #if HAVE_FE_CAN_2G_MODULATION 298 if (type == DTVTunerType::kTunerTypeQPSK && 299 (info.caps & FE_CAN_2G_MODULATION)) 300 type = DTVTunerType::kTunerTypeDVB_S2; 301 #endif // HAVE_FE_CAN_2G_MODULATION 296 302 ret = (type.toString() != "UNKNOWN") ? type.toString().toUpper() : ret; 297 303 #endif // USING_DVB 298 304 … … bool CardUtil::IsDVBCardType(const QString card_type) 385 391 { 386 392 QString ct = card_type.toUpper(); 387 393 return (ct == "DVB") || (ct == "QAM") || (ct == "QPSK") || 388 (ct == "OFDM") || (ct == "ATSC") ;394 (ct == "OFDM") || (ct == "ATSC") || (ct == "DVB_S2"); 389 395 } 390 396 391 397 QString get_on_cardid(const QString &to_get, uint cardid) -
mythtv/libs/libmythtv/cardutil.h
diff --git a/mythtv/libs/libmythtv/cardutil.h b/mythtv/libs/libmythtv/cardutil.h index 328b341..ea9e54c 100644
a b class MPUBLIC CardUtil 55 55 HDHOMERUN = 10, 56 56 FREEBOX = 11, 57 57 HDPVR = 12, 58 DVBS2 = 13, 58 59 }; 59 60 60 61 static enum CARD_TYPES toCardType(const QString &name) … … class MPUBLIC CardUtil 85 86 return FREEBOX; 86 87 if ("HDPVR" == name) 87 88 return HDPVR; 89 if ("DVB_S2" == name) 90 return DVBS2; 88 91 return ERROR_UNKNOWN; 89 92 } 90 93 -
mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
diff --git a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp index 60a6661..49d311c 100644
a b bool ChannelScanSM::ScanTransportsStartingOn( 1506 1506 QMap<QString,QString>::const_iterator it; 1507 1507 1508 1508 if (startChan.find("std") == startChan.end() || 1509 startChan.find(" modulation")== startChan.end())1509 startChan.find("type") == startChan.end()) 1510 1510 { 1511 1511 return false; 1512 1512 } 1513 1513 1514 1514 QString std = *startChan.find("std"); 1515 QString mod = (*(startChan.find("modulation"))).toUpper();1516 1515 QString si_std = (std.toLower() != "atsc") ? "dvb" : "atsc"; 1517 QString name = "";1518 1516 bool ok = false; 1519 1517 1520 1518 if (scanning) … … bool ChannelScanSM::ScanTransportsStartingOn( 1526 1524 DTVMultiplex tuning; 1527 1525 1528 1526 DTVTunerType type; 1529 1530 if (std == "dvb") 1531 { 1532 ok = type.Parse(mod); 1533 } 1534 else if (std == "atsc") 1535 { 1536 type = DTVTunerType::kTunerTypeATSC; 1537 ok = true; 1538 } 1527 ok = type.Parse(startChan["type"]); 1539 1528 1540 1529 if (ok) 1541 1530 { … … bool ChannelScanSM::ScanTransportsStartingOn( 1547 1536 startChan["coderate_hp"], startChan["coderate_lp"], 1548 1537 startChan["constellation"], startChan["trans_mode"], 1549 1538 startChan["guard_interval"], startChan["hierarchy"], 1550 startChan["modulation"], startChan["bandwidth"]); 1539 startChan["modulation"], startChan["bandwidth"], 1540 startChan["mod_sys"], startChan["rolloff"]); 1551 1541 } 1552 1542 1553 1543 if (ok) -
mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h
diff --git a/mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h b/mythtv/libs/libmythtv/channelscan/channelscanmiscsettings.h index 855bed7..3b3122c 100644
a b class ScanHierarchy: public ComboBoxSetting, public TransientStorage 248 248 }; 249 249 }; 250 250 251 class ScanModSys: public ComboBoxSetting, public TransientStorage 252 { 253 public: 254 ScanModSys() : ComboBoxSetting(this) 255 { 256 setLabel(QObject::tr("Mod Sys")); 257 setHelpText(QObject::tr("Modulation system (Default: DVB-S)")); 258 addSelection("DVB-S"); 259 addSelection("DVB-S2"); 260 }; 261 }; 262 263 class ScanRollOff: public ComboBoxSetting, public TransientStorage 264 { 265 public: 266 ScanRollOff() : ComboBoxSetting(this) 267 { 268 setLabel(QObject::tr("Rolloff")); 269 setHelpText(QObject::tr("Roll Off factor (Default: 0.35)")); 270 addSelection("0.35"); 271 addSelection("0.20"); 272 addSelection("0.25"); 273 addSelection(QObject::tr("Auto"),"auto"); 274 }; 275 }; 276 251 277 class PaneError : public HorizontalConfigurationGroup 252 278 { 253 279 public: -
mythtv/libs/libmythtv/channelscan/channelscanner.cpp
diff --git a/mythtv/libs/libmythtv/channelscan/channelscanner.cpp b/mythtv/libs/libmythtv/channelscan/channelscanner.cpp index b209eed..7bb16fe 100644
a b void ChannelScanner::Scan( 157 157 ok = sigmonScanner->ScanTransports( 158 158 sourceid, freq_std, mod, tbl, tbl_start, tbl_end); 159 159 } 160 else if ((ScanTypeSetting::NITAddScan_DVBT == scantype) || 161 (ScanTypeSetting::NITAddScan_DVBS == scantype) || 162 (ScanTypeSetting::NITAddScan_DVBC == scantype)) 160 else if ((ScanTypeSetting::NITAddScan_DVBT == scantype) || 161 (ScanTypeSetting::NITAddScan_DVBS == scantype) || 162 (ScanTypeSetting::NITAddScan_DVBS2 == scantype) || 163 (ScanTypeSetting::NITAddScan_DVBC == scantype)) 163 164 { 164 165 VERBOSE(VB_CHANSCAN, LOC + "ScanTransports()"); 165 166 -
mythtv/libs/libmythtv/channelscan/modulationsetting.h
diff --git a/mythtv/libs/libmythtv/channelscan/modulationsetting.h b/mythtv/libs/libmythtv/channelscan/modulationsetting.h index 88f0254..67e25b2 100644
a b class ScanModulationSetting: public ComboBoxSetting 58 58 { 59 59 addSelection(QObject::tr("Auto"),"auto",true); 60 60 addSelection("QPSK","qpsk"); 61 #ifdef FE_GET_EXTENDED_INFO62 addSelection("8PSK","8psk");63 #endif64 61 addSelection("QAM 16","qam_16"); 65 62 addSelection("QAM 32","qam_32"); 66 63 addSelection("QAM 64","qam_64"); … … class ScanConstellation: public ScanModulationSetting, 90 87 }; 91 88 }; 92 89 90 class ScanDVBSModulation: public ComboBoxSetting, public TransientStorage 91 { 92 public: 93 ScanDVBSModulation() : ComboBoxSetting(this) 94 { 95 96 addSelection("QPSK", "qpsk", true); 97 addSelection("8PSK", "8psk"); 98 addSelection("QAM 16","qam_16"); 99 100 setLabel(QObject::tr("Modulation")); 101 setHelpText( 102 QObject::tr("Modulation, QPSK, 8PSK, QAM-16") + " " + 103 QObject::tr("Most DVB-S transponders use QPSK, DVB-S2 8PSK " 104 "QAM-16 is not available for DVB-S2 transports.")); 105 } 106 }; 107 93 108 #endif // _MODULATION_SETTING_H_ 94 109 -
mythtv/libs/libmythtv/channelscan/panedvbs2.h
diff --git a/mythtv/libs/libmythtv/channelscan/panedvbs2.h b/mythtv/libs/libmythtv/channelscan/panedvbs2.h index fe40ab2..7247b7d 100644
a b class PaneDVBS2 : public HorizontalConfigurationGroup 22 22 left->addChild( pfrequency = new ScanFrequency()); 23 23 left->addChild( ppolarity = new ScanPolarity()); 24 24 left->addChild( psymbolrate = new ScanSymbolRateDVBS()); 25 left->addChild( pmod_sys = new ScanModSys()); 25 26 right->addChild(pfec = new ScanFec()); 26 right->addChild(pmodulation = new Scan Modulation());27 right->addChild(pmodulation = new ScanDVBSModulation()); 27 28 right->addChild(pinversion = new ScanInversion()); 29 right->addChild(prolloff = new ScanRollOff()); 28 30 addChild(left); 29 31 addChild(right); 30 32 } … … class PaneDVBS2 : public HorizontalConfigurationGroup 35 37 QString fec(void) const { return pfec->getValue(); } 36 38 QString polarity(void) const { return ppolarity->getValue(); } 37 39 QString modulation(void) const { return pmodulation->getValue(); } 40 QString mod_sys(void) const { return pmod_sys->getValue(); } 41 QString rolloff(void) const { return prolloff->getValue(); } 38 42 39 43 protected: 40 44 ScanFrequency *pfrequency; … … class PaneDVBS2 : public HorizontalConfigurationGroup 42 46 ScanInversion *pinversion; 43 47 ScanFec *pfec; 44 48 ScanPolarity *ppolarity; 45 ScanModulation *pmodulation; 49 ScanDVBSModulation *pmodulation; 50 ScanModSys *pmod_sys; 51 ScanRollOff *prolloff; 46 52 }; 47 53 48 54 #endif // _PANE_DVBS2_H_ -
mythtv/libs/libmythtv/channelscan/scaninfo.cpp
diff --git a/mythtv/libs/libmythtv/channelscan/scaninfo.cpp b/mythtv/libs/libmythtv/channelscan/scaninfo.cpp index faeafd5..e01035e 100644
a b ScanDTVTransportList LoadScan(uint scanid) 81 81 " hp_code_rate, lp_code_rate, modulation, " 82 82 " transmission_mode, guard_interval, hierarchy, " 83 83 " modulation, bandwidth, sistandard, " 84 " tuner_type, transportid " 84 " tuner_type, transportid, mod_sys, " 85 " rolloff " 85 86 "FROM channelscan_dtv_multiplex " 86 87 "WHERE scanid = :SCANID"); 87 88 query.bindValue(":SCANID", scanid); … … ScanDTVTransportList LoadScan(uint scanid) 102 103 query.value(6).toString(), query.value(7).toString(), 103 104 query.value(8).toString(), query.value(9).toString(), 104 105 query.value(10).toString(), query.value(11).toString(), 105 query.value(12).toString()); 106 query.value(12).toString(), query.value(13).toString(), 107 query.value(14).toString()); 106 108 107 109 query2.prepare( 108 110 "SELECT " -
mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp
diff --git a/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp b/mythtv/libs/libmythtv/channelscan/scanwizardconfig.cpp index 2d36ed8..2916021 100644
a b void ScanTypeSetting::SetInput(const QString &cardids_inputname) 140 140 addSelection(tr("Import existing scan"), 141 141 QString::number(ExistingScanImport)); 142 142 break; 143 case CardUtil::DVBS2: 144 addSelection(tr("Full Scan (Tuned)"), 145 QString::number(NITAddScan_DVBS2)); 146 addSelection(tr("Import channels.conf"), 147 QString::number(DVBUtilsImport)); 148 addSelection(tr("Import existing scan"), 149 QString::number(ExistingScanImport)); 150 break; 143 151 case CardUtil::QAM: 144 152 addSelection(tr("Full Scan (Tuned)"), 145 153 QString::number(NITAddScan_DVBC)); … … ScanOptionalConfig::ScanOptionalConfig(ScanTypeSetting *_scan_type) : 225 233 paneDVBC); 226 234 addTarget(QString::number(ScanTypeSetting::NITAddScan_DVBS), 227 235 paneDVBS); 236 addTarget(QString::number(ScanTypeSetting::NITAddScan_DVBS2), 237 paneDVBS2); 228 238 addTarget(QString::number(ScanTypeSetting::NITAddScan_DVBT), 229 239 paneDVBT); 230 240 addTarget(QString::number(ScanTypeSetting::FullScan_ATSC), … … QMap<QString,QString> ScanOptionalConfig::GetStartChan(void) const 353 363 const PaneDVBT *pane = paneDVBT; 354 364 355 365 startChan["std"] = "dvb"; 366 startChan["type"] = "OFDM"; 356 367 startChan["frequency"] = pane->frequency(); 357 368 startChan["inversion"] = pane->inversion(); 358 369 startChan["bandwidth"] = pane->bandwidth(); 359 startChan["modulation"] = "ofdm";360 370 startChan["coderate_hp"] = pane->coderate_hp(); 361 371 startChan["coderate_lp"] = pane->coderate_lp(); 362 372 startChan["constellation"] = pane->constellation(); … … QMap<QString,QString> ScanOptionalConfig::GetStartChan(void) const 369 379 const PaneDVBS *pane = paneDVBS; 370 380 371 381 startChan["std"] = "dvb"; 382 startChan["type"] = "QPSK"; 372 383 startChan["frequency"] = pane->frequency(); 373 384 startChan["inversion"] = pane->inversion(); 374 385 startChan["symbolrate"] = pane->symbolrate(); 375 386 startChan["fec"] = pane->fec(); 376 startChan["modulation"] = "qpsk";377 387 startChan["polarity"] = pane->polarity(); 378 388 } 379 389 else if (ScanTypeSetting::NITAddScan_DVBC == st) … … QMap<QString,QString> ScanOptionalConfig::GetStartChan(void) const 381 391 const PaneDVBC *pane = paneDVBC; 382 392 383 393 startChan["std"] = "dvb"; 394 startChan["type"] = "QAM"; 395 startChan["frequency"] = pane->frequency(); 396 startChan["inversion"] = pane->inversion(); 397 startChan["symbolrate"] = pane->symbolrate(); 398 startChan["fec"] = pane->fec(); 399 startChan["modulation"] = pane->modulation(); 400 } 401 else if (ScanTypeSetting::NITAddScan_DVBS2 == st) 402 { 403 const PaneDVBS2 *pane = paneDVBS2; 404 405 startChan["std"] = "dvb"; 406 startChan["type"] = "DVB_S2"; 384 407 startChan["frequency"] = pane->frequency(); 385 408 startChan["inversion"] = pane->inversion(); 386 409 startChan["symbolrate"] = pane->symbolrate(); 387 410 startChan["fec"] = pane->fec(); 388 411 startChan["modulation"] = pane->modulation(); 412 startChan["polarity"] = pane->polarity(); 413 startChan["mod_sys"] = pane->mod_sys(); 414 startChan["rolloff"] = pane->rolloff(); 389 415 } 390 416 391 417 return startChan; -
mythtv/libs/libmythtv/channelscan/scanwizardconfig.h
diff --git a/mythtv/libs/libmythtv/channelscan/scanwizardconfig.h b/mythtv/libs/libmythtv/channelscan/scanwizardconfig.h index d69b1c5..4f4661d 100644
a b class ScanTypeSetting : public ComboBoxSetting, public TransientStorage 66 66 // seen in the Network Information Tables to the scan. 67 67 NITAddScan_DVBT, 68 68 NITAddScan_DVBS, 69 NITAddScan_DVBS2, 69 70 NITAddScan_DVBC, 70 71 // Scan of all transports already in the database 71 72 FullTransportScan, -
mythtv/libs/libmythtv/channelutil.cpp
diff --git a/mythtv/libs/libmythtv/channelutil.cpp b/mythtv/libs/libmythtv/channelutil.cpp index df12092..b100a54 100644
a b static uint insert_dtv_multiplex( 127 127 signed char trans_mode, 128 128 QString inner_FEC, QString constellation, 129 129 signed char hierarchy, QString hp_code_rate, 130 QString lp_code_rate, QString guard_interval) 130 QString lp_code_rate, QString guard_interval, 131 QString mod_sys, QString rolloff) 131 132 { 132 133 MSqlQuery query(MSqlQuery::InitCon()); 133 134 … … static uint insert_dtv_multiplex( 174 175 "lp_code_rate = :LP_CODE_RATE, " : ""; 175 176 updateStr += (!guard_interval.isNull()) ? 176 177 "guard_interval = :GUARD_INTERVAL, " : ""; 178 updateStr += (!mod_sys.isNull()) ? 179 "mod_sys = :MOD_SYS, " : ""; 180 updateStr += (symbol_rate >= 0) ? 181 "rolloff = :ROLLOFF, " : ""; 177 182 updateStr += (transport_id && !isDVB) ? 178 183 "transportid = :TRANSPORTID, " : ""; 179 184 … … static uint insert_dtv_multiplex( 205 210 insertStr += (!hp_code_rate.isNull()) ? "hp_code_rate, " : ""; 206 211 insertStr += (!lp_code_rate.isNull()) ? "lp_code_rate, " : ""; 207 212 insertStr += (!guard_interval.isNull()) ? "guard_interval, " : ""; 213 insertStr += (!mod_sys.isNull()) ? "mod_sys, " : ""; 214 insertStr += (!rolloff.isNull()) ? "rolloff, " : ""; 208 215 insertStr = insertStr.left(insertStr.length()-2) + ") "; 209 216 210 217 insertStr += … … static uint insert_dtv_multiplex( 224 231 insertStr += (!hp_code_rate.isNull()) ? ":HP_CODE_RATE, " : ""; 225 232 insertStr += (!lp_code_rate.isNull()) ? ":LP_CODE_RATE, " : ""; 226 233 insertStr += (!guard_interval.isNull()) ? ":GUARD_INTERVAL, " : ""; 234 insertStr += (!mod_sys.isNull()) ? ":MOD_SYS, " : ""; 235 insertStr += (!rolloff.isNull()) ? ":ROLLOFF, " : ""; 227 236 insertStr = insertStr.left(insertStr.length()-2) + ");"; 228 237 229 238 query.prepare((mplex) ? updateStr : insertStr); … … static uint insert_dtv_multiplex( 284 293 query.bindValue(":LP_CODE_RATE", lp_code_rate); 285 294 if (!guard_interval.isNull()) 286 295 query.bindValue(":GUARD_INTERVAL",guard_interval); 296 if (!mod_sys.isNull()) 297 query.bindValue(":MOD_SYS", mod_sys); 298 if (!rolloff.isNull()) 299 query.bindValue(":ROLLOFF", rolloff); 287 300 288 301 if (!query.exec() || !query.isActive()) 289 302 { … … void handle_transport_desc(vector<uint> &muxes, const MPEGDescriptor &desc, 337 350 cd.TransmissionModeString()[0].toAscii(), 338 351 QString(), cd.ConstellationString(), 339 352 cd.HierarchyString()[0].toAscii(), cd.CodeRateHPString(), 340 cd.CodeRateLPString(), cd.GuardIntervalString()); 353 cd.CodeRateLPString(), cd.GuardIntervalString(), 354 QString(), QString()); 341 355 342 356 if (mux) 343 357 muxes.push_back(mux); … … void handle_transport_desc(vector<uint> &muxes, const MPEGDescriptor &desc, 364 378 -1, 365 379 cd.FECInnerString(), QString(), 366 380 -1, QString(), 367 QString(), QString()); 381 QString(), QString(), 382 cd.ModulationSystemString(), cd.RollOffString()); 368 383 369 384 if (mux) 370 385 muxes.push_back(mux); … … void handle_transport_desc(vector<uint> &muxes, const MPEGDescriptor &desc, 387 402 -1, 388 403 cd.FECInnerString(), QString::null, 389 404 -1, QString::null, 405 QString::null, QString::null, 390 406 QString::null, QString::null); 391 407 392 408 if (mux) … … uint ChannelUtil::CreateMultiplex(int sourceid, QString sistandard, 407 423 -1, 408 424 QString::null, QString::null, 409 425 -1, QString::null, 426 QString::null, QString::null, 410 427 QString::null, QString::null); 411 428 } 412 429 … … uint ChannelUtil::CreateMultiplex( 420 437 signed char trans_mode, 421 438 QString inner_FEC, QString constellation, 422 439 signed char hierarchy, QString hp_code_rate, 423 QString lp_code_rate, QString guard_interval) 440 QString lp_code_rate, QString guard_interval, 441 QString mod_sys, QString rolloff) 424 442 { 425 443 return insert_dtv_multiplex( 426 444 sourceid, sistandard, … … uint ChannelUtil::CreateMultiplex( 432 450 trans_mode, 433 451 inner_FEC, constellation, 434 452 hierarchy, hp_code_rate, 435 lp_code_rate, guard_interval); 453 lp_code_rate, guard_interval, 454 mod_sys, rolloff); 436 455 } 437 456 438 457 uint ChannelUtil::CreateMultiplex(uint sourceid, const DTVMultiplex &mux, … … uint ChannelUtil::CreateMultiplex(uint sourceid, const DTVMultiplex &mux, 448 467 mux.trans_mode.toChar().toAscii(), 449 468 mux.fec.toString(), mux.modulation.toString(), 450 469 mux.hierarchy.toChar().toAscii(), mux.hp_code_rate.toString(), 451 mux.lp_code_rate.toString(), mux.guard_interval.toString()); 470 mux.lp_code_rate.toString(), mux.guard_interval.toString(), 471 mux.mod_sys.toString(), mux.rolloff.toString()); 452 472 } 453 473 454 474 -
mythtv/libs/libmythtv/channelutil.h
diff --git a/mythtv/libs/libmythtv/channelutil.h b/mythtv/libs/libmythtv/channelutil.h index ed9fdb4..31de276 100644
a b class MPUBLIC ChannelUtil 67 67 signed char trans_mode, 68 68 QString inner_FEC, QString constellation, 69 69 signed char hierarchy, QString hp_code_rate, 70 QString lp_code_rate, QString guard_interval); 70 QString lp_code_rate, QString guard_interval, 71 QString mod_sys, QString rolloff); 71 72 72 73 static uint CreateMultiplex(uint sourceid, const DTVMultiplex&, 73 74 int transport_id, int network_id); -
mythtv/libs/libmythtv/dtvconfparser.cpp
diff --git a/mythtv/libs/libmythtv/dtvconfparser.cpp b/mythtv/libs/libmythtv/dtvconfparser.cpp index 1dfedc1..bbaacc7 100644
a b DTVConfParser::return_t DTVConfParser::Parse(void) 112 112 { 113 113 if ((type == OFDM) && (str == "T")) 114 114 ok &= ParseVDR(list, channelNo); 115 else if ((type == QPSK ) && (str == "S"))115 else if ((type == QPSK || type == DVBS2) && (str == "S")) 116 116 ok &= ParseVDR(list, channelNo); 117 117 else if ((type == QAM) && (str == "C")) 118 118 ok &= ParseVDR(list, channelNo); … … DTVConfParser::return_t DTVConfParser::Parse(void) 121 121 ok &= ParseConfOFDM(list); 122 122 else if (type == ATSC) 123 123 ok &= ParseConfATSC(list); 124 else if (type == QPSK )124 else if (type == QPSK || type == DVBS2) 125 125 ok &= ParseConfQPSK(list); 126 126 else if (type == QAM) 127 127 ok &= ParseConfQAM(list); … … bool DTVConfParser::ParseVDR(const QStringList &tokens, int channelNo) 275 275 case 'L': 276 276 mux.polarity.ParseVDR(ori); 277 277 break; 278 case 'S': 279 mux.mod_sys.ParseVDR(params); 280 break; 281 case 'O': 282 mux.rolloff.ParseVDR(params); 283 break; 278 284 default: 279 285 return false; 280 286 } -
mythtv/libs/libmythtv/dtvconfparser.h
diff --git a/mythtv/libs/libmythtv/dtvconfparser.h b/mythtv/libs/libmythtv/dtvconfparser.h index 2795493..a230782 100644
a b class DTVConfParser 80 80 { 81 81 public: 82 82 enum return_t { ERROR_CARDTYPE, ERROR_OPEN, ERROR_PARSE, OK }; 83 enum cardtype_t { ATSC, OFDM, QPSK, QAM, UNKNOWN };83 enum cardtype_t { ATSC, OFDM, QPSK, QAM, DVBS2, UNKNOWN }; 84 84 85 85 DTVConfParser(enum cardtype_t _type, uint sourceid, const QString &_file); 86 86 virtual ~DTVConfParser() { } -
mythtv/libs/libmythtv/dtvconfparserhelpers.cpp
diff --git a/mythtv/libs/libmythtv/dtvconfparserhelpers.cpp b/mythtv/libs/libmythtv/dtvconfparserhelpers.cpp index 697e882..12c974f 100644
a b bool DTVParamHelper::ParseParam(const QString &symbol, int &value, 12 12 13 13 while (!p->symbol.isEmpty()) 14 14 { 15 if (p->symbol == symbol .left(p->symbol.length()))15 if (p->symbol == symbol) //.left(p->symbol.length())) 16 16 { 17 17 //symbol = symbol.mid(p->symbol.length()); 18 18 value = p->value; … … const DTVParamHelperStruct DTVCodeRate::confTable[] = 155 155 { "FEC_7_8", kFEC_7_8 }, 156 156 { "FEC_8_9", kFEC_8_9 }, 157 157 { "FEC_NONE", kFECNone }, 158 { "FEC_3_5", kFEC_3_5 }, 159 { "FEC_9_10", kFEC_9_10 }, 158 160 { NULL, kFECAuto }, 159 161 }; 160 162 … … const DTVParamHelperStruct DTVCodeRate::vdrTable[] = 170 172 { "78", kFEC_7_8 }, 171 173 { "89", kFEC_8_9 }, 172 174 { "0", kFECNone }, 175 { "35", kFEC_3_5 }, 176 { "910", kFEC_9_10 }, 173 177 { NULL, kFECAuto } 174 178 }; 175 179 … … const char *DTVCodeRate::dbStr[DTVCodeRate::kDBStrCnt] = 199 203 "6/7", ///< kFEC_6_7 200 204 "7/8", ///< kFEC_7_8 201 205 "8/9", ///< kFEC_8_9 202 "auto" ///< kFECAuto 206 "auto", ///< kFECAuto 207 "3/5", ///< KFEC_3_5 208 "9/10", ///< KFEC_9_10 203 209 }; 204 210 205 211 const DTVParamHelperStruct DTVModulation::confTable[] = … … const DTVParamHelperStruct DTVModulation::confTable[] = 213 219 { "QPSK", kModulationQPSK }, 214 220 { "8VSB", kModulation8VSB }, 215 221 { "16VSB", kModulation16VSB }, 216 { "2VSB", kModulation2VSB }, 217 { "4VSB", kModulation4VSB }, 218 { "BPSK", kModulationBPSK }, 222 { "8PSK", kModulation8PSK }, 219 223 { "16APSK", kModulation16APSK }, 220 224 { "32APSK", kModulation32APSK }, 221 { "8PSK", kModulation8PSK }, 222 { "16PSK", kModulation16PSK }, 225 { "DQPSK", kModulationDQPSK }, 226 { "16PSK", kModulationInvalid }, 227 { "2VSB", kModulationInvalid }, 228 { "4VSB", kModulationInvalid }, 229 { "BPSK", kModulationInvalid }, 223 230 { "analog", kModulationAnalog }, 224 231 { NULL, kModulationQAMAuto }, 225 232 }; 226 233 227 234 const DTVParamHelperStruct DTVModulation::vdrTable[] = 228 235 { 229 { "99 9", kModulationQAMAuto },236 { "998", kModulationQAMAuto }, 230 237 { "16", kModulationQAM16 }, 231 238 { "32", kModulationQAM32 }, 232 239 { "64", kModulationQAM64 }, 233 240 { "128", kModulationQAM128 }, 234 241 { "256", kModulationQAM256 }, 235 { "0", kModulationQPSK }, 242 { "2", kModulationQPSK }, 243 { "5", kModulation8PSK }, 244 { "6", kModulation16APSK }, 245 { "7", kModulation32APSK }, 246 { "10", kModulation8VSB }, 247 { "11", kModulation16VSB }, 236 248 { NULL, kModulationQAMAuto }, 237 249 }; 238 250 … … const DTVParamHelperStruct DTVModulation::parseTable[] = 247 259 { "qpsk", kModulationQPSK }, 248 260 { "8vsb", kModulation8VSB }, 249 261 { "16vsb", kModulation16VSB }, 250 { "2vsb", kModulation2VSB }, 251 { "4vsb", kModulation4VSB }, 252 { "bpsk", kModulationBPSK }, 262 { "8psk", kModulation8PSK }, 253 263 { "16apsk", kModulation16APSK }, 254 264 { "32apsk", kModulation32APSK }, 255 { "8psk", kModulation8PSK }, 256 { "16psk", kModulation16PSK }, 265 { "dqpsk", kModulationDQPSK }, 257 266 // alternates 258 267 { "a", kModulationQAMAuto }, 259 268 { "qam_auto", kModulationQAMAuto }, … … const DTVParamHelperStruct DTVModulation::parseTable[] = 265 274 // qpsk, no alternative 266 275 { "8-vsb", kModulation8VSB }, 267 276 { "16-vsb", kModulation16VSB }, 268 { "2-vsb", kModulation2VSB },269 { "4-vsb", kModulation4VSB },270 277 // bpsk, no alternative 271 278 { "16-apsk", kModulation16APSK }, 272 279 { "32-apsk", kModulation32APSK }, 273 280 { "8-psk", kModulation8PSK }, 274 { "16-psk", kModulation16PSK }, 281 // removed modulations and alternatives 282 { "bpsk", kModulationInvalid }, 283 { "2vsb", kModulationInvalid }, 284 { "2-vsb", kModulationInvalid }, 285 { "4vsb", kModulationInvalid }, 286 { "4-vsb", kModulationInvalid }, 287 { "16psk", kModulationInvalid }, 288 { "16-psk", kModulationInvalid }, 275 289 { NULL, kModulationQAMAuto }, 276 290 }; 277 291 … … const char *DTVModulation::dbStr[DTVModulation::kDBStrCnt] = 286 300 "auto", ///< kModulationQAMAuto 287 301 "8vsb", ///< kModulation8VSB 288 302 "16vsb", ///< kModulation16VSB 289 "2vsb", ///< kModulation2VSB 290 "4vsb", ///< kModulation4VSB 291 "bpsk", ///< kModulationBPSK 303 "8psk", ///< kModulation8PSK 292 304 "16apsk", ///< kModulation16APSK 293 305 "32apsk", ///< kModulation32APSK 294 "8psk", ///< kModulation8PSK 295 "16psk", ///< kModulation16PSK 306 "dqpsk" ///< kModulationDQPSK 296 307 }; 297 308 298 309 const DTVParamHelperStruct DTVTransmitMode::confTable[] = … … const char *DTVPolarity::dbStr[DTVPolarity::kDBStrCnt] = 420 431 "r", ///< kPolarityRight 421 432 "l" ///< kPolarityLeft 422 433 }; 434 435 const DTVParamHelperStruct DTVModulationSystem::confTable[] = 436 { 437 { "SYS_UNDEFINED", kModulationSystem_UNDEFINED }, 438 { "SYS_DVBC_ANNEX_AC", kModulationSystem_DVBC_ANNEX_AC }, 439 { "SYS_DVBC_ANNEX_B", kModulationSystem_DVBC_ANNEX_B }, 440 { "SYS_DVBT", kModulationSystem_DVBT }, 441 { "SYS_DSS", kModulationSystem_DSS }, 442 { "SYS_DVBS", kModulationSystem_DVBS }, 443 { "SYS_DVBS2", kModulationSystem_DVBS2 }, 444 { "SYS_DVBH", kModulationSystem_DVBH }, 445 { "SYS_ISDBT", kModulationSystem_ISDBT }, 446 { "SYS_ISDBS", kModulationSystem_ISDBS }, 447 { "SYS_ISDBC", kModulationSystem_ISDBC }, 448 { "SYS_ATSC", kModulationSystem_ATSC }, 449 { "SYS_ATSCMH", kModulationSystem_ATSCMH }, 450 { "SYS_DMBTH", kModulationSystem_DMBTH }, 451 { "SYS_CMMB", kModulationSystem_CMMB }, 452 { "SYS_DAB", kModulationSystem_DAB }, 453 { NULL, kModulationSystem_UNDEFINED }, 454 }; 455 456 const DTVParamHelperStruct DTVModulationSystem::vdrTable[] = 457 { 458 { "0", kModulationSystem_DVBS }, 459 { "1", kModulationSystem_DVBS2 }, 460 { NULL, kModulationSystem_UNDEFINED }, 461 }; 462 463 const DTVParamHelperStruct DTVModulationSystem::parseTable[] = 464 { 465 { "UNDEFINED", kModulationSystem_UNDEFINED }, 466 { "DVBC_AC", kModulationSystem_DVBC_ANNEX_AC }, 467 { "DVBC_B", kModulationSystem_DVBC_ANNEX_B }, 468 { "DVBT", kModulationSystem_DVBT }, 469 { "DSS", kModulationSystem_DSS }, 470 { "DVB-S", kModulationSystem_DVBS }, 471 { "DVB-S2", kModulationSystem_DVBS2 }, 472 { "DVBH", kModulationSystem_DVBH }, 473 { "ISDBT", kModulationSystem_ISDBT }, 474 { "ISDBS", kModulationSystem_ISDBS }, 475 { "ISDBC", kModulationSystem_ISDBC }, 476 { "ATSC", kModulationSystem_ATSC }, 477 { "ATSCMH", kModulationSystem_ATSCMH }, 478 { "DMBTH", kModulationSystem_DMBTH }, 479 { "CMMB", kModulationSystem_CMMB }, 480 { "DAB", kModulationSystem_DAB }, 481 { NULL, kModulationSystem_UNDEFINED }, 482 }; 483 484 const char *DTVModulationSystem::dbStr[DTVModulationSystem::kDBStrCnt] = 485 { 486 "UNDEFINED", ///< kModulationSystem_UNDEFINED 487 "DVBCAC", ///< kModulationSystem_DVBC_ANNEX_AC 488 "DVBC_B", ///< kModulationSystem_DVBC_ANNEX_B 489 "DVBT", ///< kModulationSystem_DVBT 490 "DSS", ///< kModulationSystem_DSS 491 "DVB-S", ///< kModulationSystem_DVBS 492 "DVB-S2", ///< kModulationSystem_DVBS2 493 "DVBH", ///< kModulationSystem_DVBH 494 "ISDBT", ///< kModulationSystem_ISDBT 495 "ISDBS", ///< kModulationSystem_ISDBS 496 "ISDBC", ///< kModulationSystem_ISDBC 497 "ATSC", ///< kModulationSystem_ATSC 498 "ATSCMH", ///< kModulationSystem_ATSCMH 499 "DMBTH", ///< kModulationSystem_DMBTH 500 "CMMB", ///< kModulationSystem_CMMB 501 "DAB", ///< kModulationSystem_DAB 502 }; 503 504 const DTVParamHelperStruct DTVRollOff::confTable[] = 505 { 506 { "ROLLOFF_35", kRollOff_35 }, 507 { "ROLLOFF_20", kRollOff_20 }, 508 { "ROLLOFF_25", kRollOff_25 }, 509 { "ROLLOFF_AUTO", kRollOff_Auto }, 510 { NULL, kRollOff_35 }, 511 }; 512 513 const DTVParamHelperStruct DTVRollOff::vdrTable[] = 514 { 515 { "35", kRollOff_35 }, 516 { "20", kRollOff_20 }, 517 { "25", kRollOff_25 }, 518 { "0", kRollOff_Auto }, 519 { NULL, kRollOff_35 }, 520 }; 521 const DTVParamHelperStruct DTVRollOff::parseTable[] = 522 { 523 { "0.35", kRollOff_35 }, 524 { "0.20", kRollOff_20 }, 525 { "0.25", kRollOff_25 }, 526 { "auto", kRollOff_Auto }, 527 { NULL, kRollOff_35 }, 528 }; 529 530 const char *DTVRollOff::dbStr[DTVRollOff::kDBStrCnt] = 531 { 532 "0.35", ///< kRollOff_35 533 "0.20", ///< kRollOff_20 534 "0.25", ///< kRollOff_25 535 "auto", ///< kRollOff_Auto 536 }; -
mythtv/libs/libmythtv/dtvconfparserhelpers.h
diff --git a/mythtv/libs/libmythtv/dtvconfparserhelpers.h b/mythtv/libs/libmythtv/dtvconfparserhelpers.h index c9f3a1c..d33fdb7 100644
a b class DTVCodeRate : public DTVParamHelper 201 201 static const DTVParamHelperStruct confTable[]; 202 202 static const DTVParamHelperStruct vdrTable[]; 203 203 static const DTVParamHelperStruct parseTable[]; 204 static const uint kDBStrCnt = 1 0;204 static const uint kDBStrCnt = 12; 205 205 static const char *dbStr[kDBStrCnt]; 206 206 207 207 public: … … class DTVCodeRate : public DTVParamHelper 217 217 kFEC_7_8, 218 218 kFEC_8_9, 219 219 kFECAuto, 220 kFEC_3_5, 221 kFEC_9_10, 220 222 }; 221 223 222 224 DTVCodeRate(int _default = kFECAuto) : DTVParamHelper(_default) { } … … class DTVModulation : public DTVParamHelper 245 247 static const DTVParamHelperStruct confTable[]; 246 248 static const DTVParamHelperStruct vdrTable[]; 247 249 static const DTVParamHelperStruct parseTable[]; 248 static const uint kDBStrCnt = 1 7;250 static const uint kDBStrCnt = 13; 249 251 static const char *dbStr[kDBStrCnt]; 250 252 251 253 public: 252 254 enum 253 255 { 254 kModulationQPSK = 0, 255 kModulationQAM16 = 1, 256 kModulationQAM32 = 2, 257 kModulationQAM64 = 3, 258 kModulationQAM128 = 4, 259 kModulationQAM256 = 5, 260 kModulationQAMAuto = 6, 261 kModulation8VSB = 7, 262 kModulation16VSB = 8, 263 kModulation2VSB = 9, 264 kModulation4VSB = 10, 265 kModulationBPSK = 11, 266 kModulation16APSK = 12, 267 kModulation32APSK = 13, 268 kModulation8PSK = 14, 269 kModulation16PSK = 15, 270 kModulationAnalog = 16, /* for analog channel scanner */ 256 kModulationQPSK, 257 kModulationQAM16, 258 kModulationQAM32, 259 kModulationQAM64, 260 kModulationQAM128, 261 kModulationQAM256, 262 kModulationQAMAuto, 263 kModulation8VSB, 264 kModulation16VSB, 265 kModulation8PSK, 266 kModulation16APSK, 267 kModulation32APSK, 268 kModulationDQPSK, 269 kModulationInvalid = 0x100, /* for removed modulations */ 270 kModulationAnalog = 0x200, /* for analog channel scanner */ 271 271 }; 272 272 273 273 DTVModulation(int _default = kModulationQAMAuto) … … class DTVPolarity : public DTVParamHelper 449 449 { return DTVParamHelper::toString(dbStr, _value, kDBStrCnt); } 450 450 }; 451 451 452 class DTVModulationSystem : public DTVParamHelper 453 { 454 protected: 455 static const DTVParamHelperStruct confTable[]; 456 static const DTVParamHelperStruct vdrTable[]; 457 static const DTVParamHelperStruct parseTable[]; 458 static const uint kDBStrCnt = 16; 459 static const char *dbStr[kDBStrCnt]; 460 461 public: 462 enum 463 { 464 kModulationSystem_UNDEFINED, 465 kModulationSystem_DVBC_ANNEX_AC, 466 kModulationSystem_DVBC_ANNEX_B, 467 kModulationSystem_DVBT, 468 kModulationSystem_DSS, 469 kModulationSystem_DVBS, 470 kModulationSystem_DVBS2, 471 kModulationSystem_DVBH, 472 kModulationSystem_ISDBT, 473 kModulationSystem_ISDBS, 474 kModulationSystem_ISDBC, 475 kModulationSystem_ATSC, 476 kModulationSystem_ATSCMH, 477 kModulationSystem_DMBTH, 478 kModulationSystem_CMMB, 479 kModulationSystem_DAB, 480 }; 481 482 DTVModulationSystem(int _default = kModulationSystem_UNDEFINED) 483 : DTVParamHelper(_default) { } 484 485 bool ParseConf(const QString &_value) 486 { return ParseParam(_value, value, confTable); } 487 bool ParseVDR(const QString &_value) 488 { return ParseParam(_value, value, vdrTable); } 489 bool Parse(const QString &_value) 490 { return ParseParam(_value, value, parseTable); } 491 492 QString toString() const { return toString(value); } 493 494 static QString toString(int _value) 495 { return DTVParamHelper::toString(dbStr, _value, kDBStrCnt); } 496 }; 497 498 class DTVRollOff : public DTVParamHelper 499 { 500 protected: 501 static const DTVParamHelperStruct confTable[]; 502 static const DTVParamHelperStruct vdrTable[]; 503 static const DTVParamHelperStruct parseTable[]; 504 static const uint kDBStrCnt = 4; 505 static const char *dbStr[kDBStrCnt]; 506 507 public: 508 enum 509 { 510 kRollOff_35, 511 kRollOff_20, 512 kRollOff_25, 513 kRollOff_Auto, 514 }; 515 516 DTVRollOff(int _default = kRollOff_35) 517 : DTVParamHelper(_default) { } 518 519 bool IsCompatible(const DTVRollOff &other) const 520 { return value == other.value || value == kRollOff_Auto || 521 other.value == kRollOff_Auto; 522 } 523 524 bool ParseConf(const QString &_value) 525 { return ParseParam(_value, value, confTable); } 526 bool ParseVDR(const QString &_value) 527 { return ParseParam(_value, value, vdrTable); } 528 bool Parse(const QString &_value) 529 { return ParseParam(_value, value, parseTable); } 530 531 QString toString() const { return toString(value); } 532 533 static QString toString(int _value) 534 { return DTVParamHelper::toString(dbStr, _value, kDBStrCnt); } 535 }; 536 452 537 #endif // _DTVCONFPARSERHELPERS_H_ -
mythtv/libs/libmythtv/dtvmultiplex.cpp
diff --git a/mythtv/libs/libmythtv/dtvmultiplex.cpp b/mythtv/libs/libmythtv/dtvmultiplex.cpp index cd1dc81..9ca2310 100644
a b DTVMultiplex &DTVMultiplex::operator=(const DTVMultiplex &other) 22 22 hierarchy = other.hierarchy; 23 23 polarity = other.polarity; 24 24 fec = other.fec; 25 mod_sys = other.mod_sys; 26 rolloff = other.rolloff; 25 27 mplex = other.mplex; 26 28 sistandard = other.sistandard; 27 29 sistandard.detach(); … … bool DTVMultiplex::operator==(const DTVMultiplex &m) const 39 41 (trans_mode == m.trans_mode) && 40 42 (guard_interval == m.guard_interval) && 41 43 (fec == m.fec) && 44 (mod_sys == m.mod_sys) && 45 (rolloff == m.rolloff) && 42 46 (polarity == m.polarity) && 43 47 (hierarchy == m.hierarchy)); 44 48 } … … QString DTVMultiplex::toString() const 56 60 .arg(bandwidth.toString()).arg(trans_mode.toString()) 57 61 .arg(guard_interval.toString()).arg(hierarchy.toString()) 58 62 .arg(polarity.toString()); 63 ret += QString(" msys: %1 rolloff: %2") 64 .arg(mod_sys.toString()).arg(rolloff.toString()); 59 65 60 66 return ret; 61 67 } … … bool DTVMultiplex::IsEqual(DTVTunerType type, const DTVMultiplex &other, 117 123 if ((DTVTunerType::kTunerTypeDVB_S2 == type) || 118 124 (DTVTunerType::kTunerTypeQPSK == type)) 119 125 { 126 bool ret = 127 (symbolrate == other.symbolrate) && 128 (polarity == other.polarity) && 129 (mod_sys == other.mod_sys); 130 120 131 if (fuzzy) 121 return 132 return ret && 122 133 inversion.IsCompatible(other.inversion) && 123 (symbolrate == other.symbolrate) && 124 (polarity == other.polarity) && 125 fec.IsCompatible(other.fec); 126 return 134 fec.IsCompatible(other.fec) && 135 rolloff.IsCompatible(other.rolloff); 136 return ret && 127 137 (inversion == other.inversion) && 128 (symbolrate == other.symbolrate) && 129 (polarity == other.polarity) && 130 (fec == other.fec); 138 (fec == other.fec) && 139 (rolloff == other.rolloff); 131 140 } 132 141 133 142 return false; … … bool DTVMultiplex::ParseDVB_S_and_C( 220 229 return ok; 221 230 } 222 231 232 bool DTVMultiplex::ParseDVB_S2( 233 const QString &_frequency, const QString &_inversion, 234 const QString &_symbol_rate, const QString &_fec_inner, 235 const QString &_modulation, const QString &_polarity, 236 const QString &_mod_sys, const QString &_rolloff) 237 { 238 bool ok = ParseDVB_S_and_C(_frequency, _inversion, _symbol_rate, 239 _fec_inner, _modulation, _polarity); 240 241 if (!mod_sys.Parse(_mod_sys)) 242 { 243 VERBOSE(VB_IMPORTANT, LOC_ERR + "Invalid S2 modulation system " + 244 QString("parameter '%1', aborting.").arg(_mod_sys)); 245 return false; 246 } 247 248 if (!_rolloff.isEmpty()) 249 ok &= rolloff.Parse(_rolloff); 250 251 return ok; 252 } 253 223 254 bool DTVMultiplex::ParseTuningParams( 224 255 DTVTunerType type, 225 256 QString _frequency, QString _inversion, QString _symbolrate, 226 257 QString _fec, QString _polarity, 227 258 QString _hp_code_rate, QString _lp_code_rate, QString _ofdm_modulation, 228 259 QString _trans_mode, QString _guard_interval, QString _hierarchy, 229 QString _modulation, QString _bandwidth) 260 QString _modulation, QString _bandwidth, 261 QString _mod_sys, QString _rolloff) 230 262 { 231 263 if (DTVTunerType::kTunerTypeOFDM == type) 232 264 { … … bool DTVMultiplex::ParseTuningParams( 237 269 } 238 270 239 271 if ((DTVTunerType::kTunerTypeQPSK == type) || 240 (DTVTunerType::kTunerTypeDVB_S2 == type) ||241 272 (DTVTunerType::kTunerTypeQAM == type)) 242 273 { 243 274 return ParseDVB_S_and_C( … … bool DTVMultiplex::ParseTuningParams( 245 276 _fec, _modulation, _polarity); 246 277 } 247 278 279 if (DTVTunerType::kTunerTypeDVB_S2 == type) 280 return ParseDVB_S2( 281 _frequency, _inversion, _symbolrate, 282 _fec, _modulation, _polarity, 283 _mod_sys, _rolloff); 284 248 285 if (DTVTunerType::kTunerTypeATSC == type) 249 286 return ParseATSC(_frequency, _modulation); 250 287 … … bool DTVMultiplex::FillFromDB(DTVTunerType type, uint mplexid) 263 300 " fec, polarity, " 264 301 " hp_code_rate, lp_code_rate, constellation, " 265 302 " transmission_mode, guard_interval, hierarchy, " 266 " modulation, bandwidth, sistandard " 303 " modulation, bandwidth, sistandard, " 304 " mod_sys, rolloff " 267 305 "FROM dtv_multiplex " 268 306 "WHERE dtv_multiplex.mplexid = :MPLEXID"); 269 307 query.bindValue(":MPLEXID", mplexid); … … bool DTVMultiplex::FillFromDB(DTVTunerType type, uint mplexid) 296 334 query.value(6).toString(), query.value(7).toString(), 297 335 query.value(8).toString(), query.value(9).toString(), 298 336 query.value(10).toString(), query.value(11).toString(), 299 query.value(12).toString()); 337 query.value(12).toString(), query.value(14).toString(), 338 query.value(15).toString()); 300 339 } 301 340 302 341 //////////////////////////////////////////////////////////////////////////// … … uint ScanDTVTransport::SaveScan(uint scanid) const 364 403 " symbolrate, fec, polarity, " 365 404 " hp_code_rate, lp_code_rate, modulation, " 366 405 " transmission_mode, guard_interval, hierarchy, " 406 " mod_sys, rolloff, " 367 407 " bandwidth, sistandard, tuner_type " 368 408 " ) " 369 409 "VALUES " … … uint ScanDTVTransport::SaveScan(uint scanid) const 372 412 " :SYMBOLRATE, :FEC, :POLARITY, " 373 413 " :HP_CODE_RATE, :LP_CODE_RATE, :MODULATION, " 374 414 " :TRANSMISSION_MODE, :GUARD_INTERVAL, :HIERARCHY, " 415 " :MOD_SYS, :ROLLOFF, " 375 416 " :BANDWIDTH, :SISTANDARD, :TUNER_TYPE " 376 417 " );"); 377 418 … … uint ScanDTVTransport::SaveScan(uint scanid) const 388 429 query.bindValue(":TRANSMISSION_MODE", trans_mode.toString()); 389 430 query.bindValue(":GUARD_INTERVAL", guard_interval.toString()); 390 431 query.bindValue(":HIERARCHY", hierarchy.toString()); 432 query.bindValue(":MOD_SYS", mod_sys.toString()); 433 query.bindValue(":ROLLOFF", rolloff.toString()); 391 434 query.bindValue(":BANDWIDTH", bandwidth.toString()); 392 435 query.bindValue(":SISTANDARD", sistandard); 393 436 query.bindValue(":TUNER_TYPE", (uint)tuner_type); … … bool ScanDTVTransport::ParseTuningParams( 419 462 QString _fec, QString _polarity, 420 463 QString _hp_code_rate, QString _lp_code_rate, QString _ofdm_modulation, 421 464 QString _trans_mode, QString _guard_interval, QString _hierarchy, 422 QString _modulation, QString _bandwidth) 465 QString _modulation, QString _bandwidth, QString _mod_sys, 466 QString _rolloff) 423 467 { 424 468 tuner_type = type; 425 469 … … bool ScanDTVTransport::ParseTuningParams( 429 473 _fec, _polarity, 430 474 _hp_code_rate, _lp_code_rate, _ofdm_modulation, 431 475 _trans_mode, _guard_interval, _hierarchy, 432 _modulation, _bandwidth); 476 _modulation, _bandwidth, _mod_sys, 477 _rolloff); 433 478 } 434 479 435 480 -
mythtv/libs/libmythtv/dtvmultiplex.h
diff --git a/mythtv/libs/libmythtv/dtvmultiplex.h b/mythtv/libs/libmythtv/dtvmultiplex.h index 0f1d076..db5bcd9 100644
a b class DTVMultiplex 49 49 const QString &symbol_rate, const QString &fec_inner, 50 50 const QString &modulation, const QString &polarity); 51 51 52 bool ParseDVB_S2( 53 const QString &frequency, const QString &inversion, 54 const QString &symbol_rate, const QString &fec_inner, 55 const QString &modulation, const QString &polarity, 56 const QString &mod_sys, const QString &rolloff); 57 52 58 bool ParseTuningParams( 53 59 DTVTunerType type, 54 60 QString frequency, QString inversion, QString symbolrate, 55 61 QString fec, QString polarity, 56 62 QString hp_code_rate, QString lp_code_rate, QString constellation, 57 63 QString trans_mode, QString guard_interval, QString hierarchy, 58 QString modulation, QString bandwidth); 64 QString modulation, QString bandwidth, QString mod_sys, 65 QString rolloff); 59 66 60 67 QString toString() const; 61 68 … … class DTVMultiplex 74 81 DTVHierarchy hierarchy; 75 82 DTVPolarity polarity; 76 83 DTVCodeRate fec; ///< Inner Forward Error Correction rate 84 DTVModulationSystem mod_sys; ///< modulation system (only DVB-S or DVB-S2 atm) 85 DTVRollOff rolloff; 77 86 78 87 // Optional additional info 79 88 uint mplex; … … class ScanDTVTransport : public DTVMultiplex 99 108 QString fec, QString polarity, 100 109 QString hp_code_rate, QString lp_code_rate, QString constellation, 101 110 QString trans_mode, QString guard_interval, QString hierarchy, 102 QString modulation, QString bandwidth); 111 QString modulation, QString bandwidth, 112 QString mod_sys, QString rolloff); 103 113 104 114 public: 105 115 DTVTunerType tuner_type; -
mythtv/libs/libmythtv/dvbchannel.cpp
diff --git a/mythtv/libs/libmythtv/dvbchannel.cpp b/mythtv/libs/libmythtv/dvbchannel.cpp index 5ed8f60..846e9ea 100644
a b 40 40 #include <sys/types.h> 41 41 42 42 // MythTV headers 43 #include "mythconfig.h" 43 44 #include "mythdb.h" 44 45 #include "cardutil.h" 45 46 #include "channelutil.h" … … 49 50 50 51 static void drain_dvb_events(int fd); 51 52 static bool wait_for_backend(int fd, int timeout_ms); 52 static struct dvb_f e_params dtvmultiplex_to_dvbparams(53 DTVTunerType, const DTVMultiplex& );53 static struct dvb_frontend_parameters dtvmultiplex_to_dvbparams( 54 DTVTunerType, const DTVMultiplex&, int intermediate_freq, bool can_fec_auto); 54 55 static DTVMultiplex dvbparams_to_dtvmultiplex( 55 DTVTunerType, const dvb_f e_params&);56 DTVTunerType, const dvb_frontend_parameters&); 56 57 57 58 #define LOC QString("DVBChan(%1:%2): ").arg(GetCardID()).arg(device) 58 59 #define LOC_WARN QString("DVBChan(%1:%2) Warning: ") \ … … bool DVBChannel::Open(DVBChannel *who) 210 211 return false; 211 212 } 212 213 213 #ifdef FE_GET_EXTENDED_INFO214 if (info.caps & FE_HAS_EXTENDED_INFO)215 {216 bool ok = true;217 dvb_fe_caps_extended extinfo;218 bzero(&extinfo, sizeof(extinfo));219 if (ioctl(fd_frontend, FE_GET_EXTENDED_INFO, &extinfo) < 0)220 {221 VERBOSE(VB_IMPORTANT, LOC_ERR +222 "Failed to get frontend extended information." + ENO);223 224 ok = false;225 }226 227 if (ok && (extinfo.modulations & MOD_8PSK))228 {229 if (ioctl(fd_frontend, FE_SET_STANDARD, FE_DVB_S2) < 0)230 {231 VERBOSE(VB_IMPORTANT, LOC_ERR +232 "Failed to set frontend standard to DVB-S2." + ENO);233 234 ok = false;235 }236 else if (ioctl(fd_frontend, FE_GET_INFO, &info) < 0)237 {238 VERBOSE(VB_IMPORTANT, LOC_ERR +239 "Failed to get frontend information." + ENO);240 241 ok = false;242 }243 }244 245 if (!ok)246 {247 close(fd_frontend);248 fd_frontend = -1;249 return false;250 }251 252 ext_modulations = extinfo.modulations;253 }254 #endif255 256 214 frontend_name = info.name; 257 215 card_type = info.type; 216 #if HAVE_FE_CAN_2G_MODULATION 217 if (card_type == DTVTunerType::kTunerTypeQPSK && 218 (info.caps & FE_CAN_2G_MODULATION)) 219 card_type = DTVTunerType::kTunerTypeDVB_S2; 220 #endif // HAVE_FE_CAN_2G_MODULATION 258 221 capabilities = info.caps; 259 222 frequency_minimum = info.frequency_min; 260 223 frequency_maximum = info.frequency_max; … … bool DVBChannel::CheckModulation(DTVModulation modulation) const 596 559 const DTVModulation m = modulation; 597 560 const uint64_t c = capabilities; 598 561 599 #ifdef FE_GET_EXTENDED_INFO600 if ((c & FE_HAS_EXTENDED_INFO) &&601 (DTVModulation::kModulation8PSK == m) &&602 (ext_modulations & DTVModulation::kModulation8PSK))603 {604 return true;605 }606 #endif // FE_GET_EXTENDED_INFO607 608 562 return 609 563 ((DTVModulation::kModulationQPSK == m) && (c & FE_CAN_QPSK)) || 610 564 ((DTVModulation::kModulationQAM16 == m) && (c & FE_CAN_QAM_16)) || … … bool DVBChannel::Tune(const DTVMultiplex &tuning, QString inputname) 649 603 return Tune(tuning, inputid, false, false); 650 604 } 651 605 606 #if DVB_API_VERSION >= 5 607 static struct dtv_properties *dtvmultiplex_to_dtvproperties( 608 DTVTunerType tuner_type, const DTVMultiplex &tuning, int intermediate_freq, 609 bool can_fec_auto, bool do_tune = true) 610 { 611 uint c = 0; 612 struct dtv_properties *cmdseq = (struct dtv_properties*) calloc(1, sizeof(*cmdseq)); 613 if (!cmdseq) 614 return NULL; 615 616 cmdseq->props = (struct dtv_property*) calloc(11, sizeof(*(cmdseq->props))); 617 if (!(cmdseq->props)) 618 { 619 free(cmdseq); 620 return NULL; 621 } 622 623 if (tuner_type == DTVTunerType::kTunerTypeDVB_S2) 624 { 625 cmdseq->props[c].cmd = DTV_DELIVERY_SYSTEM; 626 cmdseq->props[c++].u.data = tuning.mod_sys; 627 } 628 629 if (tuning.mod_sys == DTVModulationSystem::kModulationSystem_DVBS2) 630 { 631 cmdseq->props[c].cmd = DTV_PILOT; 632 cmdseq->props[c++].u.data = PILOT_AUTO; 633 cmdseq->props[c].cmd = DTV_ROLLOFF; 634 cmdseq->props[c++].u.data = tuning.rolloff; 635 } 636 637 cmdseq->props[c].cmd = DTV_FREQUENCY; 638 cmdseq->props[c++].u.data = intermediate_freq ? intermediate_freq : tuning.frequency; 639 cmdseq->props[c].cmd = DTV_MODULATION; 640 cmdseq->props[c++].u.data = tuning.modulation; 641 cmdseq->props[c].cmd = DTV_INVERSION; 642 cmdseq->props[c++].u.data = tuning.inversion; 643 644 if (tuner_type.IsFECVariable()) 645 { 646 cmdseq->props[c].cmd = DTV_INNER_FEC; 647 cmdseq->props[c++].u.data = can_fec_auto ? FEC_AUTO : tuning.fec; 648 } 649 650 if (tuner_type == DTVTunerType::kTunerTypeQPSK || 651 tuner_type == DTVTunerType::kTunerTypeDVB_S2 || 652 tuner_type == DTVTunerType::kTunerTypeQAM) 653 { 654 cmdseq->props[c].cmd = DTV_SYMBOL_RATE; 655 cmdseq->props[c++].u.data = tuning.symbolrate; 656 } 657 else if (tuner_type == DTVTunerType::kTunerTypeOFDM) 658 { 659 cmdseq->props[c].cmd = DTV_BANDWIDTH_HZ; 660 cmdseq->props[c++].u.data = (8-tuning.bandwidth) * 1000000; 661 cmdseq->props[c].cmd = DTV_CODE_RATE_HP; 662 cmdseq->props[c++].u.data = tuning.hp_code_rate; 663 cmdseq->props[c].cmd = DTV_CODE_RATE_LP; 664 cmdseq->props[c++].u.data = tuning.lp_code_rate; 665 cmdseq->props[c].cmd = DTV_TRANSMISSION_MODE; 666 cmdseq->props[c++].u.data = tuning.trans_mode; 667 cmdseq->props[c].cmd = DTV_GUARD_INTERVAL; 668 cmdseq->props[c++].u.data = tuning.guard_interval; 669 cmdseq->props[c].cmd = DTV_HIERARCHY; 670 cmdseq->props[c++].u.data = tuning.hierarchy; 671 } 672 else 673 { 674 VERBOSE(VB_IMPORTANT, "Unknown tuner type." + ENO); 675 return NULL; 676 } 677 678 if (do_tune) 679 cmdseq->props[c++].cmd = DTV_TUNE; 680 681 cmdseq->num = c; 682 683 #if 0 684 for (int i = 0; i < cmdseq->num; i++) 685 { 686 cerr << "prop " << i << ": cmd = " << cmdseq->props[i].cmd 687 << " data = " << cmdseq->props[i].u.data << endl; 688 } 689 #endif 690 return cmdseq; 691 } 692 #endif 693 694 652 695 /***************************************************************************** 653 696 Tuning functions for each of the four types of cards. 654 697 *****************************************************************************/ … … bool DVBChannel::Tune(const DTVMultiplex &tuning, 679 722 return master->Tune(tuning, inputid, force_reset, false); 680 723 } 681 724 725 int intermediate_freq = 0; 726 bool can_fec_auto = false; 682 727 bool reset = (force_reset || first_tune); 683 struct dvb_fe_params params = dtvmultiplex_to_dvbparams(card_type, tuning);684 728 685 729 bool is_dvbs = (DTVTunerType::kTunerTypeQPSK == card_type || 686 730 DTVTunerType::kTunerTypeDVB_S2 == card_type); … … bool DVBChannel::Tune(const DTVMultiplex &tuning, 738 782 reset = first_tune = true; 739 783 } 740 784 741 params.frequency= lnb->GetIntermediateFrequency(785 intermediate_freq = lnb->GetIntermediateFrequency( 742 786 diseqc_settings, tuning); 743 787 744 788 // if card can auto-FEC, use it -- sometimes NITs are inaccurate 745 789 if (capabilities & FE_CAN_FEC_AUTO) 746 params.u.qpsk.fec_inner = FEC_AUTO;790 can_fec_auto = true; 747 791 } 748 792 749 793 VERBOSE(VB_CHANNEL, LOC + "Old Params: " + … … bool DVBChannel::Tune(const DTVMultiplex &tuning, 758 802 if (reset || !prev_tuning.IsEqual(card_type, tuning, 500 * freq_mult)) 759 803 { 760 804 VERBOSE(VB_CHANNEL, LOC + QString("Tune(): Tuning to %1%2") 761 .arg(params.frequency).arg(suffix)); 805 .arg(intermediate_freq ? intermediate_freq : tuning.frequency) 806 .arg(suffix)); 762 807 763 #if def FE_GET_EXTENDED_INFO764 if ( card_type == DTVTunerType::kTunerTypeDVB_S2)808 #if DVB_API_VERSION >=5 809 if (DTVTunerType::kTunerTypeDVB_S2 == card_type) 765 810 { 766 if (ioctl(fd_frontend, FE_SET_FRONTEND2, ¶ms) < 0) 811 struct dtv_properties *cmds = dtvmultiplex_to_dtvproperties( 812 card_type, tuning, intermediate_freq, can_fec_auto); 813 814 if (!cmds) 815 return false; 816 817 if (ioctl(fd_frontend, FE_SET_PROPERTY, cmds) < 0) 767 818 { 768 819 VERBOSE(VB_IMPORTANT, LOC_ERR + "Tune(): " + 769 "Setting Frontend (2)tuning parameters failed." + ENO);820 "Setting Frontend tuning parameters failed." + ENO); 770 821 return false; 771 822 } 823 free(cmds->props); 824 free(cmds); 772 825 } 773 826 else 774 #endif // FE_GET_EXTENDED_INFO827 #endif 775 828 { 829 struct dvb_frontend_parameters params = dtvmultiplex_to_dvbparams(card_type, tuning, 830 intermediate_freq, 831 can_fec_auto); 832 776 833 if (ioctl(fd_frontend, FE_SET_FRONTEND, ¶ms) < 0) 777 834 { 778 835 VERBOSE(VB_IMPORTANT, LOC_ERR + "Tune(): " + … … bool DVBChannel::IsTuningParamsProbeSupported(void) const 835 892 return false; 836 893 } 837 894 838 dvb_f e_params params;895 dvb_frontend_parameters params; 839 896 return ioctl(fd_frontend, FE_GET_FRONTEND, ¶ms) >= 0; 840 897 } 841 898 … … bool DVBChannel::ProbeTuningParams(DTVMultiplex &tuning) const 868 925 return false; 869 926 } 870 927 871 dvb_fe_params params; 928 if (card_type == DTVTunerType::kTunerTypeDVB_S2) 929 { 930 // TODO implement probing of tuning parameters with FE_GET_PROPERTY 931 return false; 932 } 933 934 dvb_frontend_parameters params; 872 935 if (ioctl(fd_frontend, FE_GET_FRONTEND, ¶ms) < 0) 873 936 { 874 937 VERBOSE(VB_IMPORTANT, LOC_ERR + … … static bool wait_for_backend(int fd, int timeout_ms) 1094 1157 return true; 1095 1158 } 1096 1159 1097 static struct dvb_fe_params dtvmultiplex_to_dvbparams( 1098 DTVTunerType tuner_type, const DTVMultiplex &tuning) 1160 static struct dvb_frontend_parameters dtvmultiplex_to_dvbparams( 1161 DTVTunerType tuner_type, const DTVMultiplex &tuning, 1162 int intermediate_freq, bool can_fec_auto) 1099 1163 { 1100 dvb_f e_params params;1164 dvb_frontend_parameters params; 1101 1165 bzero(¶ms, sizeof(params)); 1102 1166 1103 1167 params.frequency = tuning.frequency; … … static struct dvb_fe_params dtvmultiplex_to_dvbparams( 1105 1169 1106 1170 if (DTVTunerType::kTunerTypeQPSK == tuner_type) 1107 1171 { 1172 params.frequency = intermediate_freq; 1108 1173 params.u.qpsk.symbol_rate = tuning.symbolrate; 1109 params.u.qpsk.fec_inner = (fe_code_rate_t) (int) tuning.fec; 1174 params.u.qpsk.fec_inner = can_fec_auto ? FEC_AUTO 1175 : (fe_code_rate_t) (int) tuning.fec; 1110 1176 } 1111 1177 1112 1178 if (DTVTunerType::kTunerTypeDVB_S2 == tuner_type) 1113 1179 { 1114 #ifdef FE_GET_EXTENDED_INFO1115 params.u.qpsk2.symbol_rate = tuning.symbolrate;1116 params.u.qpsk2.fec_inner = (fe_code_rate_t) (int) tuning.fec;1117 params.u.qpsk2.modulation = (fe_modulation_t) (int) tuning.modulation;1118 #else // if !FE_GET_EXTENDED_INFO1119 1180 VERBOSE(VB_IMPORTANT, "DVBChan Error, MythTV was compiled without " 1120 1181 "DVB-S2 headers being present so DVB-S2 tuning will fail."); 1121 #endif // !FE_GET_EXTENDED_INFO1122 1182 } 1123 1183 1124 1184 if (DTVTunerType::kTunerTypeQAM == tuner_type) … … static struct dvb_fe_params dtvmultiplex_to_dvbparams( 1148 1208 1149 1209 if (DTVTunerType::kTunerTypeATSC == tuner_type) 1150 1210 { 1151 #ifdef USE_ATSC1152 1211 params.u.vsb.modulation = 1153 1212 (fe_modulation_t) (int) tuning.modulation; 1154 #endif // USE_ATSC1155 1213 } 1156 1214 1157 1215 return params; 1158 1216 } 1159 1217 1160 1218 static DTVMultiplex dvbparams_to_dtvmultiplex( 1161 DTVTunerType tuner_type, const dvb_f e_params ¶ms)1219 DTVTunerType tuner_type, const dvb_frontend_parameters ¶ms) 1162 1220 { 1163 1221 DTVMultiplex tuning; 1164 1222 … … static DTVMultiplex dvbparams_to_dtvmultiplex( 1192 1250 1193 1251 if (DTVTunerType::kTunerTypeATSC == tuner_type) 1194 1252 { 1195 #ifdef USE_ATSC1196 1253 tuning.modulation = params.u.vsb.modulation; 1197 #endif // USE_ATSC1198 1254 } 1199 1255 1200 1256 return tuning; -
mythtv/libs/libmythtv/dvbtypes.h
diff --git a/mythtv/libs/libmythtv/dvbtypes.h b/mythtv/libs/libmythtv/dvbtypes.h index bc15a22..94a8882 100644
a b 19 19 #include <linux/dvb/frontend.h> 20 20 #include <linux/dvb/dmx.h> 21 21 22 #if (DVB_API_VERSION != 3 && DVB_API_VERSION != 5)23 # error "DVB driver includes with API version 3 not found!"24 #endif25 26 22 #ifndef DVB_API_VERSION_MINOR 27 # define DVB_API_VERSION_MINOR 0 28 #endif 29 30 #if ((DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) || (DVB_API_VERSION > 3)) 31 # define USE_ATSC 32 #else 33 #warning DVB API version < 3.1 34 #warning ATSC will not be supported using the Linux DVB drivers 35 # define FE_ATSC (FE_OFDM+1) 36 # define FE_CAN_8VSB 0x200000 37 # define FE_CAN_16VSB 0x400000 38 # define VSB_8 (fe_modulation)(QAM_AUTO+1) 39 # define VSB_16 (fe_modulation)(QAM_AUTO+2) 23 #define DVB_API_VERSION_MINOR 0 40 24 #endif 41 25 42 #ifdef FE_GET_EXTENDED_INFO 43 #define dvb_fe_params dvb_frontend_parameters_new 44 #else 45 #define dvb_fe_params dvb_frontend_parameters 26 #if !(DVB_API_VERSION == 3 && DVB_API_VERSION_MINOR >= 1) && DVB_API_VERSION != 5 27 # error "DVB driver includes with API version 3.1 or later not found!" 46 28 #endif 47 29 48 30 class QString; -
mythtv/libs/libmythtv/frequencytables.cpp
diff --git a/mythtv/libs/libmythtv/frequencytables.cpp b/mythtv/libs/libmythtv/frequencytables.cpp index 6773dd9..e3c940f 100644
a b TransportScanItem::TransportScanItem(uint _sourceid, 72 72 _tuning.lp_code_rate.toString(), _tuning.modulation.toString(), 73 73 _tuning.trans_mode.toString(), _tuning.guard_interval.toString(), 74 74 _tuning.hierarchy.toString(), _tuning.modulation.toString(), 75 _tuning.bandwidth.toString()); 75 _tuning.bandwidth.toString(), _tuning.mod_sys.toString(), 76 _tuning.rolloff.toString()); 76 77 } 77 78 78 79 TransportScanItem::TransportScanItem(uint sourceid, -
mythtv/libs/libmythtv/mpeg/dvbdescriptors.h
diff --git a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.h b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.h index 64a802d..e8fb9e5 100644
a b class SatelliteDeliverySystemDescriptor : public MPEGDescriptor 770 770 bool IsLinearPolarization() const { return !((_data[8]>>6)&0x1); } 771 771 bool IsHorizontalLeftPolarization() const { return (_data[8]>>5)&0x1; } 772 772 bool IsVerticalRightPolarization() const { return !((_data[8]>>5)&0x1); } 773 // modulation 5 8.3 773 // roll off 2 8.3 774 enum 775 { 776 kRollOff_35, 777 kRollOff_20, 778 kRollOff_25, 779 kRollOff_Auto, 780 }; 781 uint RollOff() const { return (_data[8]>>3)&0x3; } 782 QString RollOffString() const 783 { 784 static QString ro[] = { "0.35", "0.20", "0.25", "auto" }; 785 return ro[RollOff()]; 786 } 787 // modulation system 1 8.5 788 uint ModulationSystem() const { return (_data[8]>>2)&0x1; } 789 QString ModulationSystemString() const 790 { 791 return ModulationSystem() ? "DVB-S2" : "DVB-S"; 792 } 793 // modulation 2 8.6 774 794 enum 775 795 { 776 796 kModulationQPSK_NS = 0x0, // Non standard QPSK for Bell ExpressVu 797 // should be "auto" according to DVB SI standard 777 798 kModulationQPSK = 0x1, 778 799 kModulation8PSK = 0x2, 779 800 kModulationQAM16 = 0x3, 780 801 }; 781 uint Modulation() const { return _data[8]&0x 1f; }802 uint Modulation() const { return _data[8]&0x03; } 782 803 QString ModulationString() const 783 804 { 784 805 static QString ms[] = { "qpsk", "qpsk", "8psk", "qam_16" }; 785 return (Modulation() <= kModulationQAM16) ? ms[Modulation()] : "auto";806 return ms[Modulation()]; 786 807 } 787 808 // symbol_rate 28 9.0 788 809 uint SymbolRate() const -
mythtv/libs/libmythtv/scanwizard.cpp
diff --git a/mythtv/libs/libmythtv/scanwizard.cpp b/mythtv/libs/libmythtv/scanwizard.cpp index 1847fdb..c829b36 100644
a b void ScanWizard::SetPage(const QString &pageTitle) 100 100 start_chan = configPane->GetStartChan(); 101 101 parse_type = DTVTunerType::kTunerTypeQPSK; 102 102 } 103 else if (scantype == ScanTypeSetting::NITAddScan_DVBS2) 104 { 105 start_chan = configPane->GetStartChan(); 106 parse_type = DTVTunerType::kTunerTypeDVB_S2; 107 } 103 108 else if (scantype == ScanTypeSetting::NITAddScan_DVBC) 104 109 { 105 110 start_chan = configPane->GetStartChan(); … … void ScanWizard::SetPage(const QString &pageTitle) 162 167 start_chan["coderate_hp"], start_chan["coderate_lp"], 163 168 start_chan["constellation"], start_chan["trans_mode"], 164 169 start_chan["guard_interval"], start_chan["hierarchy"], 165 start_chan["modulation"], start_chan["bandwidth"])) 170 start_chan["modulation"], start_chan["bandwidth"], 171 start_chan["mod_sys"], start_chan["rolloff"])) 166 172 { 167 173 MythPopupBox::showOkPopup( 168 174 gContext->GetMainWindow(), tr("ScanWizard"), -
mythtv/libs/libmythtv/videosource.cpp
diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp index bc10656..9b4f3a8 100644
a b void DVBConfigurationGroup::probeCard(const QString &videodevice) 3341 3341 signal_timeout->setValue(60000); 3342 3342 channel_timeout->setValue(62500); 3343 3343 break; 3344 case CardUtil::DVBS2: 3345 cardtype->setValue("DVB-S2"); 3346 cardname->setValue(frontend_name); 3347 signal_timeout->setValue(60000); 3348 channel_timeout->setValue(62500); 3349 break; 3344 3350 case CardUtil::QAM: 3345 3351 cardtype->setValue("DVB-C"); 3346 3352 cardname->setValue(frontend_name);