[vlc-devel] Re: RFC: refurbishing the configuration manager

Samuel Hocevar sam at zoy.org
Sat Oct 12 00:12:15 CEST 2002


On Fri, Oct 11, 2002, Gildas Bazin wrote:

> I think you are assuming too much about what the user wants to do or not.
> If my computer is always on and I have a drawable always present on my 
> screen, why wouldn't I want to save this configuration option?

   Because its address is mapped by the OS and nothing guarantees you
that it'll have the same value next time you launch the program.

> I know this is something that would be hardly used but nonetheless we 
> already provide this configuration variable so why not let the user be able 
> to save this?

   Because if you let the user save it, vlc will segfault at next launch
for sure.

   Anyway, this part of the discussion is going nowhere. The only point
I'm trying to make is that there are variables that are currently shared
between different parts of VLC using a structure, while they could be
stored using simple named variables.

   (I also have a subliminal message here: ABI stability, libvlc).

> >    And if the preferences panel is dynamically built, it's also for a
> > reason. We could refresh it on some occasions (a module gets added or
> > reloaded -- but this is only one example).
> 
> Really nice, so the user will only be presented with the option to save some 
> configuration variables at random times. That will be fun for users... a 
> new game in itself...

   Hah. This already happens if you install a new plugin. Or if a plugin
becomes unavailable for whatever reason. Or if you use the --plugin-path
option with different values.

> [...]
> 
> Ok, I think we can come to a compromise here by providing two different APIs 
> to create the two kinds of config variables.

   Ok, I won't touch the config_* API. But you will die of utter jealousy
when you see my cool new features, muahahaha :-)

> One would create a run-time variable and as such, this variable wouldn't be 
> static but just dynamic. So there would be no way to save it.
> 
> Another one would create initialization-time variables and as such, these 
> variables would be created as static _and_ dynamic. You would be able to 
> save these config var (well the static version), but as implied by their 
> name, they would have to be created during an initialization step of the 
> module (so we can know about them right from the beginning).

   I'm sure I can find some examples where we'll need ugly workarounds,
for instance how do we save per-device configuration when a module can
support several devices (per-soundcard volume, per-display Shm usage...)?

-- 
Sam.
-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>



More information about the vlc-devel mailing list