[MPlayer-dev-eng] [PATCH] vo-control method suggestion
D Richard Felker III
dalias at aerifal.cx
Thu Feb 7 18:13:01 CET 2002
On Thu, Feb 07, 2002 at 06:55:29PM +0200, Arpi wrote:
> Hi,
>
> > > 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.
> > IMHO isn't it more useful to use the standardized errno's? Doesn't
> > matter to me, just an idea...
> no...
> errno works in old messy way: func returns -1, and caller checks the global
> errno. i don't like this.
> we should return >=0 if implemented and <0 if error (n/a or not implemented
> or failed). in my original control() api drafts 0=false 1=true anyway, so
> at query calls we can use these values.
> (there were query, set and get calls. query returns 0/1/error, get returns
> the requested value or error, set returns success or error)
well there's also the option of returning -EWHATEVER from errno.h on
errors. i think that was the idea -- not setting the global variable
errno or anything messy like that.
rich
More information about the MPlayer-dev-eng
mailing list