mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 17:31:20 +02:00
fix DVB-T2 transponders
This commit is contained in:
@@ -147,9 +147,9 @@ static const struct dtv_property dvbt2_cmdargs[] = {
|
||||
{ DTV_GUARD_INTERVAL, {}, { GUARD_INTERVAL_AUTO}, 0},
|
||||
{ DTV_HIERARCHY, {}, { HIERARCHY_AUTO }, 0},
|
||||
#if defined DTV_STREAM_ID
|
||||
{ DTV_STREAM_ID, {}, { 0 } ,0},
|
||||
{ DTV_STREAM_ID, {}, { NO_STREAM_ID_FILTER } ,0},
|
||||
#elif defined DTV_DVBT2_PLP_ID
|
||||
{ DTV_DVBT2_PLP_ID, {}, { 0 } ,0},
|
||||
{ DTV_DVBT2_PLP_ID, {}, { NO_STREAM_ID_FILTER } ,0},
|
||||
#endif
|
||||
{ DTV_TUNE, {}, { 0 }, 0}
|
||||
};
|
||||
@@ -1802,8 +1802,8 @@ int CFrontend::setParameters(transponder *TP, bool nowait)
|
||||
break;
|
||||
}
|
||||
|
||||
printf("[fe%d] tune to %d %s %s %s %s srate %d (tuner %d offset %d timeout %d)\n", fenumber, freq, s, m, f,
|
||||
feparams.polarization & 1 ? "V/R" : "H/L", feparams.symbol_rate, feparams.frequency, freq_offset, TIMEOUT_MAX_MS);
|
||||
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);
|
||||
setFrontend(&feparams, nowait);
|
||||
|
||||
return tuned;
|
||||
|
@@ -380,6 +380,7 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa
|
||||
t_original_network_id original_network_id = xmlGetNumericAttribute(node, "on", 16);
|
||||
feparams.frequency = xmlGetNumericAttribute(node, "frq", 0);
|
||||
feparams.inversion = (fe_spectral_inversion) xmlGetNumericAttribute(node, "inv", 0);
|
||||
feparams.plp_id = (uint8_t) xmlGetNumericAttribute(node, "pli", 0);
|
||||
|
||||
const char *system = xmlGetAttribute(node, "sys");
|
||||
if (system) {
|
||||
@@ -397,7 +398,7 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa
|
||||
feparams.delsys = DVB_C;
|
||||
|
||||
} else if (CFrontend::isTerr(delsys)) {
|
||||
feparams.delsys = DVB_T;
|
||||
feparams.delsys = delsys;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,8 +427,8 @@ 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);
|
||||
|
||||
if (feparams.frequency > 1000*1000)
|
||||
feparams.frequency = feparams.frequency/1000; //transponderlist was read from tuxbox
|
||||
if (feparams.frequency < 1000*1000)
|
||||
feparams.frequency = feparams.frequency*1000;
|
||||
}
|
||||
else if (CFrontend::isCable(delsys)) {
|
||||
feparams.fec_inner = (fe_code_rate_t) xmlGetNumericAttribute(node, "fec", 0);
|
||||
@@ -728,7 +729,7 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr
|
||||
}
|
||||
} else {
|
||||
// Set some sane defaults.
|
||||
feparams.delsys = DVB_T;
|
||||
feparams.delsys = DVB_T2;
|
||||
}
|
||||
|
||||
feparams.bandwidth = (fe_bandwidth_t) xmlGetNumericAttribute(tps, "bandwidth", 0);
|
||||
@@ -746,8 +747,8 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr
|
||||
xmlGetNumericAttribute(tps, "hierarchy", 0);
|
||||
feparams.plp_id = (uint8_t)
|
||||
xmlGetNumericAttribute(tps, "plp_id", 0);
|
||||
if (feparams.frequency > 1000*1000)
|
||||
feparams.frequency /= 1000; // old transponder list
|
||||
if (feparams.frequency < 1000*1000)
|
||||
feparams.frequency *= 1000;
|
||||
}
|
||||
else /* we'll probably crash sooner or later, so write to STDERR... */
|
||||
fprintf(stderr, "[getservices] %s: unknown delivery system %d!\n", __func__, delsys);
|
||||
|
@@ -62,7 +62,8 @@ 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) <= 100)
|
||||
(abs((int) getFEParams()->frequency - (int)t.getFEParams()->frequency) <= 100) &&
|
||||
(getFEParams()->plp_id == t.getFEParams()->plp_id)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -98,7 +99,8 @@ bool transponder::compare(const transponder& t) const
|
||||
(getFEParams()->code_rate_LP == t.getFEParams()->code_rate_LP ||
|
||||
getFEParams()->code_rate_LP == FEC_AUTO || t.getFEParams()->code_rate_LP == FEC_AUTO) &&
|
||||
(getFEParams()->modulation == t.getFEParams()->modulation ||
|
||||
getFEParams()->modulation == QAM_AUTO || t.getFEParams()->modulation == QAM_AUTO)
|
||||
getFEParams()->modulation == QAM_AUTO || t.getFEParams()->modulation == QAM_AUTO) &&
|
||||
(getFEParams()->plp_id == t.getFEParams()->plp_id)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -127,7 +129,7 @@ void transponder::dumpServiceXml(FILE * fd)
|
||||
getFEParams()->modulation,
|
||||
CFrontend::getXMLDeliverySystem(getFEParams()->delsys));
|
||||
} else if (CFrontend::isTerr(feparams.delsys)) {
|
||||
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",
|
||||
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,
|
||||
getFEParams()->inversion,
|
||||
@@ -138,6 +140,7 @@ void transponder::dumpServiceXml(FILE * fd)
|
||||
getFEParams()->transmission_mode,
|
||||
getFEParams()->guard_interval,
|
||||
getFEParams()->hierarchy,
|
||||
getFEParams()->plp_id,
|
||||
CFrontend::getXMLDeliverySystem(getFEParams()->delsys));
|
||||
}
|
||||
}
|
||||
@@ -162,7 +165,7 @@ void transponder::dump(std::string label)
|
||||
getFEParams()->modulation,
|
||||
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 %d\n", label.c_str(),
|
||||
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(),
|
||||
transponder_id,
|
||||
getFEParams()->frequency,
|
||||
getFEParams()->bandwidth,
|
||||
@@ -170,6 +173,7 @@ void transponder::dump(std::string label)
|
||||
getFEParams()->code_rate_LP,
|
||||
getFEParams()->modulation,
|
||||
getFEParams()->guard_interval,
|
||||
getFEParams()->plp_id,
|
||||
getFEParams()->delsys);
|
||||
}
|
||||
}
|
||||
@@ -209,7 +213,7 @@ std::string transponder::description()
|
||||
} 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 ", getFEParams()->frequency, CFrontend::getFEBandwidth(getFEParams()->bandwidth)/1000, f, f2, m);
|
||||
snprintf(buf, sizeof(buf), "%d %d %s %s %s %d ", getFEParams()->frequency, CFrontend::getFEBandwidth(getFEParams()->bandwidth)/1000, f, f2, m, getFEParams()->plp_id);
|
||||
}
|
||||
|
||||
return std::string(buf);
|
||||
|
Reference in New Issue
Block a user