[MPlayer-dev-eng] [PATCH] vo-control method suggestion

Arpi arpi at thot.banki.hu
Thu Feb 7 17:38:25 CET 2002


Hi,

> +#define VOCTRL_SEEK			1
> +/* Query Video Accelerated Architecture information.
> + * params:
> + *   vaa: address of struct to be filled.
> + *  (Note: driver should memset it to ZERO if it doesn't support vaa.)
> +*/

hmm. look at control() in libao2, or libvo2 drafts.
you just break the main point of this function: extendibility without
modifying all the drivers.
implementation of conyrol() should be like this:

int control(int cmd, void* param){
  switch(cmd){
  case VOCTRL_QUERY_XYZ:
     ...
  ...
  case ...
  }
  return VOCTRL_NOTIMPL;
}

it shouldn't memset zero to struct it doesn't even know and so on.
if it returns VOCTRL_NOTIMPL it means it doesn't know this extension - teh
caller should accept this and memset to zero if required.

> +	int (*control)(int request, ...);

ehh. is this "..." usefull enough? Isn't a simple void* better?
(pointing to struct depending on cmd)

I don't like to play with VA_ARGS stuff...


A'rpi / Astral & ESP-team

--
"I don't RTFM? Wow. What's the meaning of this? It's new for me."
	-- Martin Baum, a tipical MPlayer user...



More information about the MPlayer-dev-eng mailing list