From: Jaroslav Kysela Date: Mon, 15 May 2017 13:57:23 +0000 (+0200) Subject: satip client: add 'Grace period' option for tuner, fixes #4333 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee76167205559add012953bf2ff63d494114df4f;p=thirdparty%2Ftvheadend.git satip client: add 'Grace period' option for tuner, fixes #4333 --- diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 54bfc3abf..a6e162226 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -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; diff --git a/src/input/mpegts/satip/satip_private.h b/src/input/mpegts/satip/satip_private.h index c7082c61c..1955c3794 100644 --- a/src/input/mpegts/satip/satip_private.h +++ b/src/input/mpegts/satip/satip_private.h @@ -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;