Re: Re: About final cfg.h (config layer 0 discussion)

Arpi <[email protected]>
Newsgroups gmane.comp.video.mplayer.g2.devel
Message-ID <[email protected]>
Hi,

> Variant from first version with 'vqscale' as only member of group:
> 
> config_t const_vq_group[]={
>  {"vqscale", &vqscale, CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL, ""},
>  {NULL, NULL, 0, 0, 0, 0, NULL, NULL}
> }
> 
> config_t var_vq_group[]={
>  {"vqmin", &vqmin, CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL, "minimun quant"},
>  {"vqmax", &vqmin, CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL, "maximum quant"},
> .........
>  {NULL, NULL, 0, 0, 0, 0, NULL, NULL}
> }
> 
> config_t vq_groups[]={
>  {"", NULL, CONF_TYPE_GROUP, 0, 0, 0, const_vq_group, "constant quantizer"},
>  {"", NULL, CONF_TYPE_GROUP, 0, 0, 0, var_vq_group, "variable quantizer"},
>  {NULL, NULL, 0, 0, 0, 0, NULL, NULL}
> }
> 
> .....
> {"", NULL, CONF_TYPE_GROUP, 0, 0, 0, vq_groups, "*"},
> .....
> 
> May be that way it's more clear?

i understand but it doesn't look nice.

> >> It seems even simpler than previous version and allows even more that two
> >> group choises (and still no changes for CLI syntax). :)
> 
> >hmm, i don't understand this version.
> 
> >i understood the first version, but it has a big bug: it doesn't store
> >which group was selected by teh user.
> 
>     Second version containing one more level of CONF_TYPE_GROUP that
> could have option->p as int* to indicate which subgroup was selected.

how? where do you store the value to be stored at int* ? serial number of
list member? min/max value as in flags?
hey this is messy, this is not what we want.

btw we could extend the config_select_list_t to include a config_t*, so
we could "link" config entries to select-list elements. it looks cleaner.

> First version cannot have that and I don't see how first version could
> have more that two choices. We cannot use CONF_TYPE_SELECT here because
> that grouping must be transparent for CLI (to preserve syntax).

CLI also should follow "grouping", ie it shouldn't allow(*) vqmin/vqmax
settings when constant qscale mode is selected...

(*): maybe we should think 'like' insteda of 'allow', it it could warn user
of wrong syntax but don't fail...  or even better: this 'allow-some-errors
policy' should be optional, something like gcc's -pedantic switch.


A'rpi / Astral & ESP-team

--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.