[MPlayer-G2-dev] libaf
Anders Johansson
ajh at watri.org.au
Mon Aug 11 14:21:49 CEST 2003
Hi,
> > 2. How does runtime configuration work, where do I export the pointer
>
> That part is not finalized yet, but in my plans there will be a flag to
> select runtime (without reinit) changeable parameters. When the others are
> changed, the filter will be re-inited (or re-opened).
> When runtime chanegable parameter is changed, a special control (CFG_NOTIFY
> or so) will be called.
Why not use a pointer to the config struct as an input paramter to the
config function?
> This part is not yet implemented...
> (i'm waiting for teh first (G)UI to be able to test such thing)
I have a suggestion how the config management could be handeled.
Create a linked list of structs according to
typedef struct instance_s{
int (*control)(struct instance_s* instance, int cmd, void* arg);
struct instance_s next;
struct instance_s prev;
}instance_t;
Then for every module typ (af vf vo vd ad etc) "overload" the struct,
example:
typedef struct af_instance_s
{
int (*control)(struct af_instance_s* af, int cmd, void* arg);
struct af_instance_s* next;
struct af_instance_s* prev;
void (*uninit)(struct af_instance_s* af);
af_data_t* (*play)(struct af_instance_s* af, af_data_t* data);
void* setup; // setup data for this specific instance and filter
af_data_t* data; // configuration for outgoing data stream
..
..
..and so on
}af_instance_t;
Put all the module loading and linked list management in a common lib
where the module specific xx_instance_t* are casted to instance_t* and
export the list to the (G)UI. The UI will be able to call control in
an module independent way without having to know exactly what it is
talking to.
>
> A'rpi / Astral & ESP-team
>
//Anders
More information about the MPlayer-G2-dev
mailing list