[MPlayer-dev-eng] libvo changes

Uoti Urpala uoti.urpala at pp1.inet.fi
Sat Apr 5 21:50:57 CEST 2008


On Sat, 2008-04-05 at 19:57 +0200, Reimar Döffinger wrote:
> On Sat, Apr 05, 2008 at 07:55:14PM +0300, Uoti Urpala wrote:
> > Here are the latest libvo changes. They add the basics of a new VO
> > driver API and convert vo_xv to use it.
> 
> Another two comments:
> I really think that "struct vo" is not really a proper name, vo_context
> or some such seems much more appropriate to me.

"struct vo" is appropriate at least for the way I think about the
variables. I think about those in an object-oriented manner so that each
"instance" of struct vo "is a VO".

> I also do not really like that you use "struct ..." _everywhere_ IMO
> that "struct" clutters the code without any information, and (also IMO)
> at least the internal vo code would be much better of using a less
> cluttery typedef.

I on the other hand dislike the overuse of typedefs in much of MPlayer
code. The struct name should be available to allow pointers without the
full definition, but if you also have a typedef then it's less obvious
which struct and typedef names correspond to each other. IMO the
"struct" part makes parsing code easier as it's obvious what is a type
name and what is a variable name. If you've already parsed the code and
it doesn't make sense otherwise then it must be a type name and "struct"
would not give (much) extra information, but IMO that takes more effort.

 I don't usually consider the struct part clutter. "struct vo" is in
fact shorter than your proposed "vo_context". It does contain a space
but that's IMO mainly a matter of being used to reading code with struct
types and cannot really be considered more cluttery in absolute terms.




More information about the MPlayer-dev-eng mailing list