Ticket #13014: 20190314-delsys-v0.patch
File 20190314-delsys-v0.patch, 21.9 KB (added by , 5 years ago) |
---|
-
mythtv/libs/libmythtv/cardutil.cpp
diff --git a/mythtv/libs/libmythtv/cardutil.cpp b/mythtv/libs/libmythtv/cardutil.cpp index 41224166d9..682a3f8b4d 100644
a b QStringList CardUtil::ProbeVideoDevices(const QString &rawtype) 574 574 return devs; 575 575 } 576 576 577 // Get the list of delivery systems from the card 578 QStringList CardUtil::ProbeDeliverySystems(const QString &device) 579 { 580 QStringList delsys; 581 582 if (device.isEmpty()) 583 return delsys; 584 585 #ifdef USING_DVB 586 QString dvbdev = CardUtil::GetDeviceName(DVB_DEV_FRONTEND, device); 587 QByteArray dev = dvbdev.toLatin1(); 588 589 int fd_frontend = open(dev.constData(), O_RDWR | O_NONBLOCK); 590 if (fd_frontend < 0) 591 { 592 LOG(VB_GENERAL, LOG_ERR, LOC + 593 QString("Can't open DVB frontend (%1) for %2.") 594 .arg(dvbdev).arg(device) + ENO); 595 return delsys; 596 } 597 598 #if DVB_API_VERSION >=5 599 unsigned int i; 600 struct dtv_property prop; 601 struct dtv_properties cmd; 602 603 memset(&prop, 0, sizeof(prop)); 604 prop.cmd = DTV_API_VERSION; 605 cmd.num = 1; 606 cmd.props = ∝ 607 if (ioctl(fd_frontend, FE_GET_PROPERTY, &cmd) == 0) 608 { 609 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil[%1]: ").arg(dvbdev) + 610 QString("dvb api version %1.%2").arg((prop.u.data>>8)&0xff).arg((prop.u.data)&0xff)); 611 } 612 else 613 { 614 LOG(VB_GENERAL, LOG_ERR, LOC + QString("FE_GET_PROPERTY ioctl failed (%1)") 615 .arg(dvbdev) + ENO); 616 close(fd_frontend); 617 return delsys; 618 } 619 620 memset(&prop, 0, sizeof(prop)); 621 prop.cmd = DTV_ENUM_DELSYS; 622 cmd.num = 1; 623 cmd.props = ∝ 624 if (ioctl(fd_frontend, FE_GET_PROPERTY, &cmd) == 0) 625 { 626 for (i = 0; i < prop.u.buffer.len; i++) 627 { 628 delsys.push_back(DTVModulationSystem::toString(prop.u.buffer.data[i])); 629 } 630 QStringList::iterator it = delsys.begin(); 631 QString msg = "Delivery systems:"; 632 for (; it != delsys.end(); it++) 633 { 634 msg += " "; 635 msg += *it; 636 } 637 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil: (%1) num props:%2 ") 638 .arg(dvbdev).arg(prop.u.buffer.len) + msg); 639 } 640 else 641 { 642 LOG(VB_GENERAL, LOG_ERR, LOC + QString("FE_GET_PROPERTY ioctl failed (%1)") 643 .arg(dvbdev) + ENO); 644 } 645 #endif // DVB_API_VERSION >= 5 646 close(fd_frontend); 647 #endif // USING_DVB 648 649 return delsys; 650 } 651 577 652 QString CardUtil::ProbeDVBType(const QString &device) 578 653 { 579 654 QString ret = "ERROR_UNKNOWN"; … … QString CardUtil::ProbeDVBType(const QString &device) 605 680 } 606 681 607 682 DTVTunerType type(info.type); 683 684 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil: (%1) ").arg(dvbdev) + 685 QString("info.type:%1 info.caps:0x%2 FE_CAN_2G_MODULATION:%3 type:%4") 686 .arg(info.type).arg(info.caps,8,16,QChar('0')) 687 .arg((info.caps & FE_CAN_2G_MODULATION)?"yes":"no") 688 .arg(type.toString())); 689 608 690 #if HAVE_FE_CAN_2G_MODULATION 609 691 if (info.caps & FE_CAN_2G_MODULATION) 610 692 { … … QString CardUtil::ProbeDVBType(const QString &device) 615 697 } 616 698 #endif // HAVE_FE_CAN_2G_MODULATION 617 699 618 #if DVB_API_VERSION >=5 619 unsigned int i; 620 struct dtv_property prop; 621 struct dtv_properties cmd; 622 623 memset(&prop, 0, sizeof(prop)); 624 prop.cmd = DTV_ENUM_DELSYS; 625 cmd.num = 1; 626 cmd.props = ∝ 700 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil: (%1) ").arg(dvbdev) + 701 QString("info.type:%1 info.caps:0x%2 FE_CAN_2G_MODULATION:%3 type:%4") 702 .arg(info.type).arg(info.caps,8,16,QChar('0')) 703 .arg((info.caps & FE_CAN_2G_MODULATION)?"yes":"no") 704 .arg(type.toString())); 627 705 628 if (ioctl(fd_frontend, FE_GET_PROPERTY, &cmd) == 0)629 {630 for (i = 0; i < prop.u.buffer.len; i++)631 {632 switch (prop.u.buffer.data[i])633 {634 // TODO: not supported. you can have DVBC and DVBT on the same card635 // The following are backwards compatible so its ok636 case SYS_DVBS2:637 type = DTVTunerType::kTunerTypeDVBS2;638 break;639 case SYS_DVBT2:640 type = DTVTunerType::kTunerTypeDVBT2;641 break;642 default:643 break;644 }645 }646 }647 #endif648 706 close(fd_frontend); 649 707 650 708 ret = (type.toString() != "UNKNOWN") ? type.toString().toUpper() : ret; 651 709 #endif // USING_DVB 652 710 711 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil::%1: (%2) type:%3") 712 .arg(__FUNCTION__).arg(dvbdev).arg(ret)); 713 653 714 return ret; 654 715 } 655 716 … … QString CardUtil::ProbeSubTypeName(uint inputid) 730 791 if (device.isEmpty()) 731 792 return "ERROR_OPEN"; 732 793 733 return ProbeDVBType(device); 794 QString delsys_db = GetDeliverySystem(inputid); 795 796 DTVModulationSystem delsys; 797 bool res = delsys.Parse(delsys_db); 798 799 DTVTunerType tunertype; 800 if (res) 801 { 802 switch (delsys) 803 { 804 case DTVModulationSystem::kModulationSystem_DVBT: 805 tunertype = DTVTunerType::kTunerTypeDVBT; 806 break; 807 case DTVModulationSystem::kModulationSystem_DVBT2: 808 tunertype = DTVTunerType::kTunerTypeDVBT2; 809 break; 810 case DTVModulationSystem::kModulationSystem_DVBC_ANNEX_A: 811 tunertype = DTVTunerType::kTunerTypeDVBC; 812 break; 813 default: 814 LOG(VB_GENERAL, LOG_ERR, QString("CardUtil::%1[%2]: TODO Add to switch case delsys:%3 %4") 815 .arg(__FUNCTION__).arg(inputid).arg(type).arg(delsys).arg(delsys.toString())); 816 break; 817 } 818 819 // If we changed the tunertype to match the modulation system 820 // then we need to setup the tuner for this 821 SetDeliverySystem(inputid, delsys); 822 } 823 824 QString subtype; 825 if (DTVTunerType::kTunerTypeUnknown != tunertype) 826 { 827 subtype = tunertype.toString(); 828 } 829 else 830 { 831 subtype = ProbeDVBType(device); 832 } 833 834 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil::%1[%2]: delsys:%3 %4 tunertype:%5 %6 subtype:%7") 835 .arg(__FUNCTION__).arg(inputid).arg(delsys).arg(delsys.toString()) 836 .arg(tunertype).arg(tunertype.toString()).arg(subtype)); 837 838 return subtype; 734 839 } 735 840 736 841 /// \brief Returns true iff the input_type is one of the DVB types. … … bool CardUtil::IsDVBInputType(const QString &inputType) 741 846 (t == "OFDM") || (t == "ATSC") || (t == "DVB_S2"); 742 847 } 743 848 849 int CardUtil::SetDeliverySystem(uint inputid, DTVModulationSystem delsys) 850 { 851 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil::%1[%2]: delsys:%3 %4") 852 .arg(__FUNCTION__).arg(inputid).arg(delsys).arg(delsys.toString())); 853 854 int ret = -1; 855 #ifdef USING_DVB 856 #if DVB_API_VERSION >=5 857 QString device = GetVideoDevice(inputid); 858 859 if (device.isEmpty()) 860 return ret; 861 862 QString dvbdev = CardUtil::GetDeviceName(DVB_DEV_FRONTEND, device); 863 QByteArray dev = dvbdev.toLatin1(); 864 int fd_frontend = open(dev.constData(), O_RDWR | O_NONBLOCK); 865 if (fd_frontend < 0) 866 { 867 LOG(VB_GENERAL, LOG_ERR, LOC + 868 QString("open failed (%1)") 869 .arg(dvbdev) + ENO); 870 return errno; 871 } 872 873 ret = SetDeliverySystem(inputid, delsys, fd_frontend); 874 875 close(fd_frontend); 876 #endif // DVB_API_VERSION >=5 877 #endif // USING_DVB 878 879 return ret; 880 } 881 882 int CardUtil::SetDeliverySystem(uint inputid, int fd) 883 { 884 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil::%1[%2]: fd:%3") 885 .arg(__FUNCTION__).arg(inputid).arg(fd)); 886 887 int ret = -1; 888 #ifdef USING_DVB 889 #if DVB_API_VERSION >=5 890 891 // Get the selected delivery system from database table capturecard 892 QString delsys_db = GetDeliverySystem(inputid); 893 if (delsys_db.isEmpty()) 894 return ret; 895 896 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil::%1[%2]: delsys_db:%3") 897 .arg(__FUNCTION__).arg(inputid).arg(delsys_db)); 898 899 // Convert delivery system string to enum value and write to the card 900 DTVModulationSystem delsys; 901 if (delsys.Parse(delsys_db)) 902 { 903 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil::%1[%2]: delsys_db:%3 delsys:%4 %5") 904 .arg(__FUNCTION__).arg(inputid).arg(delsys_db).arg(delsys).arg(delsys.toString())); 905 906 ret = SetDeliverySystem(inputid, delsys, fd); 907 } 908 #endif // DVB_API_VERSION >=5 909 #endif // USING_DVB 910 911 return ret; 912 } 913 914 int CardUtil::SetDeliverySystem(uint inputid, DTVModulationSystem delsys, int fd) 915 { 916 LOG(VB_GENERAL, LOG_INFO, QString("CardUtil::%1[%2]: fd:%3 delsys:%4 %5") 917 .arg(__FUNCTION__).arg(inputid).arg(fd).arg(delsys).arg(delsys.toString())); 918 919 int ret = -1; 920 #ifdef USING_DVB 921 #if DVB_API_VERSION >=5 922 struct dtv_property prop; 923 struct dtv_properties cmd; 924 925 memset(&prop, 0, sizeof(prop)); 926 prop.cmd = DTV_DELIVERY_SYSTEM; 927 prop.u.data = delsys; 928 cmd.num = 1; 929 cmd.props = ∝ 930 931 ret = ioctl(fd, FE_SET_PROPERTY, &cmd); 932 if (ret < 0) 933 { 934 LOG(VB_GENERAL, LOG_ERR, LOC + 935 QString("FE_SET_PROPERTY ioctl failed (%1)") 936 .arg(inputid) + ENO); 937 return ret; 938 } 939 #endif // DVB_API_VERSION >=5 940 #endif // USING_DVB 941 942 return ret; 943 } 944 744 945 QString get_on_input(const QString &to_get, uint inputid) 745 946 { 746 947 MSqlQuery query(MSqlQuery::InitCon()); -
mythtv/libs/libmythtv/cardutil.h
diff --git a/mythtv/libs/libmythtv/cardutil.h b/mythtv/libs/libmythtv/cardutil.h index 1de3a3ac48..2681a6c798 100644
a b using namespace std; 14 14 15 15 // MythTV headers 16 16 #include "mythtvexp.h" 17 #include "dtvconfparserhelpers.h" 17 18 18 19 class InputInfo; 19 20 class CardInput; … … class MTV_PUBLIC CardUtil 275 276 { return get_on_input("audiodevice", inputid); } 276 277 static QString GetVBIDevice(uint inputid) 277 278 { return get_on_input("vbidevice", inputid); } 279 static QString GetDeliverySystem(uint inputid) 280 { return get_on_input("displayname", inputid); } // KdW TODO change to "deliverysystem" 278 281 279 282 static QString GetHostname(uint inputid) 280 283 { return get_on_input("hostname", inputid); } … … class MTV_PUBLIC CardUtil 372 375 { return "DVB" == GetRawInputType(inputid); } 373 376 static bool IsDVBInputType(const QString &input_type); 374 377 static QString ProbeDVBFrontendName(const QString &device); 378 static QStringList ProbeDeliverySystems(const QString &device); 375 379 static QString ProbeDVBType(const QString &device); 376 380 static bool HasDVBCRCBug(const QString &device); 377 381 static uint GetMinSignalMonitoringDelay(const QString &device); 378 382 static QString GetDeviceName(dvb_dev_type_t, const QString &device); 379 383 static InputNames GetConfiguredDVBInputs(const QString &device); 384 static int SetDeliverySystem(uint inputid, DTVModulationSystem delsys); 385 static int SetDeliverySystem(uint inputid, int fd); 386 static int SetDeliverySystem(uint inputid, DTVModulationSystem delsys, int fd); 380 387 381 388 // V4L info 382 389 static bool hasV4L2(int videofd); -
mythtv/libs/libmythtv/dtvconfparserhelpers.cpp
diff --git a/mythtv/libs/libmythtv/dtvconfparserhelpers.cpp b/mythtv/libs/libmythtv/dtvconfparserhelpers.cpp index 55af025dac..b34646db92 100644
a b const char *DTVPolarity::s_dbStr[DTVPolarity::kDBStrCnt] = 448 448 const DTVParamHelperStruct DTVModulationSystem::s_confTable[] = 449 449 { 450 450 { "SYS_UNDEFINED", kModulationSystem_UNDEFINED }, 451 { "SYS_DVBC_ANNEX_A C", kModulationSystem_DVBC_ANNEX_AC},451 { "SYS_DVBC_ANNEX_A", kModulationSystem_DVBC_ANNEX_A }, 452 452 { "SYS_DVBC_ANNEX_B", kModulationSystem_DVBC_ANNEX_B }, 453 453 { "SYS_DVBT", kModulationSystem_DVBT }, 454 454 { "SYS_DVBT2", kModulationSystem_DVBT2 }, … … const DTVParamHelperStruct DTVModulationSystem::s_vdrTable[] = 478 478 479 479 const DTVParamHelperStruct DTVModulationSystem::s_parseTable[] = 480 480 { 481 { "UNDEFINED", kModulationSystem_UNDEFINED },482 { "DVBC _AC", kModulationSystem_DVBC_ANNEX_AC},483 { "DVBC _B",kModulationSystem_DVBC_ANNEX_B },484 { "DVB -T",kModulationSystem_DVBT },485 { "D VB-T2", kModulationSystem_DVBT2},486 { "D SS", kModulationSystem_DSS},487 { "DVB -S", kModulationSystem_DVBS},488 { "DVB -S2", kModulationSystem_DVBS2},489 { " DVBH", kModulationSystem_DVBH},490 { "ISDB T", kModulationSystem_ISDBT},491 { "ISDB S", kModulationSystem_ISDBS},492 { " ISDBC", kModulationSystem_ISDBC},493 { "ATSC ", kModulationSystem_ATSC},494 { " ATSCMH", kModulationSystem_ATSCMH},495 { " DMBTH", kModulationSystem_DMBTH},496 { " CMMB", kModulationSystem_CMMB},497 { "D AB", kModulationSystem_DAB},498 { "TURBO", kModulationSystem_TURBO },499 { "DVBC _C",kModulationSystem_DVBC_ANNEX_C },500 { nullptr, kModulationSystem_UNDEFINED },481 { "UNDEFINED", kModulationSystem_UNDEFINED }, 482 { "DVBC/ANNEX_A", kModulationSystem_DVBC_ANNEX_A }, 483 { "DVBC/ANNEX_B", kModulationSystem_DVBC_ANNEX_B }, 484 { "DVBT", kModulationSystem_DVBT }, 485 { "DSS", kModulationSystem_DSS }, 486 { "DVBS", kModulationSystem_DVBS }, 487 { "DVBS2", kModulationSystem_DVBS2 }, 488 { "DVBH", kModulationSystem_DVBH }, 489 { "ISDBT", kModulationSystem_ISDBT }, 490 { "ISDBS", kModulationSystem_ISDBS }, 491 { "ISDBC", kModulationSystem_ISDBC }, 492 { "ATSC", kModulationSystem_ATSC }, 493 { "ATSCMH", kModulationSystem_ATSCMH }, 494 { "DMBTH", kModulationSystem_DMBTH }, 495 { "CMMB", kModulationSystem_CMMB }, 496 { "DAB", kModulationSystem_DAB }, 497 { "DVBT2", kModulationSystem_DVBT2 }, 498 { "TURBO", kModulationSystem_TURBO }, 499 { "DVBC/ANNEX_C", kModulationSystem_DVBC_ANNEX_C }, 500 { nullptr, kModulationSystem_UNDEFINED }, 501 501 }; 502 502 503 503 const char *DTVModulationSystem::s_dbStr[DTVModulationSystem::kDBStrCnt] = 504 504 { 505 "UNDEFINED", ///< kModulationSystem_UNDEFINED506 "DVBC AC", ///< kModulationSystem_DVBC_ANNEX_AC507 "DVBC _B",///< kModulationSystem_DVBC_ANNEX_B508 "DVB -T",///< kModulationSystem_DVBT509 "DSS", ///< kModulationSystem_DSS510 "DVB -S",///< kModulationSystem_DVBS511 "DVB -S2",///< kModulationSystem_DVBS2512 "DVBH", ///< kModulationSystem_DVBH513 "ISDBT", ///< kModulationSystem_ISDBT514 "ISDBS", ///< kModulationSystem_ISDBS515 "ISDBC", ///< kModulationSystem_ISDBC516 "ATSC", ///< kModulationSystem_ATSC517 "ATSCMH", ///< kModulationSystem_ATSCMH518 "DMBTH", ///< kModulationSystem_DMBTH519 "CMMB", ///< kModulationSystem_CMMB520 "DAB", ///< kModulationSystem_DAB521 "DVB -T2",///< kModulationSystem_DVBT2522 "TURBO", ///< kModulationSystem_TURBO523 "DVBC -C",///< kModulationSystem_DVBC_ANNEX_C505 "UNDEFINED", ///< kModulationSystem_UNDEFINED 506 "DVBC/ANNEX_A", ///< kModulationSystem_DVBC_ANNEX_A 507 "DVBC/ANNEX_B", ///< kModulationSystem_DVBC_ANNEX_B 508 "DVBT", ///< kModulationSystem_DVBT 509 "DSS", ///< kModulationSystem_DSS 510 "DVBS", ///< kModulationSystem_DVBS 511 "DVBS2", ///< kModulationSystem_DVBS2 512 "DVBH", ///< kModulationSystem_DVBH 513 "ISDBT", ///< kModulationSystem_ISDBT 514 "ISDBS", ///< kModulationSystem_ISDBS 515 "ISDBC", ///< kModulationSystem_ISDBC 516 "ATSC", ///< kModulationSystem_ATSC 517 "ATSCMH", ///< kModulationSystem_ATSCMH 518 "DMBTH", ///< kModulationSystem_DMBTH 519 "CMMB", ///< kModulationSystem_CMMB 520 "DAB", ///< kModulationSystem_DAB 521 "DVBT2", ///< kModulationSystem_DVBT2 522 "TURBO", ///< kModulationSystem_TURBO 523 "DVBC/ANNEX_C", ///< kModulationSystem_DVBC_ANNEX_C 524 524 }; 525 525 526 526 const DTVParamHelperStruct DTVRollOff::s_confTable[] = -
mythtv/libs/libmythtv/dtvconfparserhelpers.h
diff --git a/mythtv/libs/libmythtv/dtvconfparserhelpers.h b/mythtv/libs/libmythtv/dtvconfparserhelpers.h index 69111b98de..dd172f1a6c 100644
a b class DTVModulationSystem : public DTVParamHelper 593 593 { 594 594 // see fe_delivery_system in frontend.h 595 595 kModulationSystem_UNDEFINED, 596 kModulationSystem_DVBC_ANNEX_A C,596 kModulationSystem_DVBC_ANNEX_A, 597 597 kModulationSystem_DVBC_ANNEX_B, 598 598 kModulationSystem_DVBT, 599 599 kModulationSystem_DSS, -
mythtv/libs/libmythtv/recorders/dvbchannel.cpp
diff --git a/mythtv/libs/libmythtv/recorders/dvbchannel.cpp b/mythtv/libs/libmythtv/recorders/dvbchannel.cpp index 4cb8bed226..9757a7adee 100644
a b bool DVBChannel::Open(DVBChannel *who) 277 277 m_symbol_rate_minimum = info.symbol_rate_min; 278 278 m_symbol_rate_maximum = info.symbol_rate_max; 279 279 280 #if DVB_API_VERSION >=5281 unsigned int i;282 struct dtv_property prop;283 struct dtv_properties cmd;284 285 memset(&prop, 0, sizeof(prop));286 prop.cmd = DTV_API_VERSION;287 cmd.num = 1;288 cmd.props = ∝289 if (ioctl(m_fd_frontend, FE_GET_PROPERTY, &cmd) == 0)290 {291 LOG(VB_RECORD, LOG_INFO, LOC +292 QString("dvb api version %1.%2").arg((prop.u.data>>8)&0xff).arg((prop.u.data)&0xff));293 }294 295 memset(&prop, 0, sizeof(prop));296 prop.cmd = DTV_ENUM_DELSYS;297 cmd.num = 1;298 cmd.props = ∝299 300 if (ioctl(m_fd_frontend, FE_GET_PROPERTY, &cmd) == 0)301 {302 LOG(VB_RECORD, LOG_DEBUG, LOC +303 QString("num props %1").arg(prop.u.buffer.len));304 for (i = 0; i < prop.u.buffer.len; i++)305 {306 LOG(VB_RECORD, LOG_INFO, LOC +307 QString("delsys %1: %2 %3")308 .arg(i).arg(prop.u.buffer.data[i])309 .arg(DTVModulationSystem::toString(prop.u.buffer.data[i])));310 switch (prop.u.buffer.data[i])311 {312 // TODO: not supported. you can have DVBC and DVBT on the same card313 // The following are backwards compatible so its ok314 case SYS_DVBS2:315 m_tunerType = DTVTunerType::kTunerTypeDVBS2;316 break;317 case SYS_DVBT2:318 m_tunerType = DTVTunerType::kTunerTypeDVBT2;319 break;320 default:321 break;322 }323 }324 }325 #endif326 327 280 LOG(VB_RECORD, LOG_INFO, LOC + 328 281 QString("Using DVB card %1, with frontend '%2'.") 329 282 .arg(m_device).arg(m_frontend_name)); 330 283 284 #if DVB_API_VERSION >=5 285 CardUtil::SetDeliverySystem(m_inputid, m_fd_frontend); 286 #endif 287 331 288 // Turn on the power to the LNB 332 289 if (m_tunerType.IsDiSEqCSupported()) 333 290 { -
mythtv/libs/libmythtv/videosource.cpp
diff --git a/mythtv/libs/libmythtv/videosource.cpp b/mythtv/libs/libmythtv/videosource.cpp index 826bd657cf..209f032343 100644
a b class DVBCardNum : public CaptureCardComboBoxSetting 1031 1031 } 1032 1032 }; 1033 1033 1034 class DVBCardType : public GroupSetting 1034 // KdW change DVBCardType from subtype to delivery system 1035 // 1036 // NOTE: use field capturecard/displayname to store the delivery system selection in the database 1037 // TODO replace displayname with deliverysystem when that field has been added to table capturecard 1038 // Changed GroupSetting into CaptureCardComboBoxSetting 1039 // 1040 class DVBCardType : public CaptureCardComboBoxSetting // KdW was: public GroupSetting 1035 1041 { 1036 1042 public: 1037 DVBCardType() 1043 explicit DVBCardType(const CaptureCard &parent) : 1044 CaptureCardComboBoxSetting(parent, false, "displayname") // KdW false means no "New entry" 1038 1045 { 1039 setLabel(QObject::tr("Subtype")); 1040 setEnabled(false); 1046 setLabel(QObject::tr("Delivery system")); // KdW was: Subtype 1047 setHelpText( 1048 QObject::tr("If your card supports more than one delivery system " 1049 "then you can select here the one that you want to use.")); 1050 1051 // setEnabled(false); 1041 1052 }; 1042 1053 }; 1043 1054 … … void DVBConfigurationGroup::probeCard(const QString &videodevice) 3710 3721 default: 3711 3722 break; 3712 3723 } 3724 3725 // Create selection list of all delivery systems 3726 switch (CardUtil::toInputType(subtype)) 3727 { 3728 case CardUtil::QAM: 3729 case CardUtil::DVBT2: 3730 case CardUtil::OFDM: 3731 { 3732 QStringList delsys = CardUtil::ProbeDeliverySystems(videodevice); 3733 QStringList::iterator it = delsys.begin(); 3734 m_cardType->clearSelections(); 3735 if (it != delsys.end()) 3736 { 3737 m_cardType->setValue(*it); 3738 } 3739 for (; it != delsys.end(); it++) 3740 { 3741 LOG(VB_GENERAL, LOG_INFO, QString("DVBCardType::%1: add deliverysystem:%2") 3742 .arg(__FUNCTION__).arg(*it)); 3743 3744 m_cardType->addSelection(*it, *it); 3745 } 3746 } 3747 break; 3748 default: 3749 break; 3750 } 3751 # 3713 3752 #else 3714 3753 m_cardType->setValue(QString("Recompile with DVB-Support!")); 3715 3754 #endif … … DVBConfigurationGroup::DVBConfigurationGroup(CaptureCard& a_parent, 3759 3798 3760 3799 m_cardNum = new DVBCardNum(m_parent); 3761 3800 m_cardName = new DVBCardName(); 3762 m_cardType = new DVBCardType( );3801 m_cardType = new DVBCardType(m_parent); 3763 3802 3764 3803 m_signalTimeout = new SignalTimeout(m_parent, 500, 250); 3765 3804 m_channelTimeout = new ChannelTimeout(m_parent, 3000, 1750);