diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index 59b9c4036..ca8562edc 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -450,7 +450,10 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) if (CFrontend::isSat(feparams->delsys)) { CFrontend::getDelSys(feparams->delsys, feparams->fec_inner, feparams->modulation, f, s, m); - snprintf(buffer,sizeof(buffer), "%u %c %d %s %s %s (%d/%d/%s) ", freq, transponder::pol(feparams->polarization), feparams->symbol_rate/1000, f, s, m, feparams->plp_id, feparams->pls_code, transponder::getPLSMode(feparams->pls_mode).c_str()); + if (feparams->plp_id == NO_STREAM_ID_FILTER) + snprintf(buffer,sizeof(buffer), "%u %c %d %s %s %s ", freq, transponder::pol(feparams->polarization), feparams->symbol_rate/1000, f, s, m); + else + snprintf(buffer,sizeof(buffer), "%u %c %d %s %s %s (%u/%s/%s) ", freq, transponder::pol(feparams->polarization), feparams->symbol_rate/1000, f, s, m, feparams->plp_id, transponder::getPLSCode(feparams->pls_code).c_str(), transponder::getPLSMode(feparams->pls_mode).c_str()); } else if (CFrontend::isCable(feparams->delsys)) { @@ -461,7 +464,10 @@ neutrino_msg_t CScanTs::handleMsg(neutrino_msg_t msg, neutrino_msg_data_t data) { CFrontend::getDelSys(feparams->delsys, feparams->code_rate_HP, feparams->modulation, f, s, m); CFrontend::getDelSys(feparams->delsys, feparams->code_rate_LP, feparams->modulation, f2, s, m); - snprintf(buffer,sizeof(buffer), "%u %d %s %s %s %d ", freq, CFrontend::getFEBandwidth(feparams->bandwidth)/1000, f, f2, m, feparams->plp_id); + if (feparams->plp_id == NO_STREAM_ID_FILTER) + snprintf(buffer,sizeof(buffer), "%u %d %s %s %s ", freq, CFrontend::getFEBandwidth(feparams->bandwidth)/1000, f, f2, m); + else + snprintf(buffer,sizeof(buffer), "%u %d %s %s %s %u ", freq, CFrontend::getFEBandwidth(feparams->bandwidth)/1000, f, f2, m, feparams->plp_id); } paintLine(xpos2, ypos_frequency, (ypos_frequency > ypos_radar + 66) ? w : w_to_radar, buffer); } diff --git a/src/zapit/include/zapit/transponder.h b/src/zapit/include/zapit/transponder.h index e76181c3b..5dd224cb6 100644 --- a/src/zapit/include/zapit/transponder.h +++ b/src/zapit/include/zapit/transponder.h @@ -49,6 +49,7 @@ public: static char pol(unsigned char pol); std::string description(void); static std::string getPLSMode(const uint8_t pls_mode); + static std::string getPLSCode(const uint32_t pls_code); delivery_system_t getDelSys(void) { return feparams.delsys; } t_transport_stream_id getTransportStreamId(void) { return transport_stream_id; } diff --git a/src/zapit/src/scannit.cpp b/src/zapit/src/scannit.cpp index df846a258..28c486014 100644 --- a/src/zapit/src/scannit.cpp +++ b/src/zapit/src/scannit.cpp @@ -333,9 +333,9 @@ bool CNit::ParseSatelliteDescriptor(SatelliteDeliverySystemDescriptor * sd, Tran memset(&feparams, 0, sizeof(feparams)); feparams.polarization = sd->getPolarization(); feparams.pilot = ZPILOT_AUTO; - feparams.plp_id = 0; - feparams.pls_code = 1; - feparams.pls_mode = PLS_Root; + feparams.plp_id = NO_STREAM_ID_FILTER; + feparams.pls_code = PLS_Default_Gold_Code; + feparams.pls_mode = PLS_Gold; switch (modulation_system) { case 0: // DVB-S @@ -458,7 +458,9 @@ bool CNit::ParseTerrestrial2Descriptor(T2DeliverySystemDescriptor * sd, Transpor feparams.delsys = DVB_T2; feparams.inversion = INVERSION_AUTO; - feparams.plp_id = sd->getPlpId(); + 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 1fde68857..f8db756c4 100644 --- a/src/zapit/src/transponder.cpp +++ b/src/zapit/src/transponder.cpp @@ -134,6 +134,20 @@ void transponder::dumpServiceXml(FILE * fd) getFEParams()->modulation, CFrontend::getXMLDeliverySystem(getFEParams()->delsys)); } else if (CFrontend::isSat(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()->symbol_rate, + getFEParams()->fec_inner, + getFEParams()->polarization, + getFEParams()->modulation, + CFrontend::getXMLDeliverySystem(getFEParams()->delsys)); + } + else + { fprintf(fd, "\t\t\n", transport_stream_id, original_network_id, getFEParams()->frequency, @@ -146,7 +160,25 @@ void transponder::dumpServiceXml(FILE * fd) getFEParams()->pls_code, getFEParams()->pls_mode, 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, @@ -160,6 +192,7 @@ void transponder::dumpServiceXml(FILE * fd) getFEParams()->hierarchy, getFEParams()->plp_id, CFrontend::getXMLDeliverySystem(getFEParams()->delsys)); + } } } @@ -174,7 +207,9 @@ void transponder::dump(std::string label) getFEParams()->modulation, getFEParams()->delsys); } else if (CFrontend::isSat(feparams.delsys)) { - printf("%s tp-id %016" PRIx64 " freq %d rate %d fec %d pol %d mod %d sys %d\n", label.c_str(), + if (getFEParams()->plp_id == NO_STREAM_ID_FILTER) + { + printf("%s tp-id %016" PRIx64 " freq %d rate %d fec %d pol %d mod %d sys %d\n", label.c_str(), transponder_id, getFEParams()->frequency, getFEParams()->symbol_rate, @@ -182,8 +217,37 @@ void transponder::dump(std::string label) getFEParams()->polarization, getFEParams()->modulation, getFEParams()->delsys); + } + else + { + printf("%s tp-id %016" PRIx64 " freq %d rate %d fec %d pol %d mod %d pli %u plc %u plm %u sys %d\n", label.c_str(), + transponder_id, + getFEParams()->frequency, + getFEParams()->symbol_rate, + getFEParams()->fec_inner, + getFEParams()->polarization, + getFEParams()->modulation, + getFEParams()->plp_id, + getFEParams()->pls_code, + getFEParams()->pls_mode, + getFEParams()->delsys); + } } else if (CFrontend::isTerr(feparams.delsys)) { - printf("%s tp-id %016" PRIx64 " freq %d bw %d coderate_HP %d coderate_LP %d const %d guard %d pli %d delsys %d\n", label.c_str(), + 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, getFEParams()->bandwidth, @@ -193,6 +257,7 @@ void transponder::dump(std::string label) getFEParams()->guard_interval, getFEParams()->plp_id, getFEParams()->delsys); + } } } @@ -224,14 +289,20 @@ std::string transponder::description() if (CFrontend::isSat(feparams.delsys)) { CFrontend::getDelSys(feparams.delsys, getFEParams()->fec_inner, getFEParams()->modulation, f, s, m); - snprintf(buf, sizeof(buf), "%d %c %d %s %s %s (%d/%d/%s)", getFEParams()->frequency/1000, pol(getFEParams()->polarization), getFEParams()->symbol_rate/1000, f, s, m, getFEParams()->plp_id, getFEParams()->pls_code, getPLSMode(getFEParams()->pls_mode).c_str()); + if (getFEParams()->plp_id == NO_STREAM_ID_FILTER) + snprintf(buf, sizeof(buf), "%d %c %d %s %s %s", getFEParams()->frequency/1000, pol(getFEParams()->polarization), getFEParams()->symbol_rate/1000, f, s, m); + else + snprintf(buf, sizeof(buf), "%d %c %d %s %s %s (%u/%s/%s)", getFEParams()->frequency/1000, pol(getFEParams()->polarization), getFEParams()->symbol_rate/1000, f, s, m, getFEParams()->plp_id, getPLSCode(getFEParams()->pls_code).c_str(), getPLSMode(getFEParams()->pls_mode).c_str()); } else if (CFrontend::isCable(feparams.delsys)) { CFrontend::getDelSys(feparams.delsys, getFEParams()->fec_inner, getFEParams()->modulation, f, s, m); snprintf(buf, sizeof(buf), "%d %d %s %s %s ", getFEParams()->frequency/1000, getFEParams()->symbol_rate/1000, f, s, m); } else if (CFrontend::isTerr(feparams.delsys)) { CFrontend::getDelSys(feparams.delsys, getFEParams()->code_rate_HP, getFEParams()->modulation, f, s, m); CFrontend::getDelSys(feparams.delsys, getFEParams()->code_rate_LP, getFEParams()->modulation, f2, s, m); - snprintf(buf, sizeof(buf), "%d %d %s %s %s %d ", getFEParams()->frequency/1000, CFrontend::getFEBandwidth(getFEParams()->bandwidth)/1000, f, f2, m, getFEParams()->plp_id); + if (getFEParams()->plp_id == NO_STREAM_ID_FILTER) + snprintf(buf, sizeof(buf), "%d %d %s %s %s ", getFEParams()->frequency/1000, CFrontend::getFEBandwidth(getFEParams()->bandwidth)/1000, f, f2, m); + else + snprintf(buf, sizeof(buf), "%d %d %s %s %s %u ", getFEParams()->frequency/1000, CFrontend::getFEBandwidth(getFEParams()->bandwidth)/1000, f, f2, m, getFEParams()->plp_id); } return std::string(buf); @@ -252,3 +323,15 @@ std::string transponder::getPLSMode(const uint8_t pls_mode) return "Root"; } } + +std::string transponder::getPLSCode(const uint32_t pls_code) +{ + switch (pls_code) { + case 0x00: + return "Default_Gold_Code"; + case 0x01: + return "Default_Root_Code"; + default: + return "Default_Gold_Code"; + } +}