mpegts: add new pilot option and fix defaults for DVB-S
I have kept the AUTO options, but have magically translated them for DVB-S under the hood.
This commit is contained in:
parent
daf27654b4
commit
49212a2ead
5 changed files with 54 additions and 2 deletions
|
@ -215,6 +215,7 @@ typedef struct dvb_mux_conf
|
|||
fe_modulation_t dmc_fe_modulation;
|
||||
fe_delivery_system_t dmc_fe_delsys;
|
||||
fe_rolloff_t dmc_fe_rolloff;
|
||||
fe_pilot_t dmc_fe_pilot;
|
||||
#endif
|
||||
|
||||
// For scan file configurations
|
||||
|
@ -238,6 +239,7 @@ const char *dvb_guard2str ( int guard );
|
|||
const char *dvb_hier2str ( int hier );
|
||||
const char *dvb_pol2str ( int pol );
|
||||
const char *dvb_type2str ( int type );
|
||||
const char *dvb_pilot2str ( int pilot );
|
||||
#define dvb_feclo2str dvb_fec2str
|
||||
#define dvb_fechi2str dvb_fec2str
|
||||
|
||||
|
@ -251,6 +253,7 @@ int dvb_str2guard ( const char *str );
|
|||
int dvb_str2hier ( const char *str );
|
||||
int dvb_str2pol ( const char *str );
|
||||
int dvb_str2type ( const char *str );
|
||||
int dvb_str2pilot ( const char *str );
|
||||
#define dvb_str2feclo dvb_str2fec
|
||||
#define dvb_str2fechi dvb_str2fec
|
||||
|
||||
|
|
|
@ -113,6 +113,7 @@ dvb_desc_sat_del
|
|||
}
|
||||
|
||||
memset(&dmc, 0, sizeof(dmc));
|
||||
dmc.dmc_fe_pilot = PILOT_AUTO;
|
||||
dmc.dmc_fe_params.inversion = INVERSION_AUTO;
|
||||
dmc.dmc_fe_params.frequency = frequency;
|
||||
dmc.dmc_fe_orbital_pos = bcdtoint(ptr[4]) * 100 + bcdtoint(ptr[5]);
|
||||
|
|
|
@ -513,6 +513,13 @@ const static struct strtab typetab[] = {
|
|||
{"ATSC", FE_ATSC},
|
||||
};
|
||||
dvb_str2val(type);
|
||||
|
||||
const static struct strtab pilottab[] = {
|
||||
{"AUTO", PILOT_AUTO},
|
||||
{"ON", PILOT_ON},
|
||||
{"OFF", PILOT_OFF}
|
||||
};
|
||||
dvb_str2val(pilot);
|
||||
#undef dvb_str2val
|
||||
|
||||
/*
|
||||
|
|
|
@ -707,8 +707,14 @@ linuxdvb_frontend_tune0
|
|||
} else if (lfe->lfe_info.type == FE_QPSK) {
|
||||
S2CMD(DTV_SYMBOL_RATE, p->u.qpsk.symbol_rate);
|
||||
S2CMD(DTV_INNER_FEC, p->u.qpsk.fec_inner);
|
||||
S2CMD(DTV_MODULATION, dmc->dmc_fe_modulation);
|
||||
S2CMD(DTV_ROLLOFF, dmc->dmc_fe_rolloff);
|
||||
S2CMD(DTV_PILOT, dmc->dmc_fe_pilot);
|
||||
if (lm->lm_tuning.dmc_fe_delsys == SYS_DVBS) {
|
||||
S2CMD(DTV_MODULATION, QPSK);
|
||||
S2CMD(DTV_ROLLOFF, ROLLOFF_35);
|
||||
} else {
|
||||
S2CMD(DTV_MODULATION, dmc->dmc_fe_modulation);
|
||||
S2CMD(DTV_ROLLOFF, dmc->dmc_fe_rolloff);
|
||||
}
|
||||
|
||||
/* ATSC */
|
||||
} else {
|
||||
|
|
|
@ -369,6 +369,31 @@ linuxdvb_mux_dvbs_class_rolloff_list ( void *o )
|
|||
htsmsg_add_str(list, NULL, dvb_rolloff2str(ROLLOFF_AUTO));
|
||||
return list;
|
||||
}
|
||||
|
||||
static const void *
|
||||
linuxdvb_mux_dvbs_class_pilot_get ( void *o )
|
||||
{
|
||||
static const char *s;
|
||||
linuxdvb_mux_t *lm = o;
|
||||
s = dvb_pilot2str(lm->lm_tuning.dmc_fe_pilot);
|
||||
return &s;
|
||||
}
|
||||
static int
|
||||
linuxdvb_mux_dvbs_class_pilot_set ( void *o, const void *s )
|
||||
{
|
||||
linuxdvb_mux_t *lm = o;
|
||||
lm->lm_tuning.dmc_fe_pilot = dvb_str2pilot(s);
|
||||
return 1;
|
||||
}
|
||||
static htsmsg_t *
|
||||
linuxdvb_mux_dvbs_class_pilot_list ( void *o )
|
||||
{
|
||||
htsmsg_t *list = htsmsg_create_list();
|
||||
htsmsg_add_str(list, NULL, dvb_pilot2str(PILOT_AUTO));
|
||||
htsmsg_add_str(list, NULL, dvb_pilot2str(PILOT_ON));
|
||||
htsmsg_add_str(list, NULL, dvb_pilot2str(PILOT_OFF));
|
||||
return list;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define linuxdvb_mux_dvbs_class_delsys_get linuxdvb_mux_class_delsys_get
|
||||
|
@ -430,6 +455,15 @@ const idclass_t linuxdvb_mux_dvbs_class =
|
|||
.list = linuxdvb_mux_dvbs_class_rolloff_list,
|
||||
.def.s = "AUTO"
|
||||
},
|
||||
{
|
||||
.type = PT_STR,
|
||||
.id = "pilot",
|
||||
.name = "Pilot",
|
||||
.opts = PO_ADVANCED,
|
||||
.set = linuxdvb_mux_dvbs_class_pilot_set,
|
||||
.get = linuxdvb_mux_dvbs_class_pilot_get,
|
||||
.list = linuxdvb_mux_dvbs_class_pilot_list,
|
||||
},
|
||||
#endif
|
||||
{}
|
||||
}
|
||||
|
@ -559,6 +593,7 @@ linuxdvb_mux_create0
|
|||
|
||||
/* Defaults */
|
||||
lm->lm_tuning.dmc_fe_params.inversion = INVERSION_AUTO;
|
||||
lm->lm_tuning.dmc_fe_pilot = PILOT_AUTO;
|
||||
|
||||
/* No config */
|
||||
if (!conf) return lm;
|
||||
|
|
Loading…
Add table
Reference in a new issue