[MPlayer-G2-dev] Re: GUI-related config (layer-0) metadata
    Dan Christiansen 
    danchr at daimi.au.dk
       
    Thu May 15 20:15:21 CEST 2003
    
    
  
On Thursday, May 15, 2003, at 06:29 PM, Andriy N. Gritsenko wrote:
>     You're saying about implementation not API, sorry. API must consist
> of struct describing all variables.
It seems like were talking about two different things; I'm talking 
about how a GUI application would manipulate the modules, you're 
talking about how the module/mplayer config interface should be. 
Actually, I'm saying the exact opposite; a function-based interface 
would be much more dynamic and interface better with the object 
oriented design of a GUI. What's behind the interface is a completely 
different matter. You could have the module/mplayer interface consist 
of a struct and have the GUI/module (via mplayer) interface consist of 
a set of functions which mplayer would interpret and manipulate with 
said functions.
>     You want implementing searching mechanism in module? It's unwanted
> since it may (and must) be implemented in application.
It could be implemented in mplayer. It's a very simple way of accessing 
options.
>> 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. :)
You're right - I'm fairly new to C :)
>
>> 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.
No, it's to extract all values to store them in the GUI application. A 
GUI developer might want to store it in a different way, or might want 
to iterate through them. Anyway, accessing all options is necessary 
prior to displaying the visual interface.
>
>> char *module_get_error_string(module_t module, int errno);
>
>     It may be resonable but it's function of parser, not module, sorry.
Nonetheless, it would be useful in the API ie. the interface.
- Dan
    
    
More information about the MPlayer-G2-dev
mailing list