Re: libaf

Anders Johansson <[email protected]>
Newsgroups gmane.comp.video.mplayer.g2.devel
Message-ID <[email protected]>
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
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.