From 4e65f22bdf994f1c1fef1f7c9b04a538fd26d7bf Mon Sep 17 00:00:00 2001 From: TangoCash Date: Mon, 4 Dec 2017 09:46:04 +0100 Subject: [PATCH] add DVB-S2X support --- data/locale/deutsch.locale | 7 +++++ data/locale/english.locale | 7 +++++ src/gui/scan.cpp | 4 +++ src/gui/scan_setup.cpp | 34 ++++++++++++++++++++++++ src/system/locals.h | 7 +++++ src/system/locals_intern.h | 7 +++++ src/system/settings.cpp | 8 ++++++ src/system/settings.h | 4 +++ src/zapit/include/zapit/frontend_c.h | 2 ++ src/zapit/include/zapit/frontend_types.h | 11 +++++++- src/zapit/src/frontend.cpp | 30 ++++++++++++++++++--- src/zapit/src/getservices.cpp | 14 ++++++++++ src/zapit/src/transponder.cpp | 15 ++++++++--- 13 files changed, 142 insertions(+), 8 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index e893c24e9..fce9fbe63 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -536,6 +536,13 @@ extra.tp_mod_auto QAM/AUTO extra.tp_pilot Pilot extra.tp_pilot_auto Auto (HW) extra.tp_pilot_auto_sw Auto (SW) +extra.tp_plc PLM Code +extra.tp_pli Stream ID +extra.tp_plm PLS Modus +extra.tp_plm_combo Combo +extra.tp_plm_gold Gold +extra.tp_plm_root Root (Standard) +extra.tp_plm_unk Unbekannt extra.tp_pol Polarisation extra.tp_pol_h H extra.tp_pol_l L diff --git a/data/locale/english.locale b/data/locale/english.locale index 094a43057..938c2d9da 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -536,6 +536,13 @@ extra.tp_mod_auto QAM/AUTO extra.tp_pilot Pilot extra.tp_pilot_auto Auto (HW) extra.tp_pilot_auto_sw Auto (SW) +extra.tp_plc PLM Code +extra.tp_pli Stream ID +extra.tp_plm PLS Mode +extra.tp_plm_combo Combo +extra.tp_plm_gold Gold +extra.tp_plm_root Root (Default) +extra.tp_plm_unk Unknown extra.tp_pol Polarization extra.tp_pol_h H extra.tp_pol_l L diff --git a/src/gui/scan.cpp b/src/gui/scan.cpp index e679b4ba0..2dbaa6f16 100644 --- a/src/gui/scan.cpp +++ b/src/gui/scan.cpp @@ -233,6 +233,9 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) TP.feparams.delsys = (delivery_system_t)scansettings.sat_TP_delsys; TP.feparams.modulation = (fe_modulation_t) scansettings.sat_TP_mod; TP.feparams.pilot = (zapit_pilot_t) scansettings.sat_TP_pilot; + TP.feparams.plp_id = atoi(scansettings.sat_TP_pli.c_str()); + TP.feparams.pls_code = atoi(scansettings.sat_TP_plc.c_str()); + TP.feparams.pls_mode = (fe_pls_mode_t) scansettings.sat_TP_plm; } else if (CFrontend::isTerr(delsys)) { /* DVB-T. TODO: proper menu and parameter setup, not all "AUTO" */ TP.feparams.frequency = atoi(scansettings.terrestrial_TP_freq.c_str()); @@ -248,6 +251,7 @@ int CScanTs::exec(CMenuTarget* /*parent*/, const std::string & actionKey) TP.feparams.guard_interval = (fe_guard_interval_t)scansettings.terrestrial_TP_guard; TP.feparams.hierarchy = (fe_hierarchy_t)scansettings.terrestrial_TP_hierarchy; TP.feparams.delsys = (delivery_system_t)scansettings.terrestrial_TP_delsys; + TP.feparams.plp_id = atoi(scansettings.terrestrial_TP_pli.c_str()); } 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 373b6dbac..f2bafaa27 100644 --- a/src/gui/scan_setup.cpp +++ b/src/gui/scan_setup.cpp @@ -349,6 +349,15 @@ const CMenuOptionChooser::keyval FRONTEND_FORCE_MODE[FRONTEND_FORCE_MODE_COUNT] { 2, LOCALE_TUNERSETUP_TERR } }; +#define SATSETUP_SCANTP_PLM_COUNT 4 +const CMenuOptionChooser::keyval SATSETUP_SCANTP_PLM[SATSETUP_SCANTP_PLM_COUNT] = +{ + { 0, LOCALE_EXTRA_TP_PLM_ROOT }, + { 1, LOCALE_EXTRA_TP_PLM_GOLD }, + { 2, LOCALE_EXTRA_TP_PLM_COMBO }, + { 3, LOCALE_EXTRA_TP_PLM_UNK } +}; + CScanSetup::CScanSetup(int wizard_mode) { width = 40; @@ -1681,6 +1690,9 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc CMenuForwarder *Freq = NULL; CMenuForwarder *Rate = NULL; CMenuOptionChooser *pilot = NULL; + CMenuForwarder *Pli = NULL; + CMenuForwarder *Plc = NULL; + CMenuOptionChooser *Plm = NULL; if (r_system == ALL_SAT) { delsys = new CMenuOptionChooser(LOCALE_EXTRA_TP_DELSYS, (int *)&scansettings.sat_TP_delsys, SATSETUP_SCANTP_DELSYS, SATSETUP_SCANTP_DELSYS_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++), "", true); delsys->setHint("", LOCALE_MENU_HINT_SCAN_DELSYS); @@ -1698,6 +1710,11 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc pol->setHint("", LOCALE_MENU_HINT_SCAN_POL); pilot = new CMenuOptionChooser(LOCALE_EXTRA_TP_PILOT, (int *)&scansettings.sat_TP_pilot, SATSETUP_SCANTP_PILOT, SATSETUP_SCANTP_PILOT_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); pilot->setHint("", LOCALE_MENU_HINT_SCAN_PILOT); + CStringInput *pli = new CStringInput(LOCALE_EXTRA_TP_PLI, &scansettings.sat_TP_pli, 1, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789"); + Pli = new CMenuDForwarder(LOCALE_EXTRA_TP_PLI, true, scansettings.sat_TP_pli, pli, "", CRCInput::convertDigitToKey(shortCut++)); + CStringInput *plc = new CStringInput(LOCALE_EXTRA_TP_PLC, &scansettings.sat_TP_plc, 6, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789"); + Plc = new CMenuDForwarder(LOCALE_EXTRA_TP_PLC, true, scansettings.sat_TP_plc, plc, "", CRCInput::convertDigitToKey(shortCut++)); + Plm = new CMenuOptionChooser(LOCALE_EXTRA_TP_PLM, (int *)&scansettings.sat_TP_plm, SATSETUP_SCANTP_PLM, SATSETUP_SCANTP_PLM_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); } else if (r_system == ALL_CABLE) { delsys = new CMenuOptionChooser(LOCALE_EXTRA_TP_DELSYS, (int *)&scansettings.cable_TP_delsys, CABLESETUP_SCANTP_DELSYS, CABLESETUP_SCANTP_DELSYS_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++), "", true); delsys->setHint("", LOCALE_MENU_HINT_SCAN_DELSYS); @@ -1730,6 +1747,8 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc coderateLP->setHint("", LOCALE_MENU_HINT_SCAN_FEC); tm = new CMenuOptionChooser(LOCALE_EXTRA_TP_TRANSMIT_MODE, (int *)&scansettings.terrestrial_TP_transmit_mode, TERRSETUP_SCANTP_TRANSMIT_MODE, TERRSETUP_SCANTP_TRANSMIT_MODE_COUNT, true, NULL, CRCInput::convertDigitToKey(shortCut++)); tm->setHint("", LOCALE_MENU_HINT_SCAN_TRANSMIT_MODE); + CStringInput *pli = new CStringInput(LOCALE_EXTRA_TP_PLI, &scansettings.terrestrial_TP_pli, 1, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789"); + Pli = new CMenuDForwarder(LOCALE_EXTRA_TP_PLI, true, scansettings.terrestrial_TP_pli, pli, "", CRCInput::convertDigitToKey(shortCut++)); } if (delsys) @@ -1759,6 +1778,13 @@ int CScanSetup::addScanOptionsItems(CMenuWidget *options_menu, const int &shortc if (pilot) options_menu->addItem(pilot); + if (Pli) + options_menu->addItem(Pli); + if (Plc) + options_menu->addItem(Plc); + if (Plm) + options_menu->addItem(Plm); + return shortCut; } @@ -1945,6 +1971,9 @@ void CScanSetup::updateManualSettings() scansettings.sat_TP_delsys = tI->second.feparams.delsys; scansettings.sat_TP_mod = tI->second.feparams.modulation; scansettings.satName = CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()); + scansettings.sat_TP_pli = to_string(tI->second.feparams.plp_id); + scansettings.sat_TP_plc = to_string(tI->second.feparams.pls_code); + scansettings.sat_TP_plm = tI->second.feparams.pls_mode; } else if (CFrontend::isCable(tI->second.feparams.delsys)) { scansettings.cable_TP_freq = to_string(tI->second.feparams.frequency); scansettings.cable_TP_rate = to_string(tI->second.feparams.symbol_rate); @@ -1961,6 +1990,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 = to_string(tI->second.feparams.plp_id); scansettings.terrestrialName = CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()); } @@ -2053,6 +2083,9 @@ int CTPSelectHandler::exec(CMenuTarget* parent, const std::string &actionkey) scansettings.sat_TP_delsys = tmpI->second.feparams.delsys; scansettings.sat_TP_mod = tmpI->second.feparams.modulation; scansettings.sat_TP_pilot = tmpI->second.feparams.pilot; + scansettings.sat_TP_pli = to_string(tmpI->second.feparams.plp_id); + scansettings.sat_TP_plc = to_string(tmpI->second.feparams.pls_code); + scansettings.sat_TP_plm = tmpI->second.feparams.pls_mode; } else if (CFrontend::isCable(tmpI->second.feparams.delsys)) { scansettings.cable_TP_freq = to_string(tmpI->second.feparams.frequency); @@ -2069,6 +2102,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 = to_string(tmpI->second.feparams.plp_id); //scansettings.terrestrialName = CServiceManager::getInstance()->GetSatelliteName(channel->getSatellitePosition()); } } diff --git a/src/system/locals.h b/src/system/locals.h index 1648baea4..d1260c9ef 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -563,6 +563,13 @@ typedef enum LOCALE_EXTRA_TP_PILOT, LOCALE_EXTRA_TP_PILOT_AUTO, LOCALE_EXTRA_TP_PILOT_AUTO_SW, + LOCALE_EXTRA_TP_PLC, + LOCALE_EXTRA_TP_PLI, + LOCALE_EXTRA_TP_PLM, + LOCALE_EXTRA_TP_PLM_COMBO, + LOCALE_EXTRA_TP_PLM_GOLD, + LOCALE_EXTRA_TP_PLM_ROOT, + LOCALE_EXTRA_TP_PLM_UNK, LOCALE_EXTRA_TP_POL, LOCALE_EXTRA_TP_POL_H, LOCALE_EXTRA_TP_POL_L, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index b187b33f2..61003a67d 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -563,6 +563,13 @@ const char * locale_real_names[] = "extra.tp_pilot", "extra.tp_pilot_auto", "extra.tp_pilot_auto_sw", + "extra.tp_plc", + "extra.tp_pli", + "extra.tp_plm", + "extra.tp_plm_combo", + "extra.tp_plm_gold", + "extra.tp_plm_root", + "extra.tp_plm_unk", "extra.tp_pol", "extra.tp_pol_h", "extra.tp_pol_l", diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 8546a2f8c..7e289071f 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -146,6 +146,9 @@ bool CScanSettings::loadSettings(const char * const fileName) sat_TP_mod = configfile.getInt32("sat_TP_mod", QPSK); sat_TP_delsys = configfile.getInt32("sat_TP_delsys", DVB_S); sat_TP_pilot = configfile.getInt32("sat_TP_pilot", ZPILOT_AUTO_SW); + sat_TP_pli = configfile.getString("sat_TP_pli", "0"); + sat_TP_plc = configfile.getString("sat_TP_plc", "1"); + sat_TP_plm = configfile.getInt32("sat_TP_plm", 0); cableName = configfile.getString("cableName", cableName); cable_TP_mod = configfile.getInt32("cable_TP_mod", QAM_64); @@ -164,6 +167,7 @@ bool CScanSettings::loadSettings(const char * const fileName) terrestrial_TP_hierarchy = configfile.getInt32("terrestrial_TP_hierarchy", HIERARCHY_AUTO); terrestrial_TP_transmit_mode = configfile.getInt32("terrestrial_TP_transmit_mode", TRANSMISSION_MODE_AUTO); terrestrial_TP_delsys = configfile.getInt32("terrestrial_TP_delsys", DVB_T); + terrestrial_TP_pli = configfile.getString("terrestrial_TP_pli", "0"); #if 1 if(sat_TP_fec == 4) sat_TP_fec = 5; @@ -204,6 +208,9 @@ bool CScanSettings::saveSettings(const char * const fileName) configfile.setInt32("sat_TP_delsys", sat_TP_delsys); configfile.setInt32("sat_TP_mod", sat_TP_mod); configfile.setInt32("sat_TP_pilot", sat_TP_pilot); + configfile.setString("sat_TP_pli", sat_TP_pli); + configfile.setString("sat_TP_plc", sat_TP_plc); + configfile.setInt32("sat_TP_plm", sat_TP_plm); configfile.setString("cableName", cableName); configfile.setInt32("cable_TP_fec", cable_TP_fec); @@ -222,6 +229,7 @@ bool CScanSettings::saveSettings(const char * const fileName) configfile.setInt32("terrestrial_TP_guard", terrestrial_TP_guard); configfile.setInt32("terrestrial_TP_transmit_mode", terrestrial_TP_transmit_mode); configfile.setInt32("terrestrial_TP_delsys", terrestrial_TP_delsys); + configfile.setString("terrestrial_TP_pli", terrestrial_TP_pli); if(configfile.getModifiedFlag()) configfile.saveConfig(fileName); diff --git a/src/system/settings.h b/src/system/settings.h index c16086540..7242b221a 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -1001,6 +1001,9 @@ class CScanSettings int sat_TP_delsys; int sat_TP_mod; int sat_TP_pilot; + std::string sat_TP_pli; + std::string sat_TP_plc; + int sat_TP_plm; std::string cableName; int cable_TP_mod; @@ -1019,6 +1022,7 @@ class CScanSettings int terrestrial_TP_hierarchy; int terrestrial_TP_transmit_mode; int terrestrial_TP_delsys; + std::string terrestrial_TP_pli; CScanSettings(); diff --git a/src/zapit/include/zapit/frontend_c.h b/src/zapit/include/zapit/frontend_c.h index 012b87605..7ae2597fb 100644 --- a/src/zapit/include/zapit/frontend_c.h +++ b/src/zapit/include/zapit/frontend_c.h @@ -154,6 +154,7 @@ class CFrontend uint32_t deliverySystemMask; uint32_t forcedSystemMask; + bool isMultistream; //fe_delivery_system_t deliverySystems[MAX_DELSYS]; //uint32_t numDeliverySystems; @@ -187,6 +188,7 @@ class CFrontend ~CFrontend(void); + static fe_pls_mode_t getPLSMode(const uint8_t pls_mode); static fe_code_rate_t getCodeRate(const uint8_t fec_inner, delivery_system_t delsys); static fe_hierarchy_t getHierarchy(const uint8_t hierarchy); static fe_transmit_mode_t getTransmissionMode(const uint8_t transmission_mode); diff --git a/src/zapit/include/zapit/frontend_types.h b/src/zapit/include/zapit/frontend_types.h index b4763ae43..615d7703e 100644 --- a/src/zapit/include/zapit/frontend_types.h +++ b/src/zapit/include/zapit/frontend_types.h @@ -106,6 +106,13 @@ typedef enum { ZPILOT_AUTO_SW } zapit_pilot_t; +typedef enum { + PLS_Root, + PLS_Gold, + PLS_Combo, + PLS_Unknown +} fe_pls_mode_t; + typedef struct { delivery_system_t delsys; uint32_t frequency; @@ -127,7 +134,9 @@ typedef struct { enum fe_interleaving interleaving; #endif uint8_t polarization; - uint8_t plp_id; + uint8_t plp_id; //0-255 + fe_pls_mode_t pls_mode; + uint32_t pls_code; //0-262142 } FrontendParameters; typedef struct frontend_config { diff --git a/src/zapit/src/frontend.cpp b/src/zapit/src/frontend.cpp index b40c99b25..94d08341f 100644 --- a/src/zapit/src/frontend.cpp +++ b/src/zapit/src/frontend.cpp @@ -66,6 +66,7 @@ extern int zapit_debug; // DVB-S/S2 specific #define PILOTS 7 #define ROLLOFF 8 +#define MIS 9 // DVB-T specific #define BANDWIDTH 4 #define CODE_RATE_HP 6 @@ -78,7 +79,7 @@ extern int zapit_debug; #define FE_COMMON_PROPS 2 #define FE_DVBS_PROPS 6 -#define FE_DVBS2_PROPS 8 +#define FE_DVBS2_PROPS 9 #define FE_DVBC_PROPS 6 #define FE_DVBT_PROPS 10 #define FE_DVBT2_PROPS 11 @@ -105,7 +106,8 @@ static const struct dtv_property dvbs2_cmdargs[] = { { DTV_INNER_FEC, {}, { FEC_AUTO } ,0}, { DTV_PILOT, {}, { PILOT_AUTO } ,0}, { DTV_ROLLOFF, {}, { ROLLOFF_AUTO } ,0}, - { DTV_TUNE, {}, { 0 } ,0 }, + { DTV_STREAM_ID, {}, { NO_STREAM_ID_FILTER } ,0}, + { DTV_TUNE, {}, { 0 } ,0 } }; static const struct dtv_property dvbc_cmdargs[] = { @@ -243,6 +245,7 @@ CFrontend::CFrontend(int Number, int Adapter) memset(&info, 0, sizeof(info)); deliverySystemMask = UNKNOWN_DS; + isMultistream = false; } CFrontend::~CFrontend(void) @@ -356,12 +359,14 @@ void CFrontend::getFEInfo(void) break; case SYS_DVBT2: deliverySystemMask |= DVB_T2; + isMultistream = info.caps & FE_CAN_MULTISTREAM; break; case SYS_DVBS: deliverySystemMask |= DVB_S; break; case SYS_DVBS2: deliverySystemMask |= DVB_S2; + isMultistream = info.caps & FE_CAN_MULTISTREAM; break; case SYS_DTMB: deliverySystemMask |= DTMB; @@ -688,6 +693,22 @@ fe_transmit_mode_t CFrontend::getTransmissionMode(const uint8_t transmission_mod } } +fe_pls_mode_t CFrontend::getPLSMode(const uint8_t pls_mode) +{ + switch (pls_mode) { + case 0x00: + return PLS_Root; + case 0x01: + return PLS_Gold; + case 0x02: + return PLS_Combo; + case 0x03: + return PLS_Unknown; + default: + return PLS_Root; + } +} + uint8_t CFrontend::getPolarization(void) const { return currentTransponder.getPolarization(); @@ -1269,6 +1290,7 @@ bool CFrontend::buildProperties(const FrontendParameters *feparams, struct dtv_p cmdseq.props[MODULATION].u.data = feparams->modulation; cmdseq.props[ROLLOFF].u.data = feparams->rolloff; cmdseq.props[PILOTS].u.data = pilot; + cmdseq.props[MIS].u.data = feparams->plp_id | (feparams->pls_code << 8) | (feparams->pls_mode << 26); if (zapit_debug) printf("[fe%d] tuner pilot %d (feparams %d)\n", fenumber, pilot, feparams->pilot); } else { memcpy(cmdseq.props, dvbs_cmdargs, sizeof(dvbs_cmdargs)); @@ -1802,8 +1824,8 @@ int CFrontend::setParameters(transponder *TP, bool nowait) break; } - printf("[fe%d] tune to %d %s %s %s %s srate %d pli %d (tuner %d offset %d timeout %d)\n", fenumber, freq, s, m, f, - feparams.polarization & 1 ? "V/R" : "H/L", feparams.symbol_rate, feparams.plp_id, feparams.frequency, freq_offset, TIMEOUT_MAX_MS); + printf("[fe%d] tune to %d %s %s %s %s srate %d pli %d plc %d plm %d (tuner %d offset %d timeout %d)\n", fenumber, freq, s, m, f, + feparams.polarization & 1 ? "V/R" : "H/L", feparams.symbol_rate, feparams.plp_id, feparams.pls_code, feparams.pls_mode, feparams.frequency, freq_offset, TIMEOUT_MAX_MS); setFrontend(&feparams, nowait); return tuned; diff --git a/src/zapit/src/getservices.cpp b/src/zapit/src/getservices.cpp index d53f02bc3..e0382ff13 100644 --- a/src/zapit/src/getservices.cpp +++ b/src/zapit/src/getservices.cpp @@ -415,6 +415,11 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa feparams.frequency = (int) 1000 * (int) round ((double) feparams.frequency / (double) 1000); /* TODO: add xml tag ? */ feparams.pilot = ZPILOT_AUTO; + feparams.plp_id = xmlGetNumericAttribute(node, "pli", 0); + feparams.pls_mode = (fe_pls_mode_t) xmlGetNumericAttribute(node, "plm", 0); + feparams.pls_code = xmlGetNumericAttribute(node, "plc", 0); + if (feparams.pls_code == 0) + feparams.pls_code = 1; } else if (CFrontend::isTerr(delsys)) { // @@ -615,6 +620,10 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr feparams.frequency = xmlGetNumericAttribute(tps, "centre_frequency", 0); feparams.inversion = INVERSION_AUTO; + feparams.plp_id = NO_STREAM_ID_FILTER; + feparams.pls_mode = PLS_Root; + feparams.pls_code = 1; + if (CFrontend::isCable(delsys)) { const char *system = xmlGetAttribute(tps, "system"); if (system) { @@ -706,6 +715,11 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr #endif feparams.fec_inner = (fe_code_rate_t) xml_fec; feparams.frequency = (int) 1000 * (int) round ((double) feparams.frequency / (double) 1000); + feparams.plp_id = xmlGetNumericAttribute(tps, "is_id", 0); + feparams.pls_mode = (fe_pls_mode_t) xmlGetNumericAttribute(tps, "pls_mode", 0); + feparams.pls_code = xmlGetNumericAttribute(tps, "pls_code", 0); + if (feparams.pls_code == 0) + feparams.pls_code = 1; } else if (CFrontend::isTerr(delsys)) { const char *system = xmlGetAttribute(tps, "system"); diff --git a/src/zapit/src/transponder.cpp b/src/zapit/src/transponder.cpp index 5e0e24264..8b5af8d89 100644 --- a/src/zapit/src/transponder.cpp +++ b/src/zapit/src/transponder.cpp @@ -56,7 +56,10 @@ bool transponder::operator==(const transponder& t) const //(transport_stream_id == t.transport_stream_id) && //(original_network_id == t.original_network_id) && ((getFEParams()->polarization & 1) == (t.getFEParams()->polarization & 1)) && - (abs((int) getFEParams()->frequency - (int)t.getFEParams()->frequency) <= 3000) + (abs((int) getFEParams()->frequency - (int)t.getFEParams()->frequency) <= 3000) && + (getFEParams()->plp_id == t.getFEParams()->plp_id) && + (getFEParams()->pls_mode == t.getFEParams()->pls_mode) && + (getFEParams()->pls_code == t.getFEParams()->pls_code) ); return ((satellitePosition == t.satellitePosition) && //(transport_stream_id == t.transport_stream_id) && @@ -88,7 +91,10 @@ bool transponder::compare(const transponder& t) const (getFEParams()->delsys == t.getFEParams()->delsys) && (getFEParams()->modulation == t.getFEParams()->modulation) && (getFEParams()->fec_inner == t.getFEParams()->fec_inner || - getFEParams()->fec_inner == FEC_AUTO || t.getFEParams()->fec_inner == FEC_AUTO) + getFEParams()->fec_inner == FEC_AUTO || t.getFEParams()->fec_inner == FEC_AUTO) && + (getFEParams()->plp_id == t.getFEParams()->plp_id) && + (getFEParams()->pls_mode == t.getFEParams()->pls_mode) && + (getFEParams()->pls_code == t.getFEParams()->pls_code) ); } else if (CFrontend::isTerr(feparams.delsys)) { @@ -119,7 +125,7 @@ void transponder::dumpServiceXml(FILE * fd) getFEParams()->modulation, CFrontend::getXMLDeliverySystem(getFEParams()->delsys)); } else if (CFrontend::isSat(feparams.delsys)) { - fprintf(fd, "\t\t\n", + fprintf(fd, "\t\t\n", transport_stream_id, original_network_id, getFEParams()->frequency, getFEParams()->inversion, @@ -127,6 +133,9 @@ void transponder::dumpServiceXml(FILE * fd) getFEParams()->fec_inner, getFEParams()->polarization, getFEParams()->modulation, + getFEParams()->plp_id, + getFEParams()->pls_code, + getFEParams()->pls_mode, CFrontend::getXMLDeliverySystem(getFEParams()->delsys)); } else if (CFrontend::isTerr(feparams.delsys)) { fprintf(fd, "\t\t\n",