Feature #4784 » SAT-IP-Server-remap-for-all-MPEGTS-inputs-v2.diff
src/input/mpegts.h | ||
---|---|---|
534 | 534 |
uint16_t mm_sid_filter; |
535 | 535 | |
536 | 536 |
/* |
537 |
* SAT>IP Remap |
|
538 |
*/ |
|
539 |
uint32_t mm_remap_satip_dvbt_freq; |
|
540 |
uint32_t mm_remap_satip_dvbc_freq; |
|
541 |
uint32_t mm_remap_satip_dvbs_freq; |
|
542 |
|
|
543 |
/* |
|
537 | 544 |
* TSDEBUG |
538 | 545 |
*/ |
539 | 546 |
#if ENABLE_TSDEBUG |
src/input/mpegts/iptv/iptv_mux.c | ||
---|---|---|
244 | 244 |
}, |
245 | 245 |
{ |
246 | 246 |
.type = PT_U32, |
247 |
.id = "iptv_satip_dvbt_freq", |
|
248 |
.name = N_("SAT>IP DVB-T frequency (Hz)"), |
|
249 |
.off = offsetof(iptv_mux_t, mm_iptv_satip_dvbt_freq), |
|
250 |
.desc = N_("For example: 658000000. This frequency is 658Mhz."), |
|
251 |
.opts = PO_ADVANCED |
|
252 |
}, |
|
253 |
{ |
|
254 |
.type = PT_U32, |
|
255 |
.id = "iptv_satip_dvbc_freq", |
|
256 |
.name = N_("SAT>IP DVB-C frequency (Hz)"), |
|
257 |
.off = offsetof(iptv_mux_t, mm_iptv_satip_dvbc_freq), |
|
258 |
.desc = N_("For example: 312000000. This frequency is 312Mhz."), |
|
259 |
.opts = PO_ADVANCED |
|
260 |
}, |
|
261 |
{ |
|
262 |
.type = PT_U32, |
|
263 |
.id = "iptv_satip_dvbs_freq", |
|
264 |
.name = N_("SAT>IP DVB-S frequency (kHz)"), |
|
265 |
.off = offsetof(iptv_mux_t, mm_iptv_satip_dvbs_freq), |
|
266 |
.desc = N_("For example: 12610500. This frequency is 12610.5Mhz or 12.6105Ghz."), |
|
267 |
.opts = PO_ADVANCED |
|
268 |
}, |
|
269 |
{ |
|
270 |
.type = PT_U32, |
|
271 | 247 |
.id = "iptv_buffer_limit", |
272 | 248 |
.name = N_("Buffering limit (ms)"), |
273 | 249 |
.desc = N_("Specifies the incoming buffering limit in " |
src/input/mpegts/iptv/iptv_private.h | ||
---|---|---|
134 | 134 |
char *mm_iptv_env; |
135 | 135 |
char *mm_iptv_hdr; |
136 | 136 |
char *mm_iptv_tags; |
137 |
uint32_t mm_iptv_satip_dvbt_freq; |
|
138 |
uint32_t mm_iptv_satip_dvbc_freq; |
|
139 |
uint32_t mm_iptv_satip_dvbs_freq; |
|
140 | 137 | |
141 | 138 |
uint32_t mm_iptv_rtp_seq; |
142 | 139 |
src/input/mpegts/mpegts_mux.c | ||
---|---|---|
621 | 621 |
.list = mpegts_mux_class_scan_result_enum, |
622 | 622 |
}, |
623 | 623 |
{ |
624 |
.type = PT_U32, |
|
625 |
.id = "remap_satip_dvbt_freq", |
|
626 |
.name = N_("SAT>IP DVB-T frequency (Hz)"), |
|
627 |
.off = offsetof(mpegts_mux_t, mm_remap_satip_dvbt_freq), |
|
628 |
.desc = N_("For example: 658000000. This frequency is 658Mhz."), |
|
629 |
.opts = PO_ADVANCED |
|
630 |
}, |
|
631 |
{ |
|
632 |
.type = PT_U32, |
|
633 |
.id = "remap_satip_dvbc_freq", |
|
634 |
.name = N_("SAT>IP DVB-C frequency (Hz)"), |
|
635 |
.off = offsetof(mpegts_mux_t, mm_remap_satip_dvbc_freq), |
|
636 |
.desc = N_("For example: 312000000. This frequency is 312Mhz."), |
|
637 |
.opts = PO_ADVANCED |
|
638 |
}, |
|
639 |
{ |
|
640 |
.type = PT_U32, |
|
641 |
.id = "remap_satip_dvbs_freq", |
|
642 |
.name = N_("SAT>IP DVB-S frequency (kHz)"), |
|
643 |
.off = offsetof(mpegts_mux_t, mm_remap_satip_dvbs_freq), |
|
644 |
.desc = N_("For example: 12610500. This frequency is 12610.5Mhz or 12.6105Ghz."), |
|
645 |
.opts = PO_ADVANCED |
|
646 |
}, |
|
647 |
{ |
|
624 | 648 |
.type = PT_STR, |
625 | 649 |
.id = "charset", |
626 | 650 |
.name = N_("Character set"), |
src/satip/rtsp.c | ||
---|---|---|
617 | 617 |
} |
618 | 618 |
} |
619 | 619 |
} |
620 |
#if ENABLE_IPTV |
|
621 |
if (idnode_is_instance(&mn->mn_id, &iptv_network_class)) { |
|
622 |
LIST_FOREACH(mux, &mn->mn_muxes, mm_network_link) { |
|
623 |
if (rs->dmc.dmc_fe_type == DVB_TYPE_T && |
|
624 |
deltaU32(rs->dmc.dmc_fe_freq, ((iptv_mux_t *)mux)->mm_iptv_satip_dvbt_freq) < 2000) |
|
625 |
break; |
|
626 |
if (rs->dmc.dmc_fe_type == DVB_TYPE_C && |
|
627 |
deltaU32(rs->dmc.dmc_fe_freq, ((iptv_mux_t *)mux)->mm_iptv_satip_dvbc_freq) < 2000) |
|
628 |
break; |
|
629 |
if (rs->dmc.dmc_fe_type == DVB_TYPE_S && |
|
630 |
deltaU32(rs->dmc.dmc_fe_freq, ((iptv_mux_t *)mux)->mm_iptv_satip_dvbs_freq) < 2000) |
|
631 |
break; |
|
632 |
} |
|
633 |
if (mux) { |
|
620 |
} |
|
621 |
// MUX not found, search for a SAT>IP frequency remap |
|
622 |
LIST_FOREACH(mn, &mpegts_network_all, mn_global_link) { |
|
623 |
LIST_FOREACH(mux, &mn->mn_muxes, mm_network_link) { |
|
624 |
if (rs->dmc.dmc_fe_type == DVB_TYPE_T && |
|
625 |
deltaU32(rs->dmc.dmc_fe_freq, mux->mm_remap_satip_dvbt_freq) < 2000) |
|
626 |
break; |
|
627 |
if (rs->dmc.dmc_fe_type == DVB_TYPE_C && |
|
628 |
deltaU32(rs->dmc.dmc_fe_freq, mux->mm_remap_satip_dvbc_freq) < 2000) |
|
629 |
break; |
|
630 |
if (rs->dmc.dmc_fe_type == DVB_TYPE_S && |
|
631 |
deltaU32(rs->dmc.dmc_fe_freq, mux->mm_remap_satip_dvbs_freq) < 2000) |
|
632 |
break; |
|
633 |
} |
|
634 |
if (mux) { |
|
635 |
if (idnode_is_instance(&mn->mn_id, &dvb_network_class)) { |
|
636 |
dmc = ((dvb_mux_t *)mux)->lm_tuning; |
|
637 |
rs->perm_lock = 0; |
|
638 |
} else if (idnode_is_instance(&mn->mn_id, &iptv_network_class)) { |
|
634 | 639 |
dmc = rs->dmc; |
635 | 640 |
rs->perm_lock = 1; |
636 |
break; |
|
641 |
} else if (idnode_is_instance(&mn->mn_id, &mpegts_network_class)) { |
|
642 |
dmc = rs->dmc; |
|
643 |
rs->perm_lock = 1; |
|
644 |
} else { |
|
645 |
// TODO: Unkown Network Type to Remap |
|
646 |
tvhwarn(LS_SATIPS, "Error! Found a REMAP for a MUX type (%s) not implemented.", mn->mn_id.in_class->ic_class); |
|
647 |
mux = NULL; |
|
648 |
buf[0]='\0'; |
|
637 | 649 |
} |
650 |
// dvb_mux_conf_str(&dmc, buf, sizeof(buf)); |
|
651 |
mpegts_mux_nice_name(mux, buf, sizeof(buf)); |
|
652 |
tvhdebug(LS_SATIPS, "MUX remapping -> FREQ: %i to MUX: %s", rs->dmc.dmc_fe_freq, buf); |
|
653 |
break; |
|
638 | 654 |
} |
639 |
#endif |
|
640 | 655 |
} |
656 |
|
|
641 | 657 |
if (mux == NULL && mn2 && |
642 | 658 |
(rtsp_muxcnf == MUXCNF_AUTO || rtsp_muxcnf == MUXCNF_KEEP)) { |
643 | 659 |
dvb_mux_conf_str(&rs->dmc, buf, sizeof(buf)); |
src/satip/server.c | ||
---|---|---|
150 | 150 |
dvbc++; |
151 | 151 |
else if (idnode_is_instance(&mn->mn_id, &dvb_network_atsc_t_class)) |
152 | 152 |
atsc++; |
153 |
#if ENABLE_IPTV |
|
154 |
else if (idnode_is_instance(&mn->mn_id, &iptv_network_class)) { |
|
155 |
mpegts_mux_t *mm; |
|
156 |
LIST_FOREACH(mm, &mn->mn_muxes, mm_network_link) { |
|
157 |
if (((iptv_mux_t *)mm)->mm_iptv_satip_dvbt_freq) { |
|
158 |
dvbt++; |
|
159 |
} |
|
160 |
if (((iptv_mux_t *)mm)->mm_iptv_satip_dvbc_freq) { |
|
161 |
dvbc++; |
|
162 |
} |
|
163 |
if (((iptv_mux_t *)mm)->mm_iptv_satip_dvbs_freq) { |
|
164 |
dvbs++; |
|
165 |
} |
|
153 |
} |
|
154 |
LIST_FOREACH(mn, &mpegts_network_all, mn_global_link) { |
|
155 |
mpegts_mux_t *mux; |
|
156 |
LIST_FOREACH(mux, &mn->mn_muxes, mm_network_link) { |
|
157 |
if (mux->mm_remap_satip_dvbt_freq) { |
|
158 |
dvbt++; |
|
159 |
} |
|
160 |
if (mux->mm_remap_satip_dvbc_freq) { |
|
161 |
dvbc++; |
|
162 |
} |
|
163 |
if (mux->mm_remap_satip_dvbs_freq) { |
|
164 |
dvbs++; |
|
166 | 165 |
} |
167 | 166 |
} |
168 |
#endif |
|
169 | 167 |
} |
170 | 168 |
// The SAT>IP specification only supports 1-9 tuners (1 digit)! |
171 | 169 |
if (dvbt > 9) dvbt = 9; |