[vlc-devel] commit: Refactor libvlc_video_{get, set}_{marquee, logo}_{int, string}. ( JP Dinger )

jpd at videolan.org jpd at videolan.org
Sat Jan 30 09:21:49 CET 2010

On Fri, Jan 29, 2010 at 10:12:49PM +0100, Pierre d'Herbemont wrote:
> Your return value is error prone, and need documentation. Previous
> implementation was just fine to get/check, when reading code or by
> simple compilation. The way it is done add a new range of error and
> mistake done by user.

Return value? I think you're mixing up stuff. Consider that the option
value (and not return value) is not and should not be an enum for
portability reasons, so you get no type checking, so the previous
situation is multiple enums that minimally differ in name and have
overlapping and therefore conflicting values. Thus, no, it was not fine.

This way at least the option value will be different and will be
flagged at runtime as an error instead of succeeding by doing something
different than what was desired. And it saves some duplicated code.

Yes, the documentation should be improved even though it already is
better than much of the rest of the API. The bare necessities are there,
what is needed is explanation on how to use it. Feel free.

Personally I think the interface is bunk to begin with, but something
like it is needed and proposals are welcomed. Reverting something that
works and is in use just because you don't like it is not welcomed.

More information about the vlc-devel mailing list