Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SAT>IP: Change the default number of positions for IPLNB to 1
  • Loading branch information
perexg committed Nov 19, 2014
1 parent b0e31dd commit f34f872
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
14 changes: 9 additions & 5 deletions src/input/mpegts/satip/satip_frontend.c
Expand Up @@ -1411,14 +1411,18 @@ satip_frontend_tune1
* *************************************************************************/

static void
satip_frontend_hacks( satip_frontend_t *lfe )
satip_frontend_hacks( satip_frontend_t *lfe, int *def_positions )
{
satip_device_t *sd = lfe->sf_device;

lfe->sf_tdelay = 50; /* should not hurt anything */
if (strstr(lfe->sf_device->sd_info.location, ":8888/octonet.xml")) {
if (strstr(sd->sd_info.location, ":8888/octonet.xml")) {
if (lfe->sf_type == DVB_TYPE_S)
lfe->sf_play2 = 1;
lfe->sf_tdelay = 250;
lfe->sf_teardown_delay = 1;
} else if (!strcmp(sd->sd_info.modelname, "IPLNB")) {
*def_positions = 1;
}
}

Expand All @@ -1431,7 +1435,7 @@ satip_frontend_create
char id[16], lname[256];
satip_frontend_t *lfe;
uint32_t master = 0;
int i;
int i, def_positions = 4;

/* Override type */
snprintf(id, sizeof(id), "override #%d", num);
Expand Down Expand Up @@ -1483,7 +1487,7 @@ satip_frontend_create
lfe->sf_type_t2 = t2;
lfe->sf_master = master;
lfe->sf_type_override = override ? strdup(override) : NULL;
satip_frontend_hacks(lfe);
satip_frontend_hacks(lfe, &def_positions);
TAILQ_INIT(&lfe->sf_satconf);
pthread_mutex_init(&lfe->sf_dvr_lock, NULL);
lfe = (satip_frontend_t*)mpegts_input_create0((mpegts_input_t*)lfe, idc, uuid, conf);
Expand Down Expand Up @@ -1523,7 +1527,7 @@ satip_frontend_create

/* Create satconf */
if (lfe->sf_type == DVB_TYPE_S && master == 0)
satip_satconf_create(lfe, conf);
satip_satconf_create(lfe, conf, def_positions);

/* Slave networks update */
if (master) {
Expand Down
2 changes: 1 addition & 1 deletion src/input/mpegts/satip/satip_private.h
Expand Up @@ -195,7 +195,7 @@ void satip_satconf_save ( satip_frontend_t *lfe, htsmsg_t *m );
void satip_satconf_destroy ( satip_frontend_t *lfe );

void satip_satconf_create
( satip_frontend_t *lfe, htsmsg_t *conf );
( satip_frontend_t *lfe, htsmsg_t *conf, int def_positions );

void satip_satconf_updated_positions
( satip_frontend_t *lfe );
Expand Down
4 changes: 2 additions & 2 deletions src/input/mpegts/satip/satip_satconf.c
Expand Up @@ -256,7 +256,7 @@ satip_satconf_create0

void
satip_satconf_create
( satip_frontend_t *lfe, htsmsg_t *conf )
( satip_frontend_t *lfe, htsmsg_t *conf, int def_positions )
{
htsmsg_t *l, *e;
htsmsg_field_t *f;
Expand All @@ -272,7 +272,7 @@ satip_satconf_create
}

if (lfe->sf_positions == 0)
for ( ; lfe->sf_positions < 4; lfe->sf_positions++)
for ( ; lfe->sf_positions < def_positions; lfe->sf_positions++)
satip_satconf_create0(lfe, NULL, lfe->sf_positions);
}

Expand Down

0 comments on commit f34f872

Please sign in to comment.