On Sunday 08 August 2004 18:58, Rob Shortt wrote:
> (us-cable, etc).  The old VIDEO_GROUPS array is very user unfriendly and
> the TV_* single variable assignment is much cleaner from that
> perspective.  On the other hand if we introduce new variables for
> TV_[DVB|TV|IVTV]_[device|input|norm|adevice...] there will be too many
> variables to deal with and even then you also have to consider multiple
> devices of each kind (tv0, tv1, tv2).  We had talked about using lists
> to handle that, which introduces more complexity.

If the number of variables becomes too large, separate variables get indeed 
ugly IMO.  And lists are fine for grouping, but have the disadvantage that 
they depend on the order of their entries, which is ugly both from a user's 
point of view and in the code (having all the unnamed indices).  Of course, 
dicts would be better but then, you're totally right IMHO that classes are 
the best solution.  They can fill in default values in their constructors and 
the config variables can be accessed with meaningful names.

> # Accept the defaults for the first regular tv card
> TV_SETTINGS['tv'] = TVSettings()
If the user may get to see this class name at some point, I would suggest a 
name like "TVCard" instead of settings, because from a user point of view, 
this is all about settings.  This can be a class within the module "config", 
so that it's namespaced (i.e. config.TVCard from the rest of the code).

And I want to point out that simple inheritance might be useful for different 
types of cards. I.e. TV_SETTINGS['ivtv'] = IVTVCard() or similar, since IVTV 
has many more (and different) options than normal v4l cards.

> Comments? *crossed fingers*
I think it's fine. :-)

-- 
Ciao, /  /                                                    .o.
     /--/                                                     ..o
    /  / ANS                                                  ooo


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Freevo-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to