]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
satip client: add 'Grace period' option for tuner, fixes #4333
authorJaroslav Kysela <perex@perex.cz>
Mon, 15 May 2017 13:57:23 +0000 (15:57 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 May 2017 09:13:11 +0000 (11:13 +0200)
src/input/mpegts/satip/satip_frontend.c
src/input/mpegts/satip/satip_private.h

index 54bfc3abff12ad0918acf3319a98ee527730ac65..a6e1622261dab10ae27e54ed295cee1c46bda2b9 100644 (file)
@@ -185,6 +185,17 @@ const idclass_t satip_frontend_class =
       .opts     = PO_ADVANCED,
       .off      = offsetof(satip_frontend_t, sf_play2),
     },
+    {
+      .type     = PT_INT,
+      .id       = "grace_period",
+      .name     = N_("Grace period"),
+      .desc     = N_("Force the grace period for which SAT>IP client waits "
+                     "for the data from server. After this grace period, "
+                     "the tuner is handled as dead. The default value is "
+                     "5 seconds (for DVB-S/S2: 10 seconds)."),
+      .opts     = PO_ADVANCED,
+      .off      = offsetof(satip_frontend_t, sf_grace_period),
+    },
     {
       .type     = PT_BOOL,
       .id       = "teardown_delay",
@@ -449,7 +460,7 @@ static int
 satip_frontend_get_grace ( mpegts_input_t *mi, mpegts_mux_t *mm )
 {
   satip_frontend_t *lfe = (satip_frontend_t*)mi;
-  int r = 5;
+  int r = lfe->sf_grace_period > 0 ? MINMAX(lfe->sf_grace_period, 1, 60) : 5;
   if (lfe->sf_positions || lfe->sf_master)
     r = MINMAX(satip_satconf_get_grace(lfe, mm) ?: 10, r, 60);
   return r;
index c7082c61c589425a63358ca85fb7896c6e713330..1955c379402ba954bc81296aeaecaf32d4c6e6cf 100644 (file)
@@ -135,6 +135,7 @@ struct satip_frontend
   int                        sf_udp_rtp_port;
   int                        sf_play2;
   int                        sf_tdelay;
+  int                        sf_grace_period;
   int                        sf_teardown_delay;
   int                        sf_pass_weight;
   char                      *sf_tuner_bindaddr;