2002-08-26 01:18:05 +02:00
|
|
|
Hacking vlc
|
|
|
|
===========
|
|
|
|
|
2004-09-23 14:42:42 +02:00
|
|
|
First
|
|
|
|
-----
|
|
|
|
|
|
|
|
- Read this file
|
|
|
|
|
2007-12-21 18:25:10 +01:00
|
|
|
- Read the information present on http://www.videolan.org/developers/
|
2004-09-23 14:42:42 +02:00
|
|
|
|
|
|
|
|
2002-09-30 13:05:42 +02:00
|
|
|
Requirements
|
2004-09-23 14:42:42 +02:00
|
|
|
____________
|
2002-09-30 13:05:42 +02:00
|
|
|
|
2008-03-21 20:23:46 +01:00
|
|
|
You will need the following tools if you plan to use the GIT version of vlc:
|
2002-08-26 01:18:05 +02:00
|
|
|
|
2007-03-11 11:44:48 +01:00
|
|
|
- Autoconf version 2.60 or later
|
|
|
|
- Automake version 1.9 or later
|
2007-12-21 18:25:10 +01:00
|
|
|
- gettext version 0.16.1 or later
|
2007-03-11 11:44:48 +01:00
|
|
|
- pkg-config
|
|
|
|
- libgcrypt 1.2 (or compatible)
|
2005-11-09 13:03:40 +01:00
|
|
|
|
2008-03-21 20:23:46 +01:00
|
|
|
After retrieving the GIT tree, you need to run the bootstrap script to
|
2002-08-26 01:18:05 +02:00
|
|
|
generate all the files needed to build vlc. You can then run configure.
|
2004-09-23 14:42:42 +02:00
|
|
|
Run ./configure --help for a description of the available options.
|
2002-08-26 01:18:05 +02:00
|
|
|
|
|
|
|
If you do not have the correct version of these tools, or if they are
|
|
|
|
simply not available for the operating system you plan to develop on,
|
2008-03-21 20:23:46 +01:00
|
|
|
you can check out a GIT tree on an OS that provides these tools (such
|
2002-08-26 01:18:05 +02:00
|
|
|
as a recent Linux distribution), run bootstrap, and then copy the whole
|
|
|
|
tree to your retarded OS.
|
|
|
|
|
2002-10-07 23:58:40 +02:00
|
|
|
There is a possibility that, at some point, automake might segfault. The
|
|
|
|
reason is unsufficient stack size, and can be easily fixed with the
|
|
|
|
`ulimit` command (or an equivalent) available in most shells. For instance
|
|
|
|
on bash 2.0, the following command solves the automake crash on Mac OS X :
|
|
|
|
ulimit -s 20000
|
|
|
|
|
2002-09-30 13:05:42 +02:00
|
|
|
|
|
|
|
The bootstrap sequence
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
The bootstrap script does the following actions:
|
|
|
|
|
2003-06-27 15:50:13 +02:00
|
|
|
- parse configure.ac for all Makefiles in the modules/ directory that need
|
|
|
|
to be generated, and look for available modules in the corresponding
|
|
|
|
Modules.am file. A module "foo" exists if there is a Modules.am file in
|
|
|
|
the modules/ directory which defines SOURCES_foo.
|
2002-09-30 13:05:42 +02:00
|
|
|
|
2003-06-27 15:50:13 +02:00
|
|
|
- create an m4/private.m4 from configure.ac, generating m4 macros that will
|
|
|
|
be needed by configure.ac.
|
|
|
|
|
|
|
|
- create a Makefile.am file for each Modules.am file found in modules/ .
|
2002-09-30 13:05:42 +02:00
|
|
|
|
2009-02-21 09:38:22 +01:00
|
|
|
- run autopoint (previously gettextize) to provide build system support
|
|
|
|
for internationalization.
|
2002-09-30 13:05:42 +02:00
|
|
|
|
|
|
|
- run the usual aclocal, autoheader, automake and autoconf, which create
|
|
|
|
the various Makefile.in files from the corresponding Makefile.am and the
|
|
|
|
configure script from configure.ac.
|
|
|
|
|
|
|
|
- fix a few files in the vlc repository that may have been altered.
|
|
|
|
|
|
|
|
|
|
|
|
How to add a module
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
To add a module to the repository, just add its sources to a Modules.am
|
2004-09-23 22:56:46 +02:00
|
|
|
file. If you add a new directory you will need to create a new Modules.am,
|
|
|
|
inside that directory. Do not forget to add a corresponding
|
|
|
|
Makefile line at the end of configure.ac for this new Modules.am file.
|
2002-09-30 13:05:42 +02:00
|
|
|
|
2008-06-07 15:23:04 +02:00
|
|
|
To have the module built, you need to add a call to VLC_ADD_PLUGIN or
|
2004-06-25 14:21:32 +02:00
|
|
|
VLC_ADD_BUILTINS to configure.ac with your new module name as argument.
|
2004-09-23 22:56:46 +02:00
|
|
|
Look at other modules for guidelines on how to add build and linkage options.
|
|
|
|
|
|
|
|
After changing configure.ac you will always need to rerun bootstrap and
|
|
|
|
configure.
|
|
|
|
|
2008-06-07 15:23:04 +02:00
|
|
|
VLC keeps a cache of its modules (in ~/.cache/vlc/ on Linux), so you'll have to
|
|
|
|
delete it (or use vlc --reset-plugins-cache). Then use vlc -vvv --color --list
|
|
|
|
to check that your plugin is seen by VLC.
|
2003-07-07 19:01:16 +02:00
|
|
|
|