[vlc-devel] Video4Linux spat

Rémi Denis-Courmont remi at remlab.net
Thu Apr 5 19:36:45 CEST 2012


Le jeudi 5 avril 2012 18:48:41 j'ai écrit :
> 2) So we tried to use the Linux kernel version numbers.
> Afterall, the V4L2 specification uses them too.

I meant the version from <linux/version.h> of course. The actual running 
kernel version is irrelevant when compiling VLC, not to mention cross-

> Unfortunately, that breaks BSD support.
> Second, the V4L2 ABI is not completely backward-compatible.

V4L2 exposes enumerations on the kernel/user interface. When an enumeration is 
expanded, the ABI breaks, since the set of allowed integral values changes. 
This does affect compiler optimizations such as jump labels, so this breakage 
is not purely theoretical.

I already pointed it out to Mauro at last year's LKS, but I could not convince 
him to switch enum parameters into plain unsigned.

> In the future,
> subtle incompatibilities may occur if a version of VLC is compiled against
> a more recent version of kernel headers, than the private copy.

To be clear: In principles, you need to recompile VLC (and other V4L2 apps) 
when a kernel upgrade brings a V4L2 ABI break.

If we included our own copy of <linux/videodev2.h>, then VLC would assume the 
ABI of the kernel version that *we* chose, instead of of the version that the 
distribution chose. That is obviously Not A Good Thing(tm).

> Before you complain to me again, you get to find a solution...

I have had enough of uninformed "smart" comments on IRC. If you have somethnig 
to say, say it *here*. TIA.

Rémi Denis-Courmont

More information about the vlc-devel mailing list