]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
satip client: make specinv parameter tri-state (allows specinv=1)
authorJaroslav Kysela <perex@perex.cz>
Mon, 3 Sep 2018 14:02:33 +0000 (16:02 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 3 Sep 2018 14:09:15 +0000 (16:09 +0200)
src/input/mpegts/satip/satip.c
src/input/mpegts/satip/satip_frontend.c
src/input/mpegts/satip/satip_private.h
src/input/mpegts/satip/satip_rtsp.c

index 303cb05f639d7a62c97047f925c434006518ceae..c17117165541c1c22461cc85c99849fc00585e34 100644 (file)
@@ -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),
     },
index 92173754f0788cb6baa5ca9ca8bdd42d53e36a91..cce839c037e78d2578d0ff8582e4f38fbbc34d18 100644 (file)
@@ -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);
index 993f9184f5b342fa78dad5e0b24c30036cd26bcc..bcfd831ecc380e6f5751a8865afc45a589994287 100644 (file)
@@ -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,
index 458bc2254a68af988e1969e2340065d3933da0e4..c79645fe1b9a7023242bf8576c93d7a1febaedb9 100644 (file)
@@ -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) {