]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Restructuring
authorWereCatf <werecatf@gmail.com>
Tue, 5 May 2015 19:20:30 +0000 (22:20 +0300)
committerJaroslav Kysela <perex@perex.cz>
Tue, 5 May 2015 21:16:35 +0000 (23:16 +0200)
src/input/mpegts/satip/satip.c
src/input/mpegts/satip/satip_private.h

index d53e58ba2f16a30273e5a38ffcf3e8204961a7cb..1db5fc8422fb56ce12b4ca08d986e81abac48269 100644 (file)
@@ -223,6 +223,13 @@ const idclass_t satip_device_class =
       .opts     = PO_ADVANCED,
       .off      = offsetof(satip_device_t, sd_bindaddr),
     },
+    {
+      .type     = PT_BOOL,
+      .id       = "disablefritz",
+      .name     = "Disable FRITZ!-specific workarounds",
+      .opts     = PO_ADVANCED,
+      .off      = offsetof(satip_device_t, sd_no_fritz_workarounds),
+    },
     {
       .type     = PT_STR,
       .id       = "addr",
@@ -398,7 +405,15 @@ satip_device_hack( satip_device_t *sd )
     sd->sd_pids_max    = 128;
     sd->sd_pids_len    = 2048;
     sd->sd_no_univ_lnb = 1;
+  } else if (strstr(sd->sd_info.manufacturer, "AVM Berlin") &&
+             strstr(sd->sd_info.modelname, "FRITZ!") &&
+             sd->sd_no_fritz_workarounds != 1) {
+    sd->sd_fullmux_ok  = 0;
+    sd->sd_pids_deladd = 0;
+    sd->sd_pids0       = 1;
+    sd->sd_pids21       = 1;
   }
+
 }
 
 static satip_device_t *
@@ -424,15 +439,6 @@ satip_device_create( satip_device_info_t *info )
   sd->sd_sig_scale   = 240;
   sd->sd_dbus_allow  = 1;
 
-  /* safe defaults for FRITZ!-devices */
-  if (strstr(info->manufacturer, "AVM Berlin") &&
-             strstr(info->modelname, "FRITZ!")) {
-    sd->sd_fullmux_ok  = 0;
-    sd->sd_pids_deladd = 0;
-    sd->sd_pids0       = 1;
-    sd->sd_pids21 = 1;
-  }
-
   if (!tvh_hardware_create0((tvh_hardware_t*)sd, &satip_device_class,
                             uuid.hex, conf)) {
     /* Note: sd is freed in above fcn */
index afc029509f385c032461bcfeee4bac22c0fc3622..e01e5a94159af40de9562b62f83f4b8e44b4a2e1 100644 (file)
@@ -89,6 +89,7 @@ struct satip_device
   int                        sd_pilot_on;
   int                        sd_no_univ_lnb;
   int                        sd_dbus_allow;
+  int                        sd_no_fritz_workarounds;
   pthread_mutex_t            sd_tune_mutex;
 };