mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
fix transponders
Origin commit data
------------------
Branch: ni/coolstream
Commit: 2f6346c636
Author: TangoCash <eric@loxat.de>
Date: 2020-11-01 (Sun, 01 Nov 2020)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
@@ -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; }
|
||||
|
@@ -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);
|
||||
|
@@ -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<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" sr=\"%u\" fec=\"%hu\" pol=\"%hu\" mod=\"%hu\" sys=\"%hu\">\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<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" sr=\"%u\" fec=\"%hu\" pol=\"%hu\" mod=\"%hu\" pli=\"%u\" plc=\"%u\" plm=\"%u\" sys=\"%hu\">\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<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" bw=\"%u\" hp=\"%hu\" lp=\"%hu\" con=\"%u\" tm=\"%u\" gi=\"%u\" hi=\"%u\" sys=\"%hu\">\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<TS id=\"%04x\" on=\"%04x\" frq=\"%u\" inv=\"%hu\" bw=\"%u\" hp=\"%hu\" lp=\"%hu\" con=\"%u\" tm=\"%u\" gi=\"%u\" hi=\"%u\" pli=\"%u\" sys=\"%hu\">\n",
|
||||
transport_stream_id, original_network_id,
|
||||
getFEParams()->frequency,
|
||||
@@ -162,6 +194,7 @@ void transponder::dumpServiceXml(FILE * fd)
|
||||
CFrontend::getXMLDeliverySystem(getFEParams()->delsys));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void transponder::dump(std::string label)
|
||||
{
|
||||
@@ -174,6 +207,8 @@ void transponder::dump(std::string label)
|
||||
getFEParams()->modulation,
|
||||
getFEParams()->delsys);
|
||||
} else if (CFrontend::isSat(feparams.delsys)) {
|
||||
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,
|
||||
@@ -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,
|
||||
@@ -195,6 +259,7 @@ void transponder::dump(std::string label)
|
||||
getFEParams()->delsys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
//never used
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user