From 6a9cdc8b4c7bc60283649ae911dfc9257b9a8e32 Mon Sep 17 00:00:00 2001 From: WereCatf Date: Tue, 5 May 2015 21:41:01 +0300 Subject: [PATCH] Fixes requested by perexg --- docs/html/config_tvadapters.html | 7 +++---- src/input/mpegts/satip/satip.c | 18 +++++++----------- src/input/mpegts/satip/satip_frontend.c | 4 ++-- src/input/mpegts/satip/satip_private.h | 4 ++-- src/input/mpegts/satip/satip_rtsp.c | 5 +++-- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/docs/html/config_tvadapters.html b/docs/html/config_tvadapters.html index 61921eef7..65abe6a91 100644 --- a/docs/html/config_tvadapters.html +++ b/docs/html/config_tvadapters.html @@ -194,9 +194,8 @@ setting this to 100. allows you to override that. Any value below 1 or above 32 is ignored. For now this setting requires a restart of tvheadend.

-

Enable FRITZ!Box-workarounds
-
Turns off full mux - and addpids/delpids - support, turns on PIDs in setup, - and enables one specific workaround for buggy FRITZ!-devices.
+
PIDs 21 in setup
+
Enable, if the SAT>IP box requires pids=21 parameter in the SETUP RTSP command.

Force teardown delay
Force the delay between RTSP TEARDOWN and RTSP SETUP command (value @@ -204,7 +203,7 @@ setting this to 100.
quick continuous tuning.

Tuner bind IP address
-
Force all network connections to this tuner be made over the specificed +
Force all network connections to this tuner to be made over the specified IP-address, similar to the setting for the SAT-IP - device itself. Setting this overrides the device - specific setting.
diff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c index f44e49afb..d53e58ba2 100644 --- a/src/input/mpegts/satip/satip.c +++ b/src/input/mpegts/satip/satip.c @@ -204,10 +204,10 @@ const idclass_t satip_device_class = }, { .type = PT_BOOL, - .id = "fritzquirks", - .name = "Enable FRITZ!Box-workarounds", + .id = "pids21", + .name = "PIDs 21 in setup", .opts = PO_ADVANCED, - .off = offsetof(satip_device_t, sd_fritz_quirk), + .off = offsetof(satip_device_t, sd_pids21), }, { .type = PT_INT, @@ -415,6 +415,7 @@ satip_device_create( satip_device_info_t *info ) satip_device_calc_uuid(&uuid, info->uuid); conf = hts_settings_load("input/satip/adapters/%s", uuid.hex); + /* some sane defaults */ sd->sd_fullmux_ok = 1; sd->sd_pids_len = 127; @@ -429,7 +430,7 @@ satip_device_create( satip_device_info_t *info ) sd->sd_fullmux_ok = 0; sd->sd_pids_deladd = 0; sd->sd_pids0 = 1; - sd->sd_fritz_quirk = 1; + sd->sd_pids21 = 1; } if (!tvh_hardware_create0((tvh_hardware_t*)sd, &satip_device_class, @@ -509,7 +510,8 @@ satip_device_create( satip_device_info_t *info ) m = atoi(argv[i] + 6); v2 = 2; } - if (sd->sd_tunercfg_override > 0 && sd->sd_tunercfg_override < 33) m = sd->sd_tunercfg_override; + if (sd->sd_tunercfg_override > 0 && sd->sd_tunercfg_override < 33) + m = sd->sd_tunercfg_override; if (type == DVB_TYPE_NONE) { tvhlog(LOG_ERR, "satip", "%s: bad tuner type [%s]", satip_device_nicename(sd, buf2, sizeof(buf2)), argv[i]); @@ -525,12 +527,6 @@ satip_device_create( satip_device_info_t *info ) } } - if (sd->sd_fritz_quirk == 1) { - sd->sd_fullmux_ok = 0; - sd->sd_pids_deladd = 0; - sd->sd_pids0 = 1; - } - if (save) satip_device_save(sd); diff --git a/src/input/mpegts/satip/satip_frontend.c b/src/input/mpegts/satip/satip_frontend.c index 4c7bd18bc..92ebacf33 100644 --- a/src/input/mpegts/satip/satip_frontend.c +++ b/src/input/mpegts/satip/satip_frontend.c @@ -1220,8 +1220,8 @@ new_tune: rtsp_flags |= SATIP_SETUP_PIDS0; if (lfe->sf_device->sd_pilot_on) rtsp_flags |= SATIP_SETUP_PILOT_ON; - if (lfe->sf_device->sd_fritz_quirk) - rtsp_flags |= SATIP_SETUP_FRITZ_QUIRK; + if (lfe->sf_device->sd_pids21) + rtsp_flags |= SATIP_SETUP_PIDS21; r = -12345678; pthread_mutex_lock(&lfe->sf_dvr_lock); if (lfe->sf_req == lfe->sf_req_thread) diff --git a/src/input/mpegts/satip/satip_private.h b/src/input/mpegts/satip/satip_private.h index 340933243..afc029509 100644 --- a/src/input/mpegts/satip/satip_private.h +++ b/src/input/mpegts/satip/satip_private.h @@ -85,7 +85,7 @@ struct satip_device int sd_sig_scale; int sd_pids0; int sd_tunercfg_override; - int sd_fritz_quirk; + int sd_pids21; int sd_pilot_on; int sd_no_univ_lnb; int sd_dbus_allow; @@ -225,7 +225,7 @@ int satip_satconf_get_position #define SATIP_SETUP_PLAY (1<<0) #define SATIP_SETUP_PIDS0 (1<<1) #define SATIP_SETUP_PILOT_ON (1<<2) -#define SATIP_SETUP_FRITZ_QUIRK (1<<3) +#define SATIP_SETUP_PIDS21 (1<<3) int satip_rtsp_setup( http_client_t *hc, diff --git a/src/input/mpegts/satip/satip_rtsp.c b/src/input/mpegts/satip/satip_rtsp.c index 6c6723784..a5ffef4ba 100644 --- a/src/input/mpegts/satip/satip_rtsp.c +++ b/src/input/mpegts/satip/satip_rtsp.c @@ -222,9 +222,10 @@ satip_rtsp_setup( http_client_t *hc, int src, int fe, } if (flags & SATIP_SETUP_PIDS0) { strcat(buf, "&pids=0"); - if (flags & SATIP_SETUP_FRITZ_QUIRK) + if (flags & SATIP_SETUP_PIDS21) strcat(buf, ",21"); - } + } else if (flags & SATIP_SETUP_PIDS21) + strcat(buf, "&pids=21"); tvhtrace("satip", "setup params - %s", buf); if (hc->hc_rtsp_stream_id >= 0) snprintf(stream = _stream, sizeof(_stream), "/stream=%li", -- 2.47.2