Mercurial > mplayer.hg
changeset 13155:fd40ef23053b
added forgotten dvb-t params lp_coderate and hierarchy
author | nicodvb |
---|---|
date | Thu, 26 Aug 2004 19:38:16 +0000 |
parents | 49e62ed38b38 |
children | ccce2d564161 |
files | libmpdemux/dvb_tune.c libmpdemux/dvbin.c libmpdemux/dvbin.h |
diffstat | 3 files changed, 52 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/dvb_tune.c Thu Aug 26 19:18:05 2004 +0000 +++ b/libmpdemux/dvb_tune.c Thu Aug 26 19:38:16 2004 +0000 @@ -227,18 +227,20 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int srate, char pol, int tone, fe_spectral_inversion_t specInv, unsigned int diseqc, fe_modulation_t modulation, fe_code_rate_t HP_CodeRate, - fe_transmit_mode_t TransmissionMode, fe_guard_interval_t guardInterval, fe_bandwidth_t bandwidth); + fe_transmit_mode_t TransmissionMode, fe_guard_interval_t guardInterval, fe_bandwidth_t bandwidth, + fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier); int dvb_tune(dvb_priv_t *priv, int freq, char pol, int srate, int diseqc, int tone, fe_spectral_inversion_t specInv, fe_modulation_t modulation, fe_guard_interval_t guardInterval, - fe_transmit_mode_t TransmissionMode, fe_bandwidth_t bandWidth, fe_code_rate_t HP_CodeRate) + fe_transmit_mode_t TransmissionMode, fe_bandwidth_t bandWidth, fe_code_rate_t HP_CodeRate, + fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier) { int ris; mp_msg(MSGT_DEMUX, MSGL_INFO, "dvb_tune Freq: %lu\n", (long unsigned int) freq); - ris = tune_it(priv->fe_fd, priv->sec_fd, freq, srate, pol, tone, specInv, diseqc, modulation, HP_CodeRate, TransmissionMode, guardInterval, bandWidth); + ris = tune_it(priv->fe_fd, priv->sec_fd, freq, srate, pol, tone, specInv, diseqc, modulation, HP_CodeRate, TransmissionMode, guardInterval, bandWidth, LP_CodeRate, hier); if(ris != 0) mp_msg(MSGT_DEMUX, MSGL_INFO, "dvb_tune, TUNING FAILED\n"); @@ -623,7 +625,8 @@ static int tune_it(int fd_frontend, int fd_sec, unsigned int freq, unsigned int srate, char pol, int tone, fe_spectral_inversion_t specInv, unsigned int diseqc, fe_modulation_t modulation, fe_code_rate_t HP_CodeRate, - fe_transmit_mode_t TransmissionMode, fe_guard_interval_t guardInterval, fe_bandwidth_t bandwidth) + fe_transmit_mode_t TransmissionMode, fe_guard_interval_t guardInterval, fe_bandwidth_t bandwidth, + fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier) { int res, hi_lo, dfd; #ifdef HAVE_DVB_HEAD @@ -660,22 +663,22 @@ feparams.inversion=specInv; feparams.u.ofdm.bandwidth=bandwidth; feparams.u.ofdm.code_rate_HP=HP_CodeRate; - feparams.u.ofdm.code_rate_LP=LP_CODERATE_DEFAULT; + feparams.u.ofdm.code_rate_LP=LP_CodeRate; feparams.u.ofdm.constellation=modulation; feparams.u.ofdm.transmission_mode=TransmissionMode; feparams.u.ofdm.guard_interval=guardInterval; - feparams.u.ofdm.hierarchy_information=HIERARCHY_DEFAULT; + feparams.u.ofdm.hierarchy_information=hier; #else if (freq < 1000000) freq*=1000UL; feparams.Frequency=freq; feparams.Inversion=specInv; feparams.u.ofdm.bandWidth=bandwidth; feparams.u.ofdm.HP_CodeRate=HP_CodeRate; - feparams.u.ofdm.LP_CodeRate=LP_CODERATE_DEFAULT; + feparams.u.ofdm.LP_CodeRate=LP_CodeRate; feparams.u.ofdm.Constellation=modulation; feparams.u.ofdm.TransmissionMode=TransmissionMode; feparams.u.ofdm.guardInterval=guardInterval; - feparams.u.ofdm.HierarchyInformation=HIERARCHY_DEFAULT; + feparams.u.ofdm.HierarchyInformation=hier; #endif mp_msg(MSGT_DEMUX, MSGL_V, "tuning DVB-T (%s) to %d Hz, bandwidth: %d\n",DVB_T_LOCATION,freq, bandwidth); break;
--- a/libmpdemux/dvbin.c Thu Aug 26 19:18:05 2004 +0000 +++ b/libmpdemux/dvbin.c Thu Aug 26 19:38:16 2004 +0000 @@ -114,7 +114,8 @@ extern int dvb_tune(dvb_priv_t *priv, int freq, char pol, int srate, int diseqc, int tone, fe_spectral_inversion_t specInv, fe_modulation_t modulation, fe_guard_interval_t guardInterval, - fe_transmit_mode_t TransmissionMode, fe_bandwidth_t bandWidth, fe_code_rate_t HP_CodeRate); + fe_transmit_mode_t TransmissionMode, fe_bandwidth_t bandWidth, fe_code_rate_t HP_CodeRate, + fe_code_rate_t LP_CodeRate, fe_hierarchy_t hier); extern char *dvb_dvrdev[4], *dvb_demuxdev[4], *dvb_frontenddev[4]; static dvb_config_t *dvb_config = NULL; @@ -301,6 +302,41 @@ else if(! strcmp(gi, "GUARD_INTERVAL_1_8")) ptr->gi = GUARD_INTERVAL_1_8; else ptr->gi = GUARD_INTERVAL_1_4; + + if(! strcmp(tmp_lcr, "FEC_1_2")) + ptr->cr_lp =FEC_1_2; + else if(! strcmp(tmp_lcr, "FEC_2_3")) + ptr->cr_lp =FEC_2_3; + else if(! strcmp(tmp_lcr, "FEC_3_4")) + ptr->cr_lp =FEC_3_4; +#ifdef HAVE_DVB_HEAD + else if(! strcmp(tmp_lcr, "FEC_4_5")) + ptr->cr_lp =FEC_4_5; + else if(! strcmp(tmp_lcr, "FEC_6_7")) + ptr->cr_lp =FEC_6_7; + else if(! strcmp(tmp_lcr, "FEC_8_9")) + ptr->cr_lp =FEC_8_9; +#endif + else if(! strcmp(tmp_lcr, "FEC_5_6")) + ptr->cr_lp =FEC_5_6; + else if(! strcmp(tmp_lcr, "FEC_7_8")) + ptr->cr_lp =FEC_7_8; + else if(! strcmp(tmp_lcr, "FEC_NONE")) + ptr->cr_lp =FEC_NONE; + else ptr->cr_lp =FEC_AUTO; + + + if(! strcmp(tmp_hier, "HIERARCHY_1")) + ptr->hier = HIERARCHY_1; + else if(! strcmp(tmp_hier, "HIERARCHY_2")) + ptr->hier = HIERARCHY_2; + else if(! strcmp(tmp_hier, "HIERARCHY_4")) + ptr->hier = HIERARCHY_4; +#ifdef HAVE_DVB_HEAD + else if(! strcmp(tmp_hier, "HIERARCHY_AUTO")) + ptr->hier = HIERARCHY_AUTO; +#endif + else ptr->hier = HIERARCHY_NONE; } tmp = (dvb_channel_t*)realloc(list->channels, sizeof(dvb_channel_t) * (list->NUM_CHANNELS + 1)); @@ -473,7 +509,7 @@ if(do_tuning) if (! dvb_tune(priv, channel->freq, channel->pol, channel->srate, channel->diseqc, channel->tone, - channel->inv, channel->mod, channel->gi, channel->trans, channel->bw, channel->cr)) + channel->inv, channel->mod, channel->gi, channel->trans, channel->bw, channel->cr, channel->cr_lp, channel->hier)) return 0;
--- a/libmpdemux/dvbin.h Thu Aug 26 19:18:05 2004 +0000 +++ b/libmpdemux/dvbin.h Thu Aug 26 19:38:16 2004 +0000 @@ -19,6 +19,7 @@ #define fe_transmit_mode_t TransmitMode #define fe_guard_interval_t GuardInterval #define fe_bandwidth_t BandWidth + #define fe_hierarchy_t Hierarchy #define fe_sec_voltage_t SecVoltage #define dmx_pes_filter_params dmxPesFilterParams #define dmx_sct_filter_params dmxSctFilterParams @@ -46,7 +47,8 @@ fe_transmit_mode_t trans; fe_bandwidth_t bw; fe_guard_interval_t gi; - fe_code_rate_t cr; + fe_code_rate_t cr, cr_lp; + fe_hierarchy_t hier; } dvb_channel_t;