[vlc-devel] [PATCH 3/3] dtv: Thorough rewrite of BDA graph for Win32
Rémi Denis-Courmont
remi at remlab.net
Fri Mar 16 09:50:28 CET 2012
On Thu, 15 Mar 2012 21:54:29 +0100, John Freed <okvlc at johnfreed.com>
wrote:
> Changes approach to be based on tuner, rather than Windows registry.
> ---
> modules/access/dtv/access.c | 14 +-
> modules/access/dtv/bdadefs.h | 23 +-
> modules/access/dtv/bdagraph.cpp | 2005
> ++++++++++++++++++++++++++++-----------
> modules/access/dtv/bdagraph.hpp | 33 +-
> modules/access/dtv/dtv.h | 3 +
> 5 files changed, 1537 insertions(+), 541 deletions(-)
This patch is too big to review properly. It makes both my MUA and my
webmail horribly slow.
> diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
> index 624cb76..18dd216 100644
> --- a/modules/access/dtv/access.c
> +++ b/modules/access/dtv/access.c
> @@ -650,12 +650,12 @@ static const delsys_t *GuessSystem (const char
> *scheme, dvb_device_t *dev)
> return NULL;
> }
>
> +
??
> /** Set parameters and tune the device */
> static int Tune (vlc_object_t *obj, dvb_device_t *dev, const delsys_t
> *delsys,
> uint64_t freq)
> {
> if (delsys->setup (obj, dev, freq)
> - || dvb_set_inversion (dev, var_InheritInteger (obj,
"dvb-inversion"))
This is wrong and I already explained it privately.
> || dvb_tune (dev))
> return VLC_EGENERIC;
> return VLC_SUCCESS;
> @@ -840,6 +840,12 @@ static int sec_setup (vlc_object_t *obj,
dvb_device_t
> *dev, uint64_t freq)
> return dvb_set_sec (dev, freq, pol, lowf, highf, switchf);
> }
>
> +static int inversion_setup (vlc_object_t *obj, dvb_device_t *dev )
> +{
> + int inversion = var_InheritInteger (obj, "dvb-inversion");
> + return dvb_set_inversion (dev, inversion);
> +}
> +
No thank you.
> static int dvbs_setup (vlc_object_t *obj, dvb_device_t *dev, uint64_t
> freq)
> {
> uint32_t fec = var_InheritCodeRate (obj, "dvb-fec");
> @@ -848,6 +854,8 @@ static int dvbs_setup (vlc_object_t *obj,
dvb_device_t
> *dev, uint64_t freq)
> int ret = dvb_set_dvbs (dev, freq, srate, fec);
> if (ret == 0)
> ret = sec_setup (obj, dev, freq);
> + if (ret == 0)
> + ret = inversion_setup (obj, dev);
I *already* told you that this was not satellite specific.
Rejected.
> return ret;
> }
>
> @@ -862,6 +870,8 @@ static int dvbs2_setup (vlc_object_t *obj,
> dvb_device_t *dev, uint64_t freq)
> int ret = dvb_set_dvbs2 (dev, freq, mod, srate, fec, pilot,
rolloff);
> if (ret == 0)
> ret = sec_setup (obj, dev, freq);
> + if (ret == 0)
> + ret = inversion_setup (obj, dev);
> return ret;
> }
>
> @@ -919,6 +929,8 @@ static int isdbs_setup (vlc_object_t *obj,
> dvb_device_t *dev, uint64_t freq)
> int ret = dvb_set_isdbs (dev, freq, ts_id);
> if (ret == 0)
> ret = sec_setup (obj, dev, freq);
> + if (ret == 0)
> + ret = inversion_setup (obj, dev);
> return ret;
> }
>
> -unsigned dvb_enum_systems (dvb_device_t *)
> +unsigned dvb_enum_systems (dvb_device_t *d)
> {
> -#warning TODO
> - return 0;
> +//debug
> + vlc_mutex_t lock;
> + vlc_cond_t wait;
> + vlc_mutex_init( &lock );
> + vlc_cond_init( &wait );
> + return d->module->EnumSystems( );
> + vlc_mutex_destroy( &lock );
> + vlc_cond_destroy( &wait );
This code does not make sense.
> }
>
> float dvb_get_signal_strength (dvb_device_t *)
> diff --git a/modules/access/dtv/dtv.h b/modules/access/dtv/dtv.h
> index 3cf6503..889ac84 100644
> --- a/modules/access/dtv/dtv.h
> +++ b/modules/access/dtv/dtv.h
> @@ -28,6 +28,7 @@ extern "C" {
>
> enum {
> ATSC = 0x00000001,
> + CQAM = 0x00000002,
This conflicts with the current code base.
>
> DVB_C = 0x00000010,
> DVB_C2 = 0x00000020,
> @@ -39,6 +40,8 @@ enum {
> ISDB_C = 0x00001000,
> ISDB_S = 0x00002000,
> ISDB_T = 0x00004000,
> +
> + UNIVERSAL = 0xffffffff,
No please. That makes no sense.
> };
>
> typedef struct dvb_device dvb_device_t;
--
Rémi Denis-Courmont
Sent from my collocated server
More information about the vlc-devel
mailing list