From: Martina Pietruschka Date: Mon, 30 Jul 2018 13:02:50 +0000 (+0200) Subject: implement netsream 4c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8ca0e03fcf7d9d0d76c6e2c4ae03258cd86937a;p=thirdparty%2Ftvheadend.git implement netsream 4c Conflicts: src/input/mpegts/satip/satip_private.h --- diff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c index 5a630ce5d..798f8898e 100644 --- a/src/input/mpegts/satip/satip.c +++ b/src/input/mpegts/satip/satip.c @@ -319,6 +319,15 @@ const idclass_t satip_device_class = .opts = PO_ADVANCED, .off = offsetof(satip_device_t, sd_pids_deladd), }, + { + .type = PT_BOOL, + .id = "fe", + .name = N_("FE supported"), + .desc = N_("Enable if the SAT>IP box supports the frontend " + "identifier."), + .opts = PO_ADVANCED, + .off = offsetof(satip_device_t, sd_fe), + }, { .type = PT_BOOL, .id = "piloton", @@ -570,6 +579,8 @@ satip_device_hack( satip_device_t *sd ) sd->sd_fullmux_ok = 0; sd->sd_pids_deladd = 0; sd->sd_pids21 = 1; + } else if (strstr(sd->sd_info.modelname, "EyeTV Netstream 4C")) { + sd->sd_fe = 0; } } @@ -596,6 +607,7 @@ satip_device_create( satip_device_info_t *info ) sd->sd_pids_len = 127; sd->sd_pids_max = 32; sd->sd_pids_deladd = 1; + sd->sd_fe = 1; sd->sd_sig_scale = 240; sd->sd_dbus_allow = 1; diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 3c29615fc..210656081 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -305,6 +305,14 @@ const idclass_t satip_frontend_class = .opts = PO_ADVANCED, .off = offsetof(satip_frontend_t, sf_pass_weight), }, + { + .type = PT_BOOL, + .id = "specinv", + .name = N_("Pass SPECINV"), + .desc = N_("Pass Spectrum inversion."), + .opts = PO_ADVANCED, + .off = offsetof(satip_frontend_t, sf_specinv), + }, { .type = PT_STR, .id = "tunerbindaddr", @@ -1807,6 +1815,11 @@ new_tune: rtsp_flags |= SATIP_SETUP_PILOT_ON; if (lfe->sf_device->sd_pids21) rtsp_flags |= SATIP_SETUP_PIDS21; + if (lfe->sf_specinv) + rtsp_flags |= SATIP_SETUP_SPECINV; + if (lfe->sf_device->sd_fe) + rtsp_flags |= SATIP_SETUP_FE; + r = -12345678; pthread_mutex_lock(&lfe->sf_dvr_lock); if (lfe->sf_req == lfe->sf_req_thread) { @@ -2164,6 +2177,8 @@ satip_frontend_hacks( satip_frontend_t *lfe ) } else if (strstr(sd->sd_info.manufacturer, "AVM Berlin") && strstr(sd->sd_info.modelname, "FRITZ!")) { lfe->sf_play2 = 1; + } else if (strstr(sd->sd_info.modelname, "EyeTV Netstream 4C")) { + lfe->sf_specinv = 1; } } @@ -2244,6 +2259,7 @@ satip_frontend_create lfe->sf_netlimit = 1; lfe->sf_netgroup = 0; + /* Callbacks */ lfe->mi_get_weight = satip_frontend_get_weight; lfe->mi_get_priority = satip_frontend_get_priority; diff --git a/src/input/mpegts/satip/satip_private.h b/src/input/mpegts/satip/satip_private.h index c7a2615b7..aabd10828 100644 --- a/src/input/mpegts/satip/satip_private.h +++ b/src/input/mpegts/satip/satip_private.h @@ -86,6 +86,7 @@ struct satip_device int sd_pids_max; int sd_pids_len; int sd_pids_deladd; + int sd_fe; int sd_sig_scale; char *sd_tunercfg; int sd_pids21; @@ -146,6 +147,7 @@ struct satip_frontend int sf_grace_period; int sf_teardown_delay; int sf_pass_weight; + int sf_specinv; int sf_delsys; char *sf_tuner_bindaddr; @@ -283,6 +285,8 @@ satip_satconf_t *satip_satconf_get_position #define SATIP_SETUP_PLAY (1<<1) #define SATIP_SETUP_PILOT_ON (1<<2) #define SATIP_SETUP_PIDS21 (1<<3) +#define SATIP_SETUP_FE (1<<4) +#define SATIP_SETUP_SPECINV (1<<5) int satip_rtsp_setup( http_client_t *hc, diff --git a/src/input/mpegts/satip/satip_rtsp.c b/src/input/mpegts/satip/satip_rtsp.c index 2f03b9bd8..f727cd5e7 100644 --- a/src/input/mpegts/satip/satip_rtsp.c +++ b/src/input/mpegts/satip/satip_rtsp.c @@ -157,7 +157,10 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe, sprintf(buf, "src=%i&", src); else buf[0] = '\0'; - sprintf(buf + strlen(buf), "fe=%i", fe); + + if (flags & SATIP_SETUP_FE) + sprintf(buf + strlen(buf), "fe=%i", fe); + if (dmc->dmc_fe_delsys == DVB_SYS_DVBS || dmc->dmc_fe_delsys == DVB_SYS_DVBS2) { satip_rtsp_add_val("freq", buf, dmc->dmc_fe_freq); @@ -196,6 +199,11 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe, dmc->u.dmc_fe_qam.fec_inner != DVB_FEC_AUTO) /* note: OctopusNet device does not handle 'fec=auto' */ ADD(u.dmc_fe_qam.fec_inner, fec, "auto"); + + // for sat>ip compliance + if (flags & SATIP_SETUP_SPECINV) + strcat(buf, "&specinv=0"); + } else if (dmc->dmc_fe_delsys == DVB_SYS_DVBT || dmc->dmc_fe_delsys == DVB_SYS_DVBT2) { satip_rtsp_add_val("freq", buf, dmc->dmc_fe_freq / 1000);