From d9f75b45d9327f16518a77b7eb1c7f6802e8420a Mon Sep 17 00:00:00 2001 From: TangoCash Date: Sun, 17 Jan 2021 18:15:02 +0100 Subject: [PATCH] fix DVB-T2 --- src/gui/scan.cpp | 2 -- src/gui/scan_setup.cpp | 4 ++-- src/zapit/src/frontend.cpp | 1 + src/zapit/src/getservices.cpp | 4 ---- src/zapit/src/scannit.cpp | 2 -- src/zapit/src/transponder.cpp | 33 --------------------------------- 6 files changed, 3 insertions(+), 43 deletions(-) diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 9690f2e4b..255c48358 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -260,8 +260,6 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) TP.feparams.hierarchy = (fe_hierarchy_t)scansettings.terrestrial_TP_hierarchy; TP.feparams.delsys = (delivery_system_t)scansettings.terrestrial_TP_delsys; TP.feparams.plp_id = (unsigned int)atoi(scansettings.terrestrial_TP_pli.c_str()); - if (TP.feparams.plp_id == 0) - TP.feparams.plp_id = NO_STREAM_ID_FILTER; } else if (CFrontend::isCable(delsys)) { TP.feparams.frequency = atoi(scansettings.cable_TP_freq.c_str()); TP.feparams.symbol_rate = atoi(scansettings.cable_TP_rate.c_str()); diff --git a/src/gui/scan_setup.cpp b/src/gui/scan_setup.cpp index cb996c996..d116396be 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -2033,7 +2033,7 @@ void CScanSetup::updateManualSettings() scansettings.terrestrial_TP_transmit_mode = tI->second.feparams.transmission_mode; scansettings.terrestrial_TP_coderate_HP = tI->second.feparams.code_rate_HP; scansettings.terrestrial_TP_coderate_LP = tI->second.feparams.code_rate_LP; - scansettings.terrestrial_TP_pli = (tI->second.feparams.plp_id == NO_STREAM_ID_FILTER ? "0" : to_string(tI->second.feparams.plp_id)); + scansettings.terrestrial_TP_pli = to_string(tI->second.feparams.plp_id); scansettings.terrestrialName = CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()); } @@ -2158,7 +2158,7 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &actionkey) scansettings.terrestrial_TP_transmit_mode = tmpI->second.feparams.transmission_mode; scansettings.terrestrial_TP_coderate_HP = tmpI->second.feparams.code_rate_HP; scansettings.terrestrial_TP_coderate_LP = tmpI->second.feparams.code_rate_LP; - scansettings.terrestrial_TP_pli = (tmpI->second.feparams.plp_id == NO_STREAM_ID_FILTER ? "0" : to_string(tmpI->second.feparams.plp_id)); + scansettings.terrestrial_TP_pli = to_string(tmpI->second.feparams.plp_id); //scansettings.terrestrialName = CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()); } } diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index 4dc3ea30a..329df8576 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -1567,6 +1567,7 @@ int CFrontend::setFrontend(const FrontendParameters *feparams, bool nowait) #elif defined DTV_DVBT2_PLP_ID p[cmdseq.num].cmd = DTV_DVBT2_PLP_ID, p[cmdseq.num].u.data = feparams->plp_id, cmdseq.num++; #endif + INFO("[fe%d/%d] streamid (%d/%d/%d)\n", adapter, fenumber, feparams->plp_id, feparams->pls_code, feparams->pls_mode ); } break; default: diff --git a/src/zapit/src/getservices.cpp b/src/zapit/src/getservices.cpp index 57347a5eb..d91e7cf71 100644 --- a/src/zapit/src/getservices.cpp +++ b/src/zapit/src/getservices.cpp @@ -453,8 +453,6 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa feparams.guard_interval = (fe_guard_interval_t) xmlGetNumericAttribute(node, "gi", 0); feparams.hierarchy = (fe_hierarchy_t) xmlGetNumericAttribute(node, "hi", 0); feparams.plp_id = (unsigned int) xmlGetNumericAttribute(node, "pli", 0); - if (feparams.plp_id == 0) - feparams.plp_id = NO_STREAM_ID_FILTER; if (feparams.frequency < 1000*1000) feparams.frequency = feparams.frequency*1000; @@ -806,8 +804,6 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr xmlGetNumericAttribute(tps, "hierarchy", 0); feparams.plp_id = (unsigned int) xmlGetNumericAttribute(tps, "plp_id", 0); - if (feparams.plp_id == 0) - feparams.plp_id = NO_STREAM_ID_FILTER; if (feparams.frequency < 1000*1000) feparams.frequency *= 1000; diff --git a/src/zapit/src/scannit.cpp b/src/zapit/src/scannit.cpp index 28c486014..9aab97ff1 100644 --- a/src/zapit/src/scannit.cpp +++ b/src/zapit/src/scannit.cpp @@ -459,8 +459,6 @@ bool CNit::ParseTerrestrial2Descriptor(T2DeliverySystemDescriptor * sd, Transpor feparams.delsys = DVB_T2; feparams.inversion = INVERSION_AUTO; feparams.plp_id = (unsigned int)sd->getPlpId(); - if (feparams.plp_id == 0) - feparams.plp_id = NO_STREAM_ID_FILTER; feparams.code_rate_HP = CFrontend::getCodeRate(FEC_AUTO, DVB_T2); feparams.code_rate_LP = CFrontend::getCodeRate(FEC_AUTO, DVB_T2); feparams.modulation = CFrontend::getConstellation(QAM_AUTO); diff --git a/src/zapit/src/transponder.cpp b/src/zapit/src/transponder.cpp index f8db756c4..88598b7f9 100644 --- a/src/zapit/src/transponder.cpp +++ b/src/zapit/src/transponder.cpp @@ -162,23 +162,6 @@ void transponder::dumpServiceXml(FILE * fd) CFrontend::getXMLDeliverySystem(getFEParams()->delsys)); } } else if (CFrontend::isTerr(feparams.delsys)) { - if (getFEParams()->plp_id == NO_STREAM_ID_FILTER) - { - fprintf(fd, "\t\t\n", - transport_stream_id, original_network_id, - getFEParams()->frequency, - getFEParams()->inversion, - getFEParams()->bandwidth, - getFEParams()->code_rate_HP, - getFEParams()->code_rate_LP, - getFEParams()->modulation, - getFEParams()->transmission_mode, - getFEParams()->guard_interval, - getFEParams()->hierarchy, - CFrontend::getXMLDeliverySystem(getFEParams()->delsys)); - } - else - { fprintf(fd, "\t\t\n", transport_stream_id, original_network_id, getFEParams()->frequency, @@ -192,7 +175,6 @@ void transponder::dumpServiceXml(FILE * fd) getFEParams()->hierarchy, getFEParams()->plp_id, CFrontend::getXMLDeliverySystem(getFEParams()->delsys)); - } } } @@ -233,20 +215,6 @@ void transponder::dump(std::string label) getFEParams()->delsys); } } else if (CFrontend::isTerr(feparams.delsys)) { - if (getFEParams()->plp_id == NO_STREAM_ID_FILTER) - { - printf("%s tp-id %016" PRIx64 " freq %d bw %d coderate_HP %d coderate_LP %d const %d guard %d sys %d\n", label.c_str(), - transponder_id, - getFEParams()->frequency, - getFEParams()->bandwidth, - getFEParams()->code_rate_HP, - getFEParams()->code_rate_LP, - getFEParams()->modulation, - getFEParams()->guard_interval, - getFEParams()->delsys); - } - else - { printf("%s tp-id %016" PRIx64 " freq %d bw %d coderate_HP %d coderate_LP %d const %d guard %d pli %u sys %d\n", label.c_str(), transponder_id, getFEParams()->frequency, @@ -257,7 +225,6 @@ void transponder::dump(std::string label) getFEParams()->guard_interval, getFEParams()->plp_id, getFEParams()->delsys); - } } }