<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Manolamancha</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Manolamancha"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Manolamancha/"/>
	<updated>2026-11-04T18:55:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=OutOfTreeCompile&amp;diff=18694</id>
		<title>OutOfTreeCompile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=OutOfTreeCompile&amp;diff=18694"/>
		<updated>2011-02-12T03:05:15Z</updated>

		<summary type="html">&lt;p&gt;Manolamancha: /* Preparation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aim==&lt;br /&gt;
Being able to build a vlc module without needing to build the whole vlc source.&lt;br /&gt;
It can be used if you develop a new module, if your module can&#039;t be distributed at the same time as VLC due to some IP issues or to reduce the number of build-dependancies for a source package&lt;br /&gt;
&lt;br /&gt;
==Preparation==&lt;br /&gt;
If you&#039;re taking a module from VLC source code, you may need to modify it slightly. &lt;br /&gt;
===Internationalization===&lt;br /&gt;
You can&#039;t use the main VLC internationalization (gettext) &amp;quot;domain&amp;quot;.&lt;br /&gt;
So you can either add your own domain declaration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define DOMAIN  &amp;quot;vlc-myplugin&amp;quot;&lt;br /&gt;
#define _(str)  dgettext(DOMAIN, str)&lt;br /&gt;
#define N_(str) (str)&lt;br /&gt;
&lt;br /&gt;
/* ... */&lt;br /&gt;
&lt;br /&gt;
vlc_module_begin()&lt;br /&gt;
   set_text_domain (DOMAIN)&lt;br /&gt;
   set_description (N_(&amp;quot;My plugin&amp;quot;))&lt;br /&gt;
   /* ... */&lt;br /&gt;
vlc_module_end()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or disable internationalization completely:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#define _(str)  (str)&lt;br /&gt;
#define N_(str) (str)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Symbols===&lt;br /&gt;
For your module to be loaded by VLC, you&#039;ll need to define the symbol &#039;&#039;&#039;__PLUGIN__&#039;&#039;&#039;. This should enable exported symbols similar to the following: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
EXPORTS&lt;br /&gt;
vlc_entry__1_1_0g&lt;br /&gt;
vlc_entry_license__1_1_0g&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Optionally, you can also define the &#039;&#039;&#039;__LIBVLC__&#039;&#039;&#039; symbol.&lt;br /&gt;
&lt;br /&gt;
==Building==&lt;br /&gt;
&lt;br /&gt;
===With plain makefile===&lt;br /&gt;
The following Makefile is an example based on the x264 module of VLC. You will need to adapt to your module.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
libdir = $(shell pkg-config --variable=libdir vlc-plugin )&lt;br /&gt;
vlclibdir = $(libdir)/vlc&lt;br /&gt;
&lt;br /&gt;
all: libx264_plugin.so&lt;br /&gt;
 &lt;br /&gt;
libx264_plugin.so: libx264_plugin.o&lt;br /&gt;
        gcc -shared -std=gnu99 $&amp;lt; `pkg-config  --libs vlc-plugin x264`  -Wl,-soname -Wl,$@ -o $@&lt;br /&gt;
 &lt;br /&gt;
libx264_plugin.o: x264.c&lt;br /&gt;
        gcc -c -std=gnu99  $&amp;lt; `pkg-config  --cflags vlc-plugin x264` -D__PLUGIN__  -DMODULE_STRING=\&amp;quot;x264\&amp;quot; -o $@  &lt;br /&gt;
 &lt;br /&gt;
clean:&lt;br /&gt;
        rm -f libx264_plugin.o libx264_plugin.so&lt;br /&gt;
&lt;br /&gt;
install: all&lt;br /&gt;
        mkdir -p $(DESTDIR)$(vlclibdir)/&lt;br /&gt;
        install -m 0755 libx264_plugin.so $(DESTDIR)$(vlclibdir)/&lt;br /&gt;
&lt;br /&gt;
install-strip: all&lt;br /&gt;
        mkdir -p $(DESTDIR)$(vlclibdir)/&lt;br /&gt;
        install -s -m 0755 libx264_plugin.so $(DESTDIR)$(vlclibdir)/&lt;br /&gt;
&lt;br /&gt;
uninstall:&lt;br /&gt;
        rm -f -- $(DESTDIR)$(vlclibdir)/libx264_plugin.so&lt;br /&gt;
&lt;br /&gt;
.PHONY: all clean install uninstall&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===With autotools===&lt;br /&gt;
If using automake and libtool, you can follow this example Makefile.am instead:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vlclibdir = $(libdir)/vlc&lt;br /&gt;
&lt;br /&gt;
vlclib_libx264_plugin_la_SOURCES = x264.c&lt;br /&gt;
vlclib_libx264_plugin_la_CFLAGS = $(VLC_PLUGIN_CFLAGS) $(X264_CFLAGS) \&lt;br /&gt;
      -D__PLUGIN__ -DMODULE_STRING=\&amp;quot;x264\&amp;quot;&lt;br /&gt;
vlclib_libx264_plugin_la_LIBADD = $(VLC_PLUGIN_LIBS) $(X264_LIBS)&lt;br /&gt;
vlclib_libx264_plugin_la_LDFLAGS = \&lt;br /&gt;
      -avoid-version -module -export-symbol-regex ^vlc_entry&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Manolamancha</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:VLC_Modules_Loading&amp;diff=18692</id>
		<title>Documentation:VLC Modules Loading</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:VLC_Modules_Loading&amp;diff=18692"/>
		<updated>2011-02-11T22:47:36Z</updated>

		<summary type="html">&lt;p&gt;Manolamancha: /* How does the loading of modules happens */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;VLC modules loading&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
= How does VLC load modules?  =&lt;br /&gt;
&lt;br /&gt;
== Introduction about Modules  ==&lt;br /&gt;
&lt;br /&gt;
VLC has a core and a lot of modules (between 200 and 400 depending on the build). &lt;br /&gt;
&lt;br /&gt;
VLC cannot do much without modules, since modules are providing most of the functionnalities we expect. See the &amp;quot;Major Capabilites&amp;quot; sections. &lt;br /&gt;
&lt;br /&gt;
A VLC module has 2 &#039;&#039;major&#039;&#039; &#039;&#039;properties&#039;&#039;: &lt;br /&gt;
&lt;br /&gt;
*the capability, VLC_MODULE_CAPABILITY, that describes the category of the module &lt;br /&gt;
*the score, VLC_MODULE_SCORE, that holds the priority of the module&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How does the loading of modules happens  ==&lt;br /&gt;
&lt;br /&gt;
The first time you load VLC, it will scan for default &#039;&#039;&#039;plugins&#039;&#039;&#039; directories that should contain VLC modules and generates a cache (named the &#039;&#039;&#039;plugins cache&#039;&#039;&#039;) so that the modules can be loaded quickly the next time VLC launches. Modules can be organized into directories (up to 5 layers deep) beneath the &#039;&#039;&#039;plugins&#039;&#039;&#039; directory. &lt;br /&gt;
&lt;br /&gt;
Recent versions of VLC require that the modules follow a specific naming convention or they will not be loaded. Modules must be named in the following format: &#039;&#039;&#039;lib&#039;&#039;module_name&#039;&#039;_plugin.&#039;&#039;ext&#039;&#039;&#039;&#039;&#039; where &#039;&#039;module_name&#039;&#039; should be the name of your module in lower case, and &#039;&#039;ext&#039;&#039; is the system&#039;s shared library extension. For example, the &#039;&#039;&#039;http&#039;&#039;&#039; access module is named &#039;&#039;&#039;libaccess_http_plugin.dll&#039;&#039;&#039; on a Windows machine.&lt;br /&gt;
&lt;br /&gt;
When VLC needs a module, it tries to open a the higher-score capability-matching module that accept the request.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let&#039;s do an &#039;&#039;&#039;example&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
When VLC needs a &amp;quot;decoder&amp;quot; (&amp;quot;decoder&amp;quot; is one category/capability), it opens all &amp;quot;decoder&amp;quot; modules, until one matches. &lt;br /&gt;
&lt;br /&gt;
It opens them in decreasing score order (bigger score first, smaller ones at the end), and runs the Open() function of the modules. When one module returns OK, VLC uses this module.&lt;br /&gt;
&lt;br /&gt;
== Advanced infos about modules loading ==&lt;br /&gt;
&lt;br /&gt;
=== Score of 0  ===&lt;br /&gt;
&lt;br /&gt;
If a module has a score of 0, it needs to be explicitly requested by the user (like forcing --codec or --vout) to be loaded.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
=== all, none and other special tweaks  ===&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;&amp;quot;all&amp;quot;&#039;&#039;&#039; mode means all modules will be tested in decreasing order of score.&lt;br /&gt;
&lt;br /&gt;
*The &#039;&#039;&#039;&amp;quot;none&amp;quot;&#039;&#039;&#039; mode means no modules will be tested.&lt;br /&gt;
&lt;br /&gt;
*Any module can be requested by using its direct shortname. This is useful for 0-scored modules.&lt;br /&gt;
&lt;br /&gt;
=== examples  ===&lt;br /&gt;
&lt;br /&gt;
Modules requests can be chained, as the &#039;&#039;&#039;examples&#039;&#039;&#039; show: &lt;br /&gt;
&lt;br /&gt;
 --codec avcodec,all&lt;br /&gt;
 &#039;&#039;try the avcodec module than all modules as a &amp;quot;decoder&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 --demux avformat,none&lt;br /&gt;
 &#039;&#039; try the avformat module and no other module&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
By default, modules requests are in the &#039;&#039;&#039;&amp;quot;all&amp;quot;&#039;&#039;&#039; mode, and &amp;quot;all&amp;quot; can be omitted. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to list Modules  ==&lt;br /&gt;
&lt;br /&gt;
*Using Console&lt;br /&gt;
&lt;br /&gt;
 vlc --list&lt;br /&gt;
&lt;br /&gt;
*Using GUI&lt;br /&gt;
&lt;br /&gt;
 Menu -&amp;amp;gt; Tools -&amp;amp;gt; Plugins and extensions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Major Capabilities of Modules =&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;audio filter&#039;&#039;&#039; : an audio filter, like an equalizer&lt;br /&gt;
*&#039;&#039;&#039;audio mixer&#039;&#039;&#039;  : an audio channel mixer, like a downmixer&lt;br /&gt;
*&#039;&#039;&#039;audio output&#039;&#039;&#039;  : an audio output, like Windows DirectX audio output&lt;br /&gt;
*&#039;&#039;&#039;decoder&#039;&#039;&#039;  : a codec decoder, like theora&lt;br /&gt;
*&#039;&#039;&#039;demux&#039;&#039;&#039;  : a demuxer, to open a file format, like mkv&lt;br /&gt;
*&#039;&#039;&#039;encoder&#039;&#039;&#039;  : a codec encoder, like x264&lt;br /&gt;
*&#039;&#039;&#039;interface&#039;&#039;&#039;  : an interface, like the Qt interface&lt;br /&gt;
*&#039;&#039;&#039;meta reader&#039;&#039;&#039;  : a meta reader, to read metadata&lt;br /&gt;
*&#039;&#039;&#039;packetizer&#039;&#039;&#039; : a packetizer&lt;br /&gt;
*&#039;&#039;&#039;playlist export&#039;&#039;&#039; : a module to write playlist, like .m3u&lt;br /&gt;
*&#039;&#039;&#039;services_discovery&#039;&#039;&#039; : a module to get extra content from your computer or the network, like Upnp, DLNA&lt;br /&gt;
*&#039;&#039;&#039;sout access&#039;&#039;&#039; : an access for the streaming&lt;br /&gt;
*&#039;&#039;&#039;sout mux&#039;&#039;&#039; : a muxer when streaming and encoding&lt;br /&gt;
*&#039;&#039;&#039;stream_filter&#039;&#039;&#039; : a stream filter&lt;br /&gt;
*&#039;&#039;&#039;text renderer&#039;&#039;&#039; : a way to display subtitles and other text on top of the video&lt;br /&gt;
*&#039;&#039;&#039;video filter&#039;&#039;&#039; : a video filter, like contrast adjusting&lt;br /&gt;
*&#039;&#039;&#039;visualization2&#039;&#039;&#039; : a visualizer, to create videos from the music&lt;br /&gt;
*&#039;&#039;&#039;vout display&#039;&#039;&#039; : a video output, to display videos like Direct3D or Xv&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Manolamancha</name></author>
	</entry>
</feed>