Gentoo Logo

vlc and related

1.  vlc

Introduction

Note: This guide was last updated for vlc version 0.8.6e.

media-video/vlc is VLC media player, a multimedia player with different interface modules, though primarily as a streaming client. There are no frontends a part the core vlc binary, but the different interfaces are loaded as modules.

Because of its structure, a crash into the decoding routines means a complete crash of the interface, too. A careful maintenance is needed, similarly to xine-lib.

Its maintenance is usually simple, as it's one of the most portable solutions (it runs natively on Linux, Windows, OSX and FreeBSD). Related to vlc there are, though, different libraries that might be a problem to maintain, as they are handled differently in Portage from what the other distributions do.

As many other software, also vlc is shipped with a debian subdirectory. In particular, inside that directory there's a .desktop file that can be installed to provide a menu entry for vlc itself (when using wxWidgets interface).

Patches

Patches for vlc are a bit different respect xine-lib, as they are sometimes exclusive to Gentoo Linux and simply can't be upstreamed at all. This is the case of the patch that removes glide v2 support and the ones that changes some libraries from builtin to plugins (with the assumption that Gentoo always have them as PIC libraries).

In general there might be necessity to patch vlc when something in its dependencies changes, as it's usually quite good-written the internal code and also the configure.ac. In the past it needed patching to get wxGTK or Samba dependencies fixed.

The bootstrap script provided with the sources should not be used to rebuild autotools support. While it's usually better to use the upstream-provide file, that bootstrap script contains also instructions to update gettext support, that might create confusion with the shipped version, and requires also the cvs command to get autopoint right. A simple eautoreconf call should be enough.

There are two ways to send patches upstream: either via their vlc-devel mailing list or by reporting a bug in the Trac system.

The patches are hosted in CVS inside gentoo/src/patchsets/vlc and are organized by version. Released patchsets are tagged with the name of the tarball minus the .tar.bz2. The directories contains also a series file, as they are used by quilt: just symlink the checked out directory inside an extracted source tree of vlc (for that version) and use quilt to manage the patches.

Note: Also if usually this point was never stressed out, now that patches are hosted on the CVS it's important that they bring a description in the header, with also a link to relevant bugs, both in Gentoo and upstream.

A single note is worth with respect to compiler's flags handling: GCC 2.95 requires to strip -fomit-frame-pointer flag or the build does not work; that flag is actually required to build vlc with recent GCCs.

External libraries and plugins

vlc uses a mixed architecture for linking decoding libraries: some of them are linked as builtin, statically into the vlc binary, while others are built as plugins that gets loaded at runtime.

As the plugins are by all means shared objects, they must be built with PIC enabled and can't link against static non-PIC libraries. As some libraries used to decode or demux (such as libmatroska and libdts) used to be static libraries only, the configure sometimes checks for two names for libraries, one for the PIC version (_pic or _p) and one for the non-PIC, enabling the plugin or the builtin depending on the case.

As in Gentoo most of the libraries are patched to build the PIC shared version with the same name of the original one, the configure script sometimes gets false negatives, and builds as builtin something that could have been built as plugin. In those cases, it's needed to edit the configure.ac file to get the right name for the library to build as plugin.

The use of plugins instead of builtins allows VLC to continue working also if one of the libraries gets broken by a changed ABI, as the plugins fails to load on demand, while builtins breaks the main executable file. For this reason, the plugins are preferred over builtins.

Like newer versions of xine-lib, vlc always uses an external copy of ffmpeg. This means that when a new version of that package is stabilized, vlc has to be checked against it. It also means that it does not suffer from problems related directly to ffmpeg code, such as security vulnerabilities.

Testing versions

As many other projects, also vlc releases beta versions of the code before the actual final release. These beta versions are usually useful to test the changes to the dependencies and the code in package.mask so that problems can be found before unleashing the final version to users.

Test versions are usually announced on vlc-devel mailing list and can be found at http://download.videolan.org/pub/videolan/testing/. The naming scheme used is X.Y.Z-testT.

Since version 0.8.4, the ebuild carries the transformation between _beta to -beta versions and uses the right URL for betas without having to edit it by hand.

useflags

As many other multimedia programs, also vlc have quite a lot of useflags to disable and enable dependencies and extra features. There are a few missing dependencies that are not enabled, and a few useflags that were removed for many reasons in the past.

The nsplugin useflag is used to build the Netscape-compatible plugins (used by Mozilla, Firefox and Konqueror); this plugin is quite fragile, and the useflag (that was added after 0.8.2 release) was removed till the latter 0.8.5 revisions, with patches to build against Firefox or Seamonkey rather than the old Gecko-SDK (no more supported) or XULRunner (experimental). The plugin itself is unsatble anyway, and if bugs are confirmed is probably simpler to remove it or declare it experimental.

Most of the nsplugin's problems were fixed in 0.8.6, although the way to select against which package to build changed drastically (as the patch applied to 0.8.5 was rejected for a different approach). Since this version, you need to pass the XPIDL variable with the path to the IDL libraries for the package to link against (firefox or seamonkey) and the MOZILLA_CONFIG variable with the path to the *-config script, again depending on which one you want to link against.

As of version 0.8.4, vlc dropped the unicode useflag, this because the code shipped by upstream is currently bound to wxGTK 2.6 with unicode support, and it's then better to just stick with that version instead of tinkering to enable the non-unicode support. wxGTK 2.6 supports unicode natively and it's no more an experimental version as it was with 2.4 version. For this reason the --enable-utf8 option is also always passed to the econf line.

The live useflag enable support of live555 for RTSP support, provided by media-plugins/live. Starting from version 2006.12.08 of this latter package, the way it is installed in the system is drastically changed; while previously it installed in a "build tree", and was linked statically, the newer versions installs as a normal package using lib and include directories. For this reason, the --with-live555-tree option is not passed anymore, in vlc 0.8.6 and later, if the newer version of live is present.

Useflag Local description Dependency Reason for removing
aac AAC (Advanced Audio Codec) support media-libs/faad2 The code handling AAC files using FAAD2 library is broken on some systems, the library is also dead upstream and a problem to deal with when used. For this reason VLC in Gentoo is patched to accept FFmpeg's AAC codec (that's otherwise blacklisted) and relies on that instead than on the native AAC plugin, that's forcefully disabled. Starting from 0.9.0 snapshots of vlc, the aac flag is back and the patch to not blacklist FFmpeg's AAC codec has been dropped. It is now possible since we have a recent faad2 library and this makes us closer to upstream.
threads Thread support dev-libs/pth Pth's threading does not work fine with many of the libraries used by VLC itself, enabling it makes the software highly unstable. Don't make an useflag, instead pass --disable-pth directly to econf. Starting from 0.9.0 snapshots, upstream has dropped pth support.
portaudio PortAudio output plugin >=media-sound/portaudio-19 The required version of portaudio is the currently experimental version (19), not present in Portage and too unstable.
dirac Enables experimental dirac codec media-libs/dirac Missing testcase to evaluate correct behavior of the codec. Until a dirac encoded file can be used to check correctness, leave disabled.
tremor Enables Tremor decoder support Missing dependency
tarkin Enables experimental tarkin codec Missing dependency
cyberlink Enable CyberLink UPnP stack Missing dependency
libtar Enables libtar support for skins2 module dev-libs/libtar libtar doesn't build a PIC shared library thus we disable it
ieee1394 Enables support for ieee1394 DV cameras sys-libs/libraw1394 Displays warnings in kernel logs about using a too old interface and did not give any image from a DV camera


Print

Updated March 8, 2008

Summary: Maintainer notes about vlc and its relatives

Diego Pettenò
Author

Alexis Ballier
Contributor

Donate to support our development efforts.

Support OSL

Support OSL

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

Global Netoptex Inc.

Global Netoptex Inc.

Bytemark

Bytemark

Linux World Expo

Linux World Expo

Copyright 2001-2008 Gentoo Foundation, Inc. Questions, Comments? Contact us.