[MPlayer-dev-eng] libvo return values
Rich Felker
dalias at aerifal.cx
Thu Jul 28 20:55:30 CEST 2005
On Thu, Jul 28, 2005 at 05:17:32PM +0200, Ivo wrote:
> On Thursday 28 July 2005 16:47, Rich Felker wrote:
> > On Thu, Jul 28, 2005 at 12:55:24AM +0200, Ivo wrote:
> > > Here's the problem. All non-void functions of libvo drivers are defined
> > > static uint32_t. That seems weird to me, because the return values can
> > > be negative (like VO_ERROR, VO_NOTIMPL, etc) and are used all over the
> > > place, but without any effect I suppose.
> > >
> > > What do you think? Should they all be changed to static int32_t?
> >
> > They should be changed to int. Types of specific size should never be
> > used except for addressing sample buffers and the like.
>
> Ok. I agree, so int it will be. If nobody objects, I'm willing to convert
> the whole libvo tree.
>
> Another inconsistency is the following: some functions return VO_TRUE (1) on
> success and VO_FALSE(0) on failure, which seems correct to me. But others
> return 0 on success. Shouldn't all functions follow the same rules? And
> preferably return VO_TRUE/FALSE/ERROR/etc. ?
IMO it doesn't matter for internal functions that aren't part of the
vo api.
> One last thing I came across is that the return value is not always acted
> upon. For example, if vf_vo calls the vo's draw_image, the return value is
> discarded. IMO it should pass the return value on "upstream" and in case of
> at least ERROR, and maybe also FALSE, eventualy the mainloop should
> terminate and call exit_player.
>
> This way, I would be able to remove the usage of exit_player from the vo's I
> maintain and also the calls to abort in some other vo's like x11, xvidix,
> etc.
Agree.
Rich
More information about the MPlayer-dev-eng
mailing list