]> 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:02:33 +0000 (16:02 +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 798f8898ec1a134550a9004f6acf84c05073f6f6..6225fd5cd9e441332ecef2510f6cd71080b49ba7 100644 (file)
@@ -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),
     },
index 9e38919c0e59a95a638c4ff151aa3151ecb41f5b..981ef5171f95cc678a7ee049735690822d9af7a1 100644 (file)
@@ -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);
index aabd10828fe38456c3a06255adb3f9f029dfead1..9ead5b15ffef610dfdb08980ea7c5d7658ec6728 100644 (file)
@@ -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,
index f727cd5e74a85fbe3713b75b4cbcb78aad39674c..868c5887504d66c132050615d407dbeab2e2b1ee 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) {