From: Jaroslav Kysela Date: Thu, 11 Oct 2018 19:05:05 +0000 (+0200) Subject: dvb-c2: add support for data slice and plp X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f12e675fe0bcd50cbf7f8df70cf716b5559e4476;p=thirdparty%2Ftvheadend.git dvb-c2: add support for data slice and plp --- diff --git a/src/input/mpegts/dvb.h b/src/input/mpegts/dvb.h index 7e59d85ba..149cec4e3 100644 --- a/src/input/mpegts/dvb.h +++ b/src/input/mpegts/dvb.h @@ -633,6 +633,7 @@ typedef struct dvb_mux_conf int32_t dmc_fe_stream_id; dvb_fe_pls_mode_t dmc_fe_pls_mode; uint32_t dmc_fe_pls_code; + uint32_t dmc_fe_data_slice; union { dvb_qpsk_config_t dmc_fe_qpsk; dvb_qam_config_t dmc_fe_qam; diff --git a/src/input/mpegts/dvb_support.c b/src/input/mpegts/dvb_support.c index ca516ee24..c51c43d2e 100644 --- a/src/input/mpegts/dvb_support.c +++ b/src/input/mpegts/dvb_support.c @@ -1044,12 +1044,14 @@ dvb_mux_conf_str_dvbc ( dvb_mux_conf_t *dmc, char *buf, size_t bufsize ) delsys = dvb_delsys2str(dmc->dmc_fe_delsys); return snprintf(buf, bufsize, - "%s freq %d sym %d mod %s fec %s", + "%s freq %d sym %d mod %s fec %s ds %d plp %d", delsys, dmc->dmc_fe_freq, dmc->u.dmc_fe_qam.symbol_rate, dvb_qam2str(dmc->dmc_fe_modulation), - dvb_fec2str(dmc->u.dmc_fe_qam.fec_inner)); + dvb_fec2str(dmc->u.dmc_fe_qam.fec_inner), + dmc->dmc_fe_data_slice, + dmc->dmc_fe_stream_id); } static int diff --git a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c index b2f0cd54e..af1d93ce9 100644 --- a/src/input/mpegts/linuxdvb/linuxdvb_frontend.c +++ b/src/input/mpegts/linuxdvb/linuxdvb_frontend.c @@ -1859,6 +1859,11 @@ linuxdvb_frontend_tune0 S2CMD(DTV_SYMBOL_RATE, p.u.qam.symbol_rate); S2CMD(DTV_MODULATION, p.u.qam.modulation); S2CMD(DTV_INNER_FEC, p.u.qam.fec_inner); + r = dmc->dmc_fe_stream_id != DVB_NO_STREAM_ID_FILTER ? (dmc->dmc_fe_stream_id & 0xFF) | + ((dmc->dmc_fe_data_slice & 0xFF)<<8) : DVB_NO_STREAM_ID_FILTER; +#if DVB_VER_ATLEAST(5,9) + S2CMD(DTV_STREAM_ID, r); +#endif /* DVB-S */ } else if (lfe->lfe_type == DVB_TYPE_S) { diff --git a/src/input/mpegts/mpegts_mux_dvb.c b/src/input/mpegts/mpegts_mux_dvb.c index c948b21a8..c003ec61f 100644 --- a/src/input/mpegts/mpegts_mux_dvb.c +++ b/src/input/mpegts/mpegts_mux_dvb.c @@ -332,6 +332,24 @@ const idclass_t dvb_mux_dvbc_class = MUX_PROP_STR("fec", N_("FEC"), dvbc, fec, N_("AUTO")), .desc = N_("The forward error correction used on the mux."), }, + { + .type = PT_INT, + .id = "plp_id", + .name = N_("PLP ID"), + .desc = N_("The physical layer pipe ID. " + "Most people will not need to change this setting."), + .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_stream_id), + .def.i = DVB_NO_STREAM_ID_FILTER, + }, + { + .type = PT_U32, + .id = "data_slice", + .name = N_("Data slice"), + .desc = N_("Data slice code."), + .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_data_slice), + .def.u32 = 0, + .opts = PO_EXPERT + }, {} } }; @@ -838,6 +856,24 @@ const idclass_t dvb_mux_isdb_c_class = MUX_PROP_STR("fec", N_("FEC"), dvbc, fec, N_("AUTO")), .desc = N_("The forward error correction used on the mux."), }, + { + .type = PT_INT, + .id = "plp_id", + .name = N_("PLP ID"), + .desc = N_("The physical layer pipe ID. " + "Most people will not need to change this setting."), + .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_stream_id), + .def.i = DVB_NO_STREAM_ID_FILTER, + }, + { + .type = PT_U32, + .id = "data_slice", + .name = N_("Data slice"), + .desc = N_("Data slice code."), + .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_data_slice), + .def.u32 = 0, + .opts = PO_EXPERT + }, {} } }; diff --git a/src/input/mpegts/satip/satip_rtsp.c b/src/input/mpegts/satip/satip_rtsp.c index 868c58875..65be449ce 100644 --- a/src/input/mpegts/satip/satip_rtsp.c +++ b/src/input/mpegts/satip/satip_rtsp.c @@ -194,7 +194,10 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe, dmc->dmc_fe_modulation != DVB_MOD_NONE && dmc->dmc_fe_modulation != DVB_MOD_QAM_AUTO) ADD(dmc_fe_modulation, mtype, "64qam"); - /* missing plp */ + if (dmc->dmc_fe_stream_id != DVB_NO_STREAM_ID_FILTER) { + satip_rtsp_add_val("ds", buf, dmc->dmc_fe_data_slice & 0xff); + satip_rtsp_add_val("plp", buf, dmc->dmc_fe_stream_id & 0xff); + } if (dmc->u.dmc_fe_qam.fec_inner != DVB_FEC_NONE && dmc->u.dmc_fe_qam.fec_inner != DVB_FEC_AUTO) /* note: OctopusNet device does not handle 'fec=auto' */