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

Andriy N. Gritsenko andrej at lucky.net
Mon May 26 14:42:37 CEST 2003


    Hi, Andriy N. Gritsenko!

Sometime (on Monday, May 26 at 12:41) I've written something...
>>> Another example for using of CONF_TYPE_GROUP:
>>> 
>>> (*) constant quantizer [   ]
>>> ( ) variable quantizer ----------------------------
>>> minimum quant [  ]   maximum quant [  ]
>>> ...................
>>> ---------------------------------------------------
>>> 
>>> so we have CONF_TYPE_SELECT with two choises:
>>> 1) CONF_TYPE_GROUP including 'vqscale' integer.
>>> 2) CONG_TYPE_GROUP including 'vqmin', 'vqmax' and other options.
>>> 
>>> When we select constant quantizer then second group will be disabled,
>>> when we select second group then we cannot change value of 'vqscale'.
>>> Config of vf_lavc must have hints for that. Simplest way for it is just
>>> have "transparent" CONG_TYPE_GROUP type. Did you understand?

>>and how would you define the above situation with your types?
>>i can't see how you GROUP helps here.

>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}
}

.....
{"", NULL, CONF_TYPE_GROUP, 0, 0, 0, vq_groups, "*"},
.....

It seems even simpler than previous version and allows even more that two
group choises (and still no changes for CLI syntax). :)

    With best wishes.
    Andriy.



More information about the MPlayer-G2-dev mailing list