Skip to content

Commit

Permalink
satip client: add 'Grace period' option for tuner, fixes #4333
Browse files Browse the repository at this point in the history
  • Loading branch information
perexg committed May 15, 2017
1 parent 0174f65 commit ee76167
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/input/mpegts/satip/satip_private.h
Expand Up @@ -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;
Expand Down

0 comments on commit ee76167

Please sign in to comment.