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-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=772bcf4c8ab0103fff65d710a5d0b2815166696f;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 798f8898e..6225fd5cd 100644 --- a/src/input/mpegts/satip/satip.c +++ b/src/input/mpegts/satip/satip.c @@ -324,7 +324,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 9e38919c0..981ef5171 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -216,6 +216,17 @@ satip_frontend_transport_mode_list ( void *o, const char *lang ) return strtab2htsmsg(tab, 1, lang); } +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 = @@ -297,7 +308,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 " @@ -308,10 +319,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, @@ -1815,10 +1827,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 aabd10828..9ead5b15f 100644 --- a/src/input/mpegts/satip/satip_private.h +++ b/src/input/mpegts/satip/satip_private.h @@ -286,7 +286,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 f727cd5e7..868c58875 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) {