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

Andriy N. Gritsenko andrej at lucky.net
Sat May 24 11:13:04 CEST 2003


    Hi, Arpi!

    It seems, cfg.h discussion almost ended but it seems something isn't
decided yet. So I want to ask some questions now:

1. Why did you dropped CONF_TYPE_SUBCONFIG ? I've just noticed that. It's
  because all such options are modules parameters and you want to parse
  they by different way?
2. Do you still have something to argue about CONF_TYPE_LIST option type?
3. Will we change CONF_NOGUI to CONF_NOUI ?
4. Let's change unsigned short type, version to unsigned short version,
  type in module_info_t definition to have compatibility forever. :)

    Discussion about CONF_TYPE_GROUP isn't my concern right now since
that option is application level only and it's marked as TODO anyway. :)

    Also about how to apply new config level 0 to video filters (and to
all other in the future, of course). We have to describe how parameters
will be passed to modules. So:

1. vf_open_filter(), vf_open_encoder(), and vf_insert_filter() functions
  have to get not char *args but void *args and that void * have to be
  preallocated array with parsed parameters (see module info);
2. we have to introduce VFCTRL_GET_PARAMS and VFCTRL_SET_PARAMS requests
  for vf->control(). These requests will have void *data as parameters
  array, preallocated by caller: for VFCTRL_GET_PARAMS it's array with
  undefined values and filter has to set all changeable parameters there;
  VFCTRL_SET_PARAMS will ask the filter to apply changed parameters to
  the instance. Size of that array defined by config_size in module info.

    It must be documented before we have all filters/encoders ported from
G1 since it'll be huge headache after that. ;)
    For example, I want to port vf_dint.c to G2 but I still cannot until
we decide all above and I wait for it...

    BTW, we have in VF API functions for inserting filter into begin of
chain and to somewhere inside chain but how about adding filter at the
end of chain? May be better is something like:

vf_instance_t* vf_insert_filter(vf_instance_t *last, vf_instance_t *next, char *name, void *args);

which will insert filter between instances last and next, and so if
last==NULL then we'll insert filter at begin of chain (as vf_open_filter
does) and if next==NULL then we'll add filter at end of chain. I think
it's the best way to do it. BTW, with new layer 0 concept it may be more
correct if we will use module_info_t* instead of char *name.

    With the best wishes.
    Andriy.



More information about the MPlayer-G2-dev mailing list