[vlc-devel] Checking VLC version from code
remi at remlab.net
Mon Nov 30 15:04:30 CET 2009
On Mon, 30 Nov 2009 14:54:41 +0100, Jakob Leben <jakob.leben at gmail.com>
> All I could find about getting VLC version from code was
> Wouldn't it be very useful to be able to separatly get major,
> minor and build numbers? Is that already implemented?
Internally, you have the autoconf #defines for the release version.
The exact commit version is provided through as a global variable within
LibVLC core. It is PURPOSEDLY not exposed.
> On the other hand, is it safe enough to parse the numbers from
> VERSION_STRING, supposing that it will always start with version
> number immediately (x.x.x...) ?
PACKAGE_VERSION and VERSION do that.
> There is an incompatibility with Qt playlist settings at 1.0.x and
> 1.1 so I want to save version into settings and check it when
> loading them.
You should probably use a private file format generation number (as does
the plugin cache) rather than the VLC version in that case.
More information about the vlc-devel