]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
SAT>IP client: add 'Fast input switch', fixes #2943
authorJaroslav Kysela <perex@perex.cz>
Mon, 5 Oct 2015 19:15:16 +0000 (21:15 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 5 Oct 2015 19:15:19 +0000 (21:15 +0200)
This option always closes the RTSP session when muxes are
changed instead reusing of it.

src/input/mpegts/satip/satip.c
src/input/mpegts/satip/satip_frontend.c
src/input/mpegts/satip/satip_private.h

index 259d1498441eaf2bd4d9a655e3d278fe56555a34..b559ea0cd4c1aeafb56cea1e4920e4d3c5c54c46 100644 (file)
@@ -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",
@@ -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;
index 99819bbd35333d31c8efe81ed9426b44562f32c9..1e9ab88436e7cc1f1dbf528d0d284816a0c43465 100644 (file)
@@ -1022,6 +1022,9 @@ new_tune:
   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;
index ce905a5b3d418a4c50a2bc2ed80ebe8c64ea4b2e..fc6b90523971b0308e74e5f245fdb3c0a74661ef 100644 (file)
@@ -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;