]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
implement netsream 4c
authorMartina Pietruschka <martina.pietruschka@guso.de>
Mon, 30 Jul 2018 13:02:50 +0000 (15:02 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 3 Sep 2018 14:08:31 +0000 (16:08 +0200)
Conflicts:
src/input/mpegts/satip/satip_private.h

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 c195c17beaf3716f27b0b0176f5e4f28e36bd3ae..303cb05f639d7a62c97047f925c434006518ceae 100644 (file)
@@ -313,6 +313,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",
@@ -564,6 +573,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;
   }
 }
 
@@ -590,6 +601,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;
 
index 1d4698f153b6fbf7d1b1e4cdea8713e13437b470..9e89d852ca1052dbfece2d3fd8fdabfe12bf7bab 100644 (file)
@@ -216,6 +216,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",
@@ -1646,6 +1654,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) {
@@ -2050,6 +2063,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;
   }
 }
 
@@ -2130,6 +2145,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;
index 0d601f48c2e382afbd9cc48e5d2bb9e0c1bc812b..993f9184f5b342fa78dad5e0b24c30036cd26bcc 100644 (file)
@@ -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;
@@ -138,6 +139,7 @@ struct satip_frontend
   int                        sf_grace_period;
   int                        sf_teardown_delay;
   int                        sf_pass_weight;
+  int                        sf_specinv;
   char                      *sf_tuner_bindaddr;
 
   /*
@@ -272,6 +274,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,
index bc57d19ac37a47d4d3d317e4940e577919a93847..458bc2254a68af988e1969e2340065d3933da0e4 100644 (file)
@@ -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);