From: Jaroslav Kysela Date: Mon, 3 Sep 2018 14:02:33 +0000 (+0200) Subject: satip client: make specinv parameter tri-state (allows specinv=1) X-Git-Tag: v4.2.7~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6c64db671245428307f94ad0283c7357f98d85a;p=thirdparty%2Ftvheadend.git satip client: make specinv parameter tri-state (allows specinv=1) --- diff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c index 303cb05f6..c17117165 100644 --- a/src/input/mpegts/satip/satip.c +++ b/src/input/mpegts/satip/satip.c @@ -318,7 +318,9 @@ const idclass_t satip_device_class = .id = "fe", .name = N_("FE supported"), .desc = N_("Enable if the SAT>IP box supports the frontend " - "identifier."), + "identifier. This allows the auto-tuner allocation, " + "but it might cause trouble for boxes with different " + "tuner reception connections like satellite inputs."), .opts = PO_ADVANCED, .off = offsetof(satip_device_t, sd_fe), }, diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 92173754f..cce839c03 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -136,6 +136,17 @@ satip_frontend_class_override_enum( void * p, const char *lang ) return m; } +static htsmsg_t * +satip_frontend_specinv_list ( void *o, const char *lang ) +{ + static const struct strtab tab[] = { + { N_("Do not use"), 0 }, + { N_("Off"), 1 }, + { N_("On"), 2 }, + }; + return strtab2htsmsg(tab, 1, lang); +} + CLASS_DOC(satip_frontend) const idclass_t satip_frontend_class = @@ -208,7 +219,7 @@ const idclass_t satip_frontend_class = .off = offsetof(satip_frontend_t, sf_teardown_delay), }, { - .type = PT_BOOL, + .type = PT_INT, .id = "pass_weight", .name = N_("Pass subscription weight"), .desc = N_("Pass subscription weight to the SAT>IP server " @@ -219,10 +230,11 @@ const idclass_t satip_frontend_class = { .type = PT_BOOL, .id = "specinv", - .name = N_("Pass SPECINV"), - .desc = N_("Pass Spectrum inversion."), + .name = N_("Pass specinv"), + .desc = N_("Pass Spectrum inversion to the SAT>IP server."), .opts = PO_ADVANCED, .off = offsetof(satip_frontend_t, sf_specinv), + .list = satip_frontend_specinv_list, }, { .type = PT_STR, @@ -1654,10 +1666,12 @@ 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_specinv == 0) + rtsp_flags |= SATIP_SETUP_SPECINV0; + else if (lfe->sf_specinv > 0) + rtsp_flags |= SATIP_SETUP_SPECINV1; if (lfe->sf_device->sd_fe) - rtsp_flags |= SATIP_SETUP_FE; + rtsp_flags |= SATIP_SETUP_FE; r = -12345678; pthread_mutex_lock(&lfe->sf_dvr_lock); diff --git a/src/input/mpegts/satip/satip_private.h b/src/input/mpegts/satip/satip_private.h index 993f9184f..bcfd831ec 100644 --- a/src/input/mpegts/satip/satip_private.h +++ b/src/input/mpegts/satip/satip_private.h @@ -275,7 +275,8 @@ satip_satconf_t *satip_satconf_get_position #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) +#define SATIP_SETUP_SPECINV0 (1<<5) +#define SATIP_SETUP_SPECINV1 (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 458bc2254..c79645fe1 100644 --- a/src/input/mpegts/satip/satip_rtsp.c +++ b/src/input/mpegts/satip/satip_rtsp.c @@ -201,8 +201,10 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe, ADD(u.dmc_fe_qam.fec_inner, fec, "auto"); // for sat>ip compliance - if (flags & SATIP_SETUP_SPECINV) - strcat(buf, "&specinv=0"); + if (flags & SATIP_SETUP_SPECINV0) + strcat(buf, "&specinv=0"); + else if (flags & SATIP_SETUP_SPECINV1) + strcat(buf, "&specinv=1"); } else if (dmc->dmc_fe_delsys == DVB_SYS_DVBT || dmc->dmc_fe_delsys == DVB_SYS_DVBT2) {