i sow that there is a problem with the configuration system so i tried to write a draft. 1. What we need? G2 is module based, so each module should have it's own options - Options could be queried. Options have default,min,max values. - Options could be readed. - Options could be set. There should be way to idenitfy the modules unickly- even if there is no instance of the module or if there are multiple one. Just an examples: "*.demuxer.avi.nointerlace" = "1" "1.demuxer.avi.nointeleave=0" the avi demuxer will see only "nointerleave" part. Fell free to use any binary, tree, list, graph structures you like for module identification. 2. Implementation There should not be global option file as it is now. In instance structure to be added array of 'options' union { int as_int; float as_float; void* as pointer off-t as_off_t; }param_u;//this is from g1 cfgparser.h .... param_u options[]; ... } instance_t; In every module there should be array structure like config_t: - name of the option - string - type of the option number (int,float) or pointer (to string) - option number - index in the options[] - default value - string or number - max,min limits (for numbers) This array to be included into the XXXX_EXTERN(xxxx); so should be quary-able without module init. There is no place for suboptions. In fact suboptions are options for some other module. ( Am I wrong?). 3. Good sides I could not find anything simplier. It is just a modifiaction of the current config system. Modules could be quered wihtout loading. GUI could show all options without even know what they are about. To the new config_t could be added new string for querying help file. So we may have context help for every option ( something like {"idct", enum_idct, CONF_TYPE_INT,CONF_RANGE,0,99,"help.ffmpeg.decoder.idct"}, so file help will be grep for chapter 'ffmpeg' section 'decoder' and subsection 'idct':)) If option is changed at runtime a function could be called so the nessessery reinit to be done.e.g. static uint32_t option_changed(int option_num){ switch (option_num){ case enum_idct: lavc_idct_change(lavctx,module_inst->options[emum_idct].as_int); return OK; default: return RESTORE; } } // Better add new flag, CONF_RUNTIME_CHANGABLE or something... 4. Bad sides. The index values should be unique, and it is not always nice to work with something like if ( instance->options[15].as_int > 1 ) print_info(); so each option will be enumarated (I've never used enum so far): if ( instance->options[lavc_debug].as_int > 1 ) print_info();