[MPlayer-G2-dev] Re: About final cfg.h (config layer 0 discussion)

Andriy N. Gritsenko andrej at lucky.net
Mon May 26 16:25:45 CEST 2003


    Hi, Arpi!

Sometime (on Monday, May 26 at 16:36) I've received something...
>> >For example, we assume that name of group is group selection flag. Then
>> >if we define all below we will have all hints to form box above but don't
>> >have any changes for CLI syntax:
>> 
>> [.......]
>> 
>>     I like to write here another version for the same. We'll define that
>> option->desc for CONF_TYPE_GROUP have two special meanings:
>> NULL - this is menu separator line
>> "*"  - this is list of special choises (boxes inside box)

>> Then we could:

>> 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[]={
>>  {"vqscale", &vqscale, CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL, "constant quantizer"},
>>  {"", NULL, CONF_TYPE_GROUP, 0, 0, 0, var_vq_group, "variable quantizer"},
>>  {NULL, NULL, 0, 0, 0, 0, NULL, NULL}
>> }

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?

>> 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.
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).

    With best wishes.
    Andriy.



More information about the MPlayer-G2-dev mailing list