Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes requested by perexg
  • Loading branch information
WereCatf authored and perexg committed May 5, 2015
1 parent 9b73ad4 commit 6a9cdc8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 21 deletions.
7 changes: 3 additions & 4 deletions docs/html/config_tvadapters.html
Expand Up @@ -194,17 +194,16 @@ <h3>The adapters and tuners are listed / edited in a tree</h3>
allows you to override that. Any value below 1 or above 32 is ignored.
For now this setting requires a restart of tvheadend.</dd>
<p>
<dt><b>Enable FRITZ!Box-workarounds</b><dt>
<dd>Turns off full mux - and addpids/delpids - support, turns on PIDs in setup,
and enables one specific workaround for buggy FRITZ!-devices.</dd>
<dt><b>PIDs 21 in setup</b><dt>
<dd>Enable, if the SAT>IP box requires pids=21 parameter in the SETUP RTSP command.</dd>
<p>
<dt><b>Force teardown delay</b><dt>
<dd>Force the delay between RTSP TEARDOWN and RTSP SETUP command (value
from 'Next tune delay in ms' is used). Some devices are not able to handle
quick continuous tuning.</dd>
<p>
<dt><b>Tuner bind IP address</b><dt>
<dd>Force all network connections to this tuner be made over the specificed
<dd>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.</dd>

Expand Down
18 changes: 7 additions & 11 deletions src/input/mpegts/satip/satip.c
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand All @@ -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,
Expand Down Expand Up @@ -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]);
Expand All @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -1220,8 +1220,8 @@ satip_frontend_input_thread ( void *aux )
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)
Expand Down
4 changes: 2 additions & 2 deletions src/input/mpegts/satip/satip_private.h
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions src/input/mpegts/satip/satip_rtsp.c
Expand Up @@ -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",
Expand Down

0 comments on commit 6a9cdc8

Please sign in to comment.