[MPlayer-dev-eng] libvo changes

Uoti Urpala uoti.urpala at pp1.inet.fi
Wed Apr 2 20:29:49 CEST 2008


On Wed, 2008-04-02 at 19:56 +0200, Reimar Döffinger wrote:
> On Wed, Apr 02, 2008 at 08:22:42PM +0300, Uoti Urpala wrote:
> > I created these in preparation of creating a data struct for VOs, but
> > that isn't complete yet and I thought I'd post these first.
> 
> I can't see how this would be related to creating a data struct for
> VOs...

I'm adding functions that forward their arguments, and variable
arguments make that harder.

> > -	return((video_out->control(VOCTRL_SET_EQUALIZER, eq->item, eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE);
> > +	return((video_out->control(VOCTRL_SET_EQUALIZER, VOCTRL_SET_EQUALIZER_ARGS(eq->item, eq->value)) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE);
> >      }
> 
> Personally, I find this line rather too crowded as it is, a
> struct voctrl_set_equalizer_args param = {eq->item, &eq->value};
> in a extra line would look much better IMO.

I can change it to that, and the call perhaps further to

        return video_out->control(VOCTRL_SET_EQUALIZER, &param) == VO_TRUE;

(relying on CONTROL_TRUE and CONTROL_FALSE being defined naturally).

> Not related to this patch, but also some VOs use strcmp and some use
> strcasecmp. Is there any reason why we _have_ to use strcasecmp? strcmp
> seems a much saner choice to me otherwise...

I don't think there is any reason for strcasecmp.


What's the deal with vo_uninit() and vo_x11_uninit()? They seem to do
different things but VOs only call one. XCloseDisplay() is only in
vo_uninit(). This came up because I intended to use vo_uninit(vo) as a
function to close the given vo, but a vo_uninit() already existed. And
so did vo_x11_uninit() which was the most obvious candidate name to
rename it to...

If the current behavior of those functions does make sense (I haven't
really investigated it) I could use suggestions what to rename the
x11-specific vo_uninit() to.




More information about the MPlayer-dev-eng mailing list