[MPlayer-G2-dev] Re: GUI-related config (layer-0) metadata
Andriy N. Gritsenko
andrej at lucky.net
Thu May 15 18:29:59 CEST 2003
Hi, Dan Christiansen!
Sometime (on Thursday, May 15 at 19:11) I've received something...
>On Thursday, May 15, 2003, at 03:28 PM, Arpi wrote:
>
>>i vote for the last one.
>>first option (built-in gui) is unacceptable, second is
>>overcomplicated/bloated (hehe embedd mozilla into mplayer-g2 to
>>interpret
>>and run the xml gui :)), third is probably not enough.
>>
>>comments? recommendations for gui-related fields into config_t, if we
>>agree on teh 4th solution?
>
>I'd say having a function-based interface would be better. Accessing
>variables through a function has the advantage that something like
>input constraints could be handled directly. With a struct, you would
>need a complex interface to tell you that one option was set one. A
>function could return a non-zero value and set some errstring and/or
>errno. I believe this would be much more dynamic than a struct.
You're saying about implementation not API, sorry. API must consist
of struct describing all variables.
>A proposal:
>int module_get_option_type(module_t module, char *key, char **type);
You want implementing searching mechanism in module? It's unwanted
since it may (and must) be implemented in application.
>int module_get_option(module_t module, char *key, void **value);
You need there also know option's size and type, etc. because you'll
not know what you'll get in that void pointer. :)
>int module_set_option(module_t module, char *key, void *value);
The same as above.
>char **module_get_option_keys(module_t module);
>void **module_get_option_values(module_t module);
>char **module_get_option_types(module_t module);
It's overcomplicated - to parse each variable thru searching.
>char *module_get_error_string(module_t module, int errno);
It may be resonable but it's function of parser, not module, sorry.
With best wishes.
Andriy.
More information about the MPlayer-G2-dev
mailing list