]> 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 13:50:51 +0000 (15:50 +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 5a630ce5d2035155278dc208595047dc0b08783c..798f8898ec1a134550a9004f6acf84c05073f6f6 100644 (file)
@@ -319,6 +319,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",
@@ -570,6 +579,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;
   }
 }
 
@@ -596,6 +607,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 3c29615fccefad602d64682dc79025f42b8d9105..21065608133adf5e872f372e3b5fffaba11a22e8 100644 (file)
@@ -305,6 +305,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",
@@ -1807,6 +1815,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) {
@@ -2164,6 +2177,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;
   }
 }
 
@@ -2244,6 +2259,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 c7a2615b74ce471bfc41cc5163498b4dbc79c12f..aabd10828fe38456c3a06255adb3f9f029dfead1 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;
@@ -146,6 +147,7 @@ struct satip_frontend
   int                        sf_grace_period;
   int                        sf_teardown_delay;
   int                        sf_pass_weight;
+  int                        sf_specinv;
   int                        sf_delsys;
   char                      *sf_tuner_bindaddr;
 
@@ -283,6 +285,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 2f03b9bd80074b291f8e2383d5a8327070da63d8..f727cd5e74a85fbe3713b75b4cbcb78aad39674c 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);