mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
fix multistream (thx BP for testing)
This commit is contained in:
@@ -115,6 +115,16 @@ typedef enum {
|
|||||||
PLS_Unknown
|
PLS_Unknown
|
||||||
} fe_pls_mode_t;
|
} fe_pls_mode_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
PLS_Default_Gold_Code,
|
||||||
|
PLS_Default_Root_Code
|
||||||
|
} fe_pls_code_t;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
No_T2MI_PLP_Id = NO_STREAM_ID_FILTER,
|
||||||
|
T2MI_Default_Pid = 4096
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
delivery_system_t delsys;
|
delivery_system_t delsys;
|
||||||
uint32_t frequency;
|
uint32_t frequency;
|
||||||
@@ -136,7 +146,7 @@ typedef struct {
|
|||||||
enum fe_interleaving interleaving;
|
enum fe_interleaving interleaving;
|
||||||
#endif
|
#endif
|
||||||
uint8_t polarization;
|
uint8_t polarization;
|
||||||
uint8_t plp_id; //0-255
|
unsigned int plp_id; //0-255
|
||||||
fe_pls_mode_t pls_mode;
|
fe_pls_mode_t pls_mode;
|
||||||
uint32_t pls_code; //0-262142
|
uint32_t pls_code; //0-262142
|
||||||
} FrontendParameters;
|
} FrontendParameters;
|
||||||
|
@@ -1538,7 +1538,7 @@ int CFrontend::setFrontend(const FrontendParameters *feparams, bool nowait)
|
|||||||
p[cmdseq.num].cmd = DTV_STREAM_ID, p[cmdseq.num].u.data = feparams->plp_id | (feparams->pls_code << 8) | (feparams->pls_mode << 26), cmdseq.num++;
|
p[cmdseq.num].cmd = DTV_STREAM_ID, p[cmdseq.num].u.data = feparams->plp_id | (feparams->pls_code << 8) | (feparams->pls_mode << 26), cmdseq.num++;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
p[cmdseq.num].cmd = DTV_ISDBT_SB_SEGMENT_IDX, p[cmdseq.num].u.data = (feparams->plp_id == 0 ? 0 : (0x80000000 | (/*default pid*/4096 << 16) | feparams->plp_id)), cmdseq.num++;
|
p[cmdseq.num].cmd = DTV_ISDBT_SB_SEGMENT_IDX, p[cmdseq.num].u.data = (feparams->plp_id == NO_STREAM_ID_FILTER ? 0 : (0x80000000 | (T2MI_Default_Pid << 16) | feparams->plp_id)), cmdseq.num++;
|
||||||
}
|
}
|
||||||
if (fe_can_multistream)
|
if (fe_can_multistream)
|
||||||
INFO("[fe%d/%d] tuner pilot %d (feparams %d) streamid (%d/%d/%d)\n", adapter, fenumber, pilot, feparams->pilot, feparams->plp_id, feparams->pls_code, feparams->pls_mode );
|
INFO("[fe%d/%d] tuner pilot %d (feparams %d) streamid (%d/%d/%d)\n", adapter, fenumber, pilot, feparams->pilot, feparams->plp_id, feparams->pls_code, feparams->pls_mode );
|
||||||
|
@@ -426,12 +426,20 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa
|
|||||||
feparams.frequency = (int) 1000 * (int) round ((double) feparams.frequency / (double) 1000);
|
feparams.frequency = (int) 1000 * (int) round ((double) feparams.frequency / (double) 1000);
|
||||||
/* TODO: add xml tag ? */
|
/* TODO: add xml tag ? */
|
||||||
feparams.pilot = ZPILOT_AUTO;
|
feparams.pilot = ZPILOT_AUTO;
|
||||||
feparams.plp_id = xmlGetNumericAttribute(node, "pli", 0);
|
|
||||||
|
feparams.plp_id = (unsigned int) xmlGetNumericAttribute(node, "pli", 0);
|
||||||
|
if (feparams.plp_id == 0)
|
||||||
|
feparams.plp_id = NO_STREAM_ID_FILTER;
|
||||||
|
|
||||||
feparams.pls_mode = (fe_pls_mode_t) xmlGetNumericAttribute(node, "plm", 0);
|
feparams.pls_mode = (fe_pls_mode_t) xmlGetNumericAttribute(node, "plm", 0);
|
||||||
|
if (feparams.pls_mode == 0)
|
||||||
|
feparams.pls_mode = PLS_Gold;
|
||||||
|
|
||||||
feparams.pls_code = xmlGetNumericAttribute(node, "plc", 0);
|
feparams.pls_code = xmlGetNumericAttribute(node, "plc", 0);
|
||||||
if (feparams.pls_code == 0)
|
if (feparams.pls_code == 0)
|
||||||
feparams.pls_code = 1;
|
feparams.pls_code = PLS_Default_Gold_Code;
|
||||||
if ((feparams.delsys == DVB_S2) && (feparams.pls_mode > 0) && (feparams.pls_code > 1))
|
|
||||||
|
if ((feparams.delsys == DVB_S2) && feparams.plp_id != NO_STREAM_ID_FILTER)
|
||||||
feparams.delsys = DVB_S2X;
|
feparams.delsys = DVB_S2X;
|
||||||
}
|
}
|
||||||
else if (CFrontend::isTerr(delsys)) {
|
else if (CFrontend::isTerr(delsys)) {
|
||||||
@@ -444,7 +452,9 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa
|
|||||||
feparams.code_rate_LP = (fe_code_rate_t) xmlGetNumericAttribute(node, "lp", 0);
|
feparams.code_rate_LP = (fe_code_rate_t) xmlGetNumericAttribute(node, "lp", 0);
|
||||||
feparams.guard_interval = (fe_guard_interval_t) xmlGetNumericAttribute(node, "gi", 0);
|
feparams.guard_interval = (fe_guard_interval_t) xmlGetNumericAttribute(node, "gi", 0);
|
||||||
feparams.hierarchy = (fe_hierarchy_t) xmlGetNumericAttribute(node, "hi", 0);
|
feparams.hierarchy = (fe_hierarchy_t) xmlGetNumericAttribute(node, "hi", 0);
|
||||||
feparams.plp_id = (uint8_t) xmlGetNumericAttribute(node, "pli", 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)
|
if (feparams.frequency < 1000*1000)
|
||||||
feparams.frequency = feparams.frequency*1000;
|
feparams.frequency = feparams.frequency*1000;
|
||||||
@@ -636,9 +646,9 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr
|
|||||||
feparams.frequency = xmlGetNumericAttribute(tps, "centre_frequency", 0);
|
feparams.frequency = xmlGetNumericAttribute(tps, "centre_frequency", 0);
|
||||||
feparams.inversion = INVERSION_AUTO;
|
feparams.inversion = INVERSION_AUTO;
|
||||||
|
|
||||||
feparams.plp_id = 0; // NO_STREAM_ID_FILTER = ~0U, seems not suitable here
|
feparams.plp_id = NO_STREAM_ID_FILTER;
|
||||||
feparams.pls_mode = PLS_Root;
|
feparams.pls_mode = PLS_Gold;
|
||||||
feparams.pls_code = 1;
|
feparams.pls_code = PLS_Default_Gold_Code;
|
||||||
|
|
||||||
if (CFrontend::isCable(delsys)) {
|
if (CFrontend::isCable(delsys)) {
|
||||||
const char *system = xmlGetAttribute(tps, "system");
|
const char *system = xmlGetAttribute(tps, "system");
|
||||||
@@ -740,12 +750,20 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr
|
|||||||
#endif
|
#endif
|
||||||
feparams.fec_inner = (fe_code_rate_t) xml_fec;
|
feparams.fec_inner = (fe_code_rate_t) xml_fec;
|
||||||
feparams.frequency = (int) 1000 * (int) round ((double) feparams.frequency / (double) 1000);
|
feparams.frequency = (int) 1000 * (int) round ((double) feparams.frequency / (double) 1000);
|
||||||
feparams.plp_id = xmlGetNumericAttribute(tps, "is_id", 0);
|
|
||||||
|
feparams.plp_id = (unsigned int) xmlGetNumericAttribute(tps, "is_id", 0);
|
||||||
|
if (feparams.plp_id == 0)
|
||||||
|
feparams.plp_id = NO_STREAM_ID_FILTER;
|
||||||
|
|
||||||
feparams.pls_mode = (fe_pls_mode_t) xmlGetNumericAttribute(tps, "pls_mode", 0);
|
feparams.pls_mode = (fe_pls_mode_t) xmlGetNumericAttribute(tps, "pls_mode", 0);
|
||||||
|
if (feparams.pls_mode == 0)
|
||||||
|
feparams.pls_mode = PLS_Gold;
|
||||||
|
|
||||||
feparams.pls_code = xmlGetNumericAttribute(tps, "pls_code", 0);
|
feparams.pls_code = xmlGetNumericAttribute(tps, "pls_code", 0);
|
||||||
if (feparams.pls_code == 0)
|
if (feparams.pls_code == 0)
|
||||||
feparams.pls_code = 1;
|
feparams.pls_code = PLS_Default_Gold_Code;
|
||||||
if ((feparams.delsys == DVB_S2) && (feparams.pls_mode > 0) && (feparams.pls_code > 1))
|
|
||||||
|
if ((feparams.delsys == DVB_S2) && feparams.plp_id != NO_STREAM_ID_FILTER)
|
||||||
feparams.delsys = DVB_S2X;
|
feparams.delsys = DVB_S2X;
|
||||||
}
|
}
|
||||||
else if (CFrontend::isTerr(delsys)) {
|
else if (CFrontend::isTerr(delsys)) {
|
||||||
@@ -786,8 +804,11 @@ void CServiceManager::ParseSatTransponders(delivery_system_t delsys, xmlNodePtr
|
|||||||
xmlGetNumericAttribute(tps, "guard_interval", 0);
|
xmlGetNumericAttribute(tps, "guard_interval", 0);
|
||||||
feparams.hierarchy = (fe_hierarchy_t)
|
feparams.hierarchy = (fe_hierarchy_t)
|
||||||
xmlGetNumericAttribute(tps, "hierarchy", 0);
|
xmlGetNumericAttribute(tps, "hierarchy", 0);
|
||||||
feparams.plp_id = (uint8_t)
|
feparams.plp_id = (unsigned int)
|
||||||
xmlGetNumericAttribute(tps, "plp_id", 0);
|
xmlGetNumericAttribute(tps, "plp_id", 0);
|
||||||
|
if (feparams.plp_id == 0)
|
||||||
|
feparams.plp_id = NO_STREAM_ID_FILTER;
|
||||||
|
|
||||||
if (feparams.frequency < 1000*1000)
|
if (feparams.frequency < 1000*1000)
|
||||||
feparams.frequency *= 1000;
|
feparams.frequency *= 1000;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user