Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SAT>IP client: add 'Fast input switch', fixes #2943
This option always closes the RTSP session when muxes are
changed instead reusing of it.
  • Loading branch information
perexg committed Oct 5, 2015
1 parent 796ac2d commit c26b2ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/input/mpegts/satip/satip.c
Expand Up @@ -206,6 +206,13 @@ const idclass_t satip_device_class =
.notify = satip_device_class_tunercfg_notify,
.def.s = "Auto"
},
{
.type = PT_BOOL,
.id = "fast_switch",
.name = N_("Fast input switch"),
.opts = PO_ADVANCED,
.off = offsetof(satip_device_t, sd_fast_switch),
},
{
.type = PT_BOOL,
.id = "fullmux_ok",
Expand Down Expand Up @@ -480,6 +487,7 @@ satip_device_create( satip_device_info_t *info )
conf = hts_settings_load("input/satip/adapters/%s", uuid.hex);

/* some sane defaults */
sd->sd_fast_switch = 1;
sd->sd_fullmux_ok = 1;
sd->sd_pids_len = 127;
sd->sd_pids_max = 32;
Expand Down
3 changes: 3 additions & 0 deletions src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -1022,6 +1022,9 @@ satip_frontend_input_thread ( void *aux )
rtcp = rtp = NULL;
lfe_master = NULL;

if (rtsp && !lfe->sf_device->sd_fast_switch)
satip_frontend_close_rtsp(lfe, efd, &rtsp);

memset(ev, 0, sizeof(ev));
ev[0].events = TVHPOLL_IN;
ev[0].fd = lfe->sf_dvr_pipe.rd;
Expand Down
1 change: 1 addition & 0 deletions src/input/mpegts/satip/satip_private.h
Expand Up @@ -79,6 +79,7 @@ struct satip_device
* RTSP
*/
char *sd_bindaddr;
int sd_fast_switch;
int sd_fullmux_ok;
int sd_pids_max;
int sd_pids_len;
Expand Down

0 comments on commit c26b2ed

Please sign in to comment.