<?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=Elindsey</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=Elindsey"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Elindsey/"/>
	<updated>2026-11-04T14:52:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=27515</id>
		<title>Win32Compile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=27515"/>
		<updated>2014-11-29T06:07:40Z</updated>

		<summary type="html">&lt;p&gt;Elindsey: /* Fix your contrib path */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will help you to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MinGW on Linux&#039;&#039;&#039; &lt;br /&gt;
| [[Win32Compile#Obtaining_the_toolchain|Obtaining the toolchain]]&lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method (uses cross compilation). On Windows, you should do it in a virtual machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;[http://www.mingw.org MSYS+MinGW]&#039;&#039;&#039; on Windows&lt;br /&gt;
| [[Win32CompileMSYS|Compile with MSys]] &lt;br /&gt;
| &#039;&#039;&#039;Native&#039;&#039;&#039; compilation method. Note: This is not supported. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows. Good luck.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cygwin&#039;&#039;&#039; on Windows&lt;br /&gt;
| [[Win32CompileCygwinNew|Compile with Cygwin]] &lt;br /&gt;
| Build using cygwin as your compile environment. &#039;&#039;&#039;Error&#039;&#039;&#039; prone, and &#039;&#039;&#039;slow&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Obtaining the cross-compilation toolchain  ==&lt;br /&gt;
&lt;br /&gt;
=== Compiler and binary toolchain ===&lt;br /&gt;
&lt;br /&gt;
==== Mingw-w64 ====&lt;br /&gt;
To compile VLC for Windows (32-bits or 64-bits), the Mingw-w64 toolchain is required:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039;: run &amp;lt;code&amp;gt;apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools&amp;lt;/code&amp;gt;&lt;br /&gt;
For the 64-bit version, this becomes &amp;lt;code&amp;gt;apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-tools&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(on Debian you must be on wheezy or above to find this package)&lt;br /&gt;
&lt;br /&gt;
You might want to use the following script to enforce static compilation.&lt;br /&gt;
Run as root, and use at your own risk.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 # This script enforces statically linking of libgcc, libstdc++-6, and libpthread,&lt;br /&gt;
 # without needing to rebuild gcc and mingw-w64 from scratch.&lt;br /&gt;
 # -static-libgcc -static-libstdc++ flags can not be used in a libtool build system,&lt;br /&gt;
 # as libtool removes flags that it doesn&#039;t understand.&lt;br /&gt;
 &lt;br /&gt;
 move() {&lt;br /&gt;
     [ -f $1 ] || return 1&lt;br /&gt;
     mkdir -p old/&lt;br /&gt;
     mv -v $* old/&lt;br /&gt;
     return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 for x in i686 x86_64&lt;br /&gt;
 do&lt;br /&gt;
     library_path_list=`$x-w64-mingw32-gcc -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|sort|uniq`&lt;br /&gt;
     IFS=&#039;:&#039;&lt;br /&gt;
     for i in $library_path_list&lt;br /&gt;
     do&lt;br /&gt;
         cd $i&lt;br /&gt;
         move libstdc++-6.dll libstdc++.dll.a libgcc_s.a libgcc_s_sjlj-1.dll &amp;amp;&amp;amp; ln -s libgcc_eh.a libgcc_s.a&lt;br /&gt;
         move libpthread.dll.a libwinpthread.dll.a&lt;br /&gt;
         move libwinpthread-1.dll&lt;br /&gt;
         [ -d ../bin ] &amp;amp;&amp;amp; cd ../bin &amp;amp;&amp;amp; move libwinpthread-1.dll&lt;br /&gt;
     done&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
==== Mingw32 ====&lt;br /&gt;
Up to versions 2.0.x, VLC was compiled with the older mingw32 toolchain, which only supports 32-bits Windows. If you have problems with mingw-w64, you can try mingw32 instead:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039;: run &amp;lt;code&amp;gt;apt-get install gcc-mingw32 mingw32-binutils&amp;lt;/code&amp;gt;. Note that at least version 3.17 of Mingw32 is required, which Debian does not provide. You may obtain mingw32-runtime-3.17 [http://people.videolan.org/~jb/debian/mingw32-runtime_3.17.0-0videolan_all.deb here].&lt;br /&gt;
* &#039;&#039;&#039;Gentoo&#039;&#039;&#039; users can &amp;lt;code&amp;gt;emerge crossdev &amp;amp;amp;&amp;amp;amp; crossdev mingw32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ArchLinux&#039;&#039;&#039; users can &amp;lt;code&amp;gt;pacman -S mingw32-gcc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Fedora&#039;&#039;&#039; users should read [[Win32Compile Under Fedora]]&lt;br /&gt;
* Other &#039;&#039;&#039;Linux&#039;&#039;&#039; systems may attempt http://www.mingw.org/wiki/LinuxCrossMinGW&lt;br /&gt;
&lt;br /&gt;
=== Development tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua (5.1 or 5.2)&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* qt4-dev-tools, qt5-default&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* wine-dev for creating Win32 packages&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer], bzip2 [for &#039;make prebuild]&lt;br /&gt;
&lt;br /&gt;
=== Host triplet ===&lt;br /&gt;
A number of example commands below include the identifier of the toolchain. This value is &#039;&#039;&#039;essential&#039;&#039;&#039;: it instructs the build system to use the correct toolchain and compile the program for Windows. Without the value, the build system will perform a native compilation for Linux (or whatever your computer runs). With an incorrect value, the build will fail.&lt;br /&gt;
&lt;br /&gt;
This is known as the &#039;&#039;host triplet&#039;&#039;, although it&#039;s more of a pair than a triplet in the case of Mingw. The exact value depends on your installation of the toolchain. Notably on Debian/Ubuntu, these values must be used:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;i686-w64-mingw32&#039;&#039; for Windows 32-bits, using the Mingw-w64 toolchain&lt;br /&gt;
* &#039;&#039;x86_64-w64-mingw32&#039;&#039; for Windows 64-bits, using the Mingw-w64 toolchain&lt;br /&gt;
* &#039;&#039;i586-mingw32msvc&#039;&#039; for Windows 32-bits, using the Mingw32 toolchain&lt;br /&gt;
&lt;br /&gt;
Again, you &#039;&#039;&#039;MUST&#039;&#039;&#039; substitute the value in the following command snippets.&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git vlc&lt;br /&gt;
&lt;br /&gt;
See [[Git]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Go into the VLC directory ==&lt;br /&gt;
 $ cd vlc&lt;br /&gt;
&lt;br /&gt;
== Prepare [[Contrib Status|3rd party libraries]]  ==&lt;br /&gt;
&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i686-w64-mingw32&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
  # apt-get install subversion yasm cvs cmake&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i686-w64-mingw32&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64-bit ===&lt;br /&gt;
&lt;br /&gt;
If you are on Linux &#039;&#039;&#039;64-bit&#039;&#039;&#039;, you &#039;&#039;&#039;SHOULD&#039;&#039;&#039; remove some files, or install the lib32 packages (ia32-libs, multilibs, etc...)&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i686-w64-mingw32/bin/moc ../i686-w64-mingw32/bin/uic ../i686-w64-mingw32/bin/rcc&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your host triplet is not &#039;&#039;&#039;i686-w64-mingw32&#039;&#039;&#039; (you are &#039;&#039;not&#039;&#039; compiling for Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
 $ ln -sf &#039;&#039;&#039;&#039;&#039;insert_your_host_triplet_here&#039;&#039;&#039;&#039;&#039; ../i686-w64-mingw32&lt;br /&gt;
So, for example:&lt;br /&gt;
 $ ln -sf x86_64-w64-mingw32 ../i686-w64-mingw32&lt;br /&gt;
Notice that there is no &amp;lt;code&amp;gt;../&amp;lt;/code&amp;gt; before the host triplet. This is intentional, and if done properly, you should see a functioning symbolic link created in the parent directory (try &amp;lt;code&amp;gt;ls -l ..&amp;lt;/code&amp;gt; and you should see &amp;lt;code&amp;gt;i686-w64-mingw32 -&amp;gt; x86_64-w64-mingw32/&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
=== Go Back  ===&lt;br /&gt;
&lt;br /&gt;
Go back to the VLC source directory: &lt;br /&gt;
&lt;br /&gt;
  $ cd -&lt;br /&gt;
&lt;br /&gt;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Set your PKG_CONFIG_LIBDIR&lt;br /&gt;
  $ export PKG_CONFIG_LIBDIR=$HOME/vlc/contrib/i686-w64-mingw32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i686-w64-mingw32&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; cross-compiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also, if you have a problem here (such as an error about Library dvdread), see the [[Talk:Win32Compile|Talk]] page.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i686-w64-mingw32&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages with the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>Elindsey</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=27514</id>
		<title>Win32Compile</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32Compile&amp;diff=27514"/>
		<updated>2014-11-29T05:48:49Z</updated>

		<summary type="html">&lt;p&gt;Elindsey: /* Configure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will help you to compile {{VLC}} for [[Windows]].&lt;br /&gt;
&lt;br /&gt;
== Building Methods ==&lt;br /&gt;
&lt;br /&gt;
If you want to build VLC from source, you have several choices: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Method &lt;br /&gt;
! Documentation &lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;MinGW on Linux&#039;&#039;&#039; &lt;br /&gt;
| [[Win32Compile#Obtaining_the_toolchain|Obtaining the toolchain]]&lt;br /&gt;
| &#039;&#039;&#039;Preferred&#039;&#039;&#039; method (uses cross compilation). On Windows, you should do it in a virtual machine.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;[http://www.mingw.org MSYS+MinGW]&#039;&#039;&#039; on Windows&lt;br /&gt;
| [[Win32CompileMSYS|Compile with MSys]] &lt;br /&gt;
| &#039;&#039;&#039;Native&#039;&#039;&#039; compilation method. Note: This is not supported. MSYS is a minimal build environment to compile Unixish projects under Microsoft Windows. Good luck.&lt;br /&gt;
|-&lt;br /&gt;
| &#039;&#039;&#039;Cygwin&#039;&#039;&#039; on Windows&lt;br /&gt;
| [[Win32CompileCygwinNew|Compile with Cygwin]] &lt;br /&gt;
| Build using cygwin as your compile environment. &#039;&#039;&#039;Error&#039;&#039;&#039; prone, and &#039;&#039;&#039;slow&#039;&#039;&#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Obtaining the cross-compilation toolchain  ==&lt;br /&gt;
&lt;br /&gt;
=== Compiler and binary toolchain ===&lt;br /&gt;
&lt;br /&gt;
==== Mingw-w64 ====&lt;br /&gt;
To compile VLC for Windows (32-bits or 64-bits), the Mingw-w64 toolchain is required:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039;: run &amp;lt;code&amp;gt;apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-tools&amp;lt;/code&amp;gt;&lt;br /&gt;
For the 64-bit version, this becomes &amp;lt;code&amp;gt;apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-tools&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(on Debian you must be on wheezy or above to find this package)&lt;br /&gt;
&lt;br /&gt;
You might want to use the following script to enforce static compilation.&lt;br /&gt;
Run as root, and use at your own risk.&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 # This script enforces statically linking of libgcc, libstdc++-6, and libpthread,&lt;br /&gt;
 # without needing to rebuild gcc and mingw-w64 from scratch.&lt;br /&gt;
 # -static-libgcc -static-libstdc++ flags can not be used in a libtool build system,&lt;br /&gt;
 # as libtool removes flags that it doesn&#039;t understand.&lt;br /&gt;
 &lt;br /&gt;
 move() {&lt;br /&gt;
     [ -f $1 ] || return 1&lt;br /&gt;
     mkdir -p old/&lt;br /&gt;
     mv -v $* old/&lt;br /&gt;
     return 0&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 for x in i686 x86_64&lt;br /&gt;
 do&lt;br /&gt;
     library_path_list=`$x-w64-mingw32-gcc -v /dev/null 2&amp;gt;&amp;amp;1 | grep ^LIBRARY_PATH|cut -d= -f2|sort|uniq`&lt;br /&gt;
     IFS=&#039;:&#039;&lt;br /&gt;
     for i in $library_path_list&lt;br /&gt;
     do&lt;br /&gt;
         cd $i&lt;br /&gt;
         move libstdc++-6.dll libstdc++.dll.a libgcc_s.a libgcc_s_sjlj-1.dll &amp;amp;&amp;amp; ln -s libgcc_eh.a libgcc_s.a&lt;br /&gt;
         move libpthread.dll.a libwinpthread.dll.a&lt;br /&gt;
         move libwinpthread-1.dll&lt;br /&gt;
         [ -d ../bin ] &amp;amp;&amp;amp; cd ../bin &amp;amp;&amp;amp; move libwinpthread-1.dll&lt;br /&gt;
     done&lt;br /&gt;
 done&lt;br /&gt;
 &lt;br /&gt;
 exit 0&lt;br /&gt;
&lt;br /&gt;
==== Mingw32 ====&lt;br /&gt;
Up to versions 2.0.x, VLC was compiled with the older mingw32 toolchain, which only supports 32-bits Windows. If you have problems with mingw-w64, you can try mingw32 instead:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Debian/Ubuntu&#039;&#039;&#039;: run &amp;lt;code&amp;gt;apt-get install gcc-mingw32 mingw32-binutils&amp;lt;/code&amp;gt;. Note that at least version 3.17 of Mingw32 is required, which Debian does not provide. You may obtain mingw32-runtime-3.17 [http://people.videolan.org/~jb/debian/mingw32-runtime_3.17.0-0videolan_all.deb here].&lt;br /&gt;
* &#039;&#039;&#039;Gentoo&#039;&#039;&#039; users can &amp;lt;code&amp;gt;emerge crossdev &amp;amp;amp;&amp;amp;amp; crossdev mingw32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;ArchLinux&#039;&#039;&#039; users can &amp;lt;code&amp;gt;pacman -S mingw32-gcc&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Fedora&#039;&#039;&#039; users should read [[Win32Compile Under Fedora]]&lt;br /&gt;
* Other &#039;&#039;&#039;Linux&#039;&#039;&#039; systems may attempt http://www.mingw.org/wiki/LinuxCrossMinGW&lt;br /&gt;
&lt;br /&gt;
=== Development tools ===&lt;br /&gt;
You will also need:&lt;br /&gt;
* lua (5.1 or 5.2)&lt;br /&gt;
* all autotools: libtool, automake, autoconf, autopoint, make, gettext&lt;br /&gt;
* pkg-config&lt;br /&gt;
* qt4-dev-tools, qt5-default&lt;br /&gt;
* git&lt;br /&gt;
* subversion&lt;br /&gt;
* cmake, cvs if you want to rebuild contribs&lt;br /&gt;
* wine-dev for creating Win32 packages&lt;br /&gt;
* zip [for creating .zip package], p7zip [for .7z package], nsis [for .exe auto-installer], bzip2 [for &#039;make prebuild]&lt;br /&gt;
&lt;br /&gt;
=== Host triplet ===&lt;br /&gt;
A number of example commands below include the identifier of the toolchain. This value is &#039;&#039;&#039;essential&#039;&#039;&#039;: it instructs the build system to use the correct toolchain and compile the program for Windows. Without the value, the build system will perform a native compilation for Linux (or whatever your computer runs). With an incorrect value, the build will fail.&lt;br /&gt;
&lt;br /&gt;
This is known as the &#039;&#039;host triplet&#039;&#039;, although it&#039;s more of a pair than a triplet in the case of Mingw. The exact value depends on your installation of the toolchain. Notably on Debian/Ubuntu, these values must be used:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;i686-w64-mingw32&#039;&#039; for Windows 32-bits, using the Mingw-w64 toolchain&lt;br /&gt;
* &#039;&#039;x86_64-w64-mingw32&#039;&#039; for Windows 64-bits, using the Mingw-w64 toolchain&lt;br /&gt;
* &#039;&#039;i586-mingw32msvc&#039;&#039; for Windows 32-bits, using the Mingw32 toolchain&lt;br /&gt;
&lt;br /&gt;
Again, you &#039;&#039;&#039;MUST&#039;&#039;&#039; substitute the value in the following command snippets.&lt;br /&gt;
&lt;br /&gt;
== Get the source code ==&lt;br /&gt;
 $ git clone git://git.videolan.org/vlc.git vlc&lt;br /&gt;
&lt;br /&gt;
See [[Git]] for more information.&lt;br /&gt;
&lt;br /&gt;
== Go into the VLC directory ==&lt;br /&gt;
 $ cd vlc&lt;br /&gt;
&lt;br /&gt;
== Prepare [[Contrib Status|3rd party libraries]]  ==&lt;br /&gt;
&lt;br /&gt;
Before compiling VLC, you need lots of other libraries. Here is how to get them: &lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i686-w64-mingw32&lt;br /&gt;
  $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
or, if you want to compile the contribs yourself and are feeling adventurous and have lots of time to burn,&lt;br /&gt;
  # apt-get install subversion yasm cvs cmake&lt;br /&gt;
&lt;br /&gt;
  $ mkdir -p contrib/win32&lt;br /&gt;
  $ cd contrib/win32&lt;br /&gt;
  $ ../bootstrap --host=i686-w64-mingw32&lt;br /&gt;
  $ make fetch&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
=== Linux 64-bit ===&lt;br /&gt;
&lt;br /&gt;
If you are on Linux &#039;&#039;&#039;64-bit&#039;&#039;&#039;, you &#039;&#039;&#039;SHOULD&#039;&#039;&#039; remove some files, or install the lib32 packages (ia32-libs, multilibs, etc...)&lt;br /&gt;
&lt;br /&gt;
  $ rm -f ../i686-w64-mingw32/bin/moc ../i686-w64-mingw32/bin/uic ../i686-w64-mingw32/bin/rcc&lt;br /&gt;
&lt;br /&gt;
=== Fix your contrib path ===&lt;br /&gt;
&lt;br /&gt;
If your Mingw prefix is not &#039;&#039;i686-w64-mingw32&#039;&#039; (you are NOT on Debian or Ubuntu), create a symlink to contribs:&lt;br /&gt;
  $ ln -sf ../i686-w64-mingw32 ../i486-mingw32&lt;br /&gt;
&lt;br /&gt;
=== Go Back  ===&lt;br /&gt;
&lt;br /&gt;
Go back to the VLC source directory: &lt;br /&gt;
&lt;br /&gt;
  $ cd -&lt;br /&gt;
&lt;br /&gt;
== Configuring the build  ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap ===&lt;br /&gt;
First, prepare the tree:&lt;br /&gt;
  $ ./bootstrap&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
Then you can to configure the build with the &amp;lt;code&amp;gt;./configure&amp;lt;/code&amp;gt; script. &lt;br /&gt;
&lt;br /&gt;
Create a subfolder:&lt;br /&gt;
  $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
&lt;br /&gt;
Set your PKG_CONFIG_LIBDIR&lt;br /&gt;
  $ export PKG_CONFIG_LIBDIR=$HOME/vlc/contrib/i686-w64-mingw32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
Use the standard configuration: &lt;br /&gt;
 $ ../extras/package/win32/configure.sh --host=i686-w64-mingw32&lt;br /&gt;
&#039;&#039;&#039;NB&#039;&#039;&#039;: use &#039;&#039;&#039;YOUR&#039;&#039;&#039; cross-compiling prefix here, like &#039;&#039;i486-mingw32&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also, if you have a problem here (such as an error about Library dvdread), see the [[Talk:Win32Compile|Talk]] page.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can run configure manually:&lt;br /&gt;
 $ ../configure --host=i686-w64-mingw32&lt;br /&gt;
See &amp;lt;code&amp;gt;&#039;../configure --help&#039;&amp;lt;/code&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
== Building VLC  ==&lt;br /&gt;
&lt;br /&gt;
Once configured, to build VLC, just run:&lt;br /&gt;
  $ make&lt;br /&gt;
&lt;br /&gt;
== Packaging VLC ==&lt;br /&gt;
Once the compilation is done, you can build self-contained VLC packages with the following &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; rules: &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Command &lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-common&amp;lt;/code&amp;gt;&lt;br /&gt;
| Creates a subdirectory named &amp;lt;code&amp;gt;vlc-x.x.x&amp;lt;/code&amp;gt; with all the binaries. You can run VLC directly from this directory.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win-strip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will create &#039;stripped&#039; binaries (that is, smallest size, unusable with a debugger).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-7zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a 7z file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32-zip&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will package the directory in a zip file.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;make package-win32&amp;lt;/code&amp;gt;&lt;br /&gt;
| Same as above but will also create an auto-installer package. You must have NSIS installed in its default location for this to work.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Well done—you&#039;re ready to use VLC!&#039;&#039;&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
[[Category:Building]]&lt;/div&gt;</summary>
		<author><name>Elindsey</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Hacker_Guide/Core&amp;diff=27496</id>
		<title>Hacker Guide/Core</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Hacker_Guide/Core&amp;diff=27496"/>
		<updated>2014-11-24T18:50:17Z</updated>

		<summary type="html">&lt;p&gt;Elindsey: /* Synchronization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction to libVLCcore  ==&lt;br /&gt;
&lt;br /&gt;
The core of {{VLC}} is called [[LibVLCcore|&#039;&#039;&#039;libVLCcore&#039;&#039;&#039;]].&amp;lt;br&amp;gt;&lt;br /&gt;
It manages the threads, the modules (codecs, demuxers, etc...), the modules&#039; layers, the clocks, the playlist and all low-level control in VLC.&amp;lt;br&amp;gt;For example, it is responsible for the synchronization management between all the audio, video and subtitle tracks. &lt;br /&gt;
&lt;br /&gt;
On top of libVLCcore, there is [[LibVLC|&#039;&#039;&#039;libVLC&#039;&#039;&#039;]] that allow external application builders to access to all features of the core.&amp;lt;br&amp;gt; Modules are linked with libvlccore, to interact with the core. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Modules are built against libvlccore. External applications are built against [[LibVLC|libVLC]].&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== VLC Pipeline and Modularity ==&lt;br /&gt;
&lt;br /&gt;
One of the main concepts in VLC is &amp;quot;&#039;&#039;&#039;&#039;&#039;modularity&#039;&#039;&#039;&#039;&#039;&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
VLC is, in fact, a complete [http://en.wikipedia.org/wiki/Multimedia_framework multimedia framework] (like DirectShow or GStreamer) where you can load and plug-in many modules dynamically, depending on the necessity. &lt;br /&gt;
&lt;br /&gt;
The core framework is used to do the &amp;quot;wiring&amp;quot; and the media processing, from input (files, network streams) to output (audio or video, on a screen or a network). It uses modules to do most of the work at every stage (various muxers, demuxers, decoders, filters and outputs).&amp;lt;br&amp;gt; Even the interfaces are plugins for libVLC. &lt;br /&gt;
&lt;br /&gt;
=== The modules in VLC  ===&lt;br /&gt;
&lt;br /&gt;
So, VLC uses &#039;&#039;&#039;modules&#039;&#039;&#039; to do most of the work, at every stage of the pipeline. Modules are loaded accordingly at runtime depending on the necessity. (See [[Documentation:VLC_Modules_Loading|VLC Modules loading mechanism]]).&lt;br /&gt;
&lt;br /&gt;
Every module offers different features that will best suit a particular use-case or a particular environment.&amp;lt;br&amp;gt;&lt;br /&gt;
Besides, most portability of VLC results from writing [[Documentation:Hacker%27s_Guide/Audio_Output|audio_output]]/[[Documentation:Hacker%27s_Guide/Video_Output|video_output]]/[[Documentation:Hacker%27s_Guide/Interfaces|interface]] modules specific to the platform.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;plugins&#039;&#039;&#039; modules are loaded and unloaded dynamically by functions in src/modules/modules.c .&amp;lt;br&amp;gt;&lt;br /&gt;
Modules can also be built directly into the application which uses libVLC, for instance when VLC is on an operating system that does not have support for dynamically loadable code. They are then called &#039;&#039;&#039;builtins&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In the [[Documentation:Modules_source_tree|source code]], modules are usually located inside the [[Documentation:Modules_source_tree|modules/ subdirectory]].&lt;br /&gt;
&lt;br /&gt;
== Thread management  ==&lt;br /&gt;
&lt;br /&gt;
VLC is heavily multi-threaded.&lt;br /&gt;
&lt;br /&gt;
The single-threaded approach would have introduced too much complexity because decoder preemptibility and scheduling would then be a mastermind (for instance decoders and outputs have to be separated, otherwise it cannot be warrantied that a frame will be played at the exact presentation time).&amp;lt;br&amp;gt;&lt;br /&gt;
Multi-process approach wasn&#039;t chosen either, because multi-process decoders usually imply more overhead (problems of shared memory) and communication between processes is harder.&lt;br /&gt;
&lt;br /&gt;
VLC&#039;s threading structure is modeled after POSIX threads (&#039;&#039;pthread&#039;&#039;). However, for portability reasons, VLC does not use pthread_* functions directly, but a similar custom set of APIs.&lt;br /&gt;
&lt;br /&gt;
=== Threads (vlc_thread_t) ===&lt;br /&gt;
* vlc_clone() creates a thread.&lt;br /&gt;
* vlc_join() waits for a thread to terminate and releases its resources&lt;br /&gt;
&lt;br /&gt;
=== Mutual exclusion (vlc_mutex_t) ===&lt;br /&gt;
* vlc_mutex_init() creates a non-recursive mutex.&lt;br /&gt;
* vlc_mutex_init_recursive() creates a recursive mutex (discouraged).&lt;br /&gt;
* vlc_mutex_lock() locks a mutex, waiting if required.&lt;br /&gt;
* vlc_mutex_trylock() locks a mutex if it is not already locked, or returns an error otherwise.&lt;br /&gt;
* vlc_mutex_unlock() unlocks a mutex.&lt;br /&gt;
* vlc_mutex_destroy() destroys a mutex.&lt;br /&gt;
&lt;br /&gt;
=== Condition variable (vlc_cond_t) ===&lt;br /&gt;
* vlc_cond_init() creates a condition variable using the monotonic clock (&#039;&#039;mdate()&#039;&#039;) for timeouts.&lt;br /&gt;
* vlc_cond_init_daytime() creates a condition variable using the realtime clock / wall clock for timeouts.&lt;br /&gt;
* vlc_cond_signal() signals one thread waiting on a condition variable.&lt;br /&gt;
* vlc_cond_broadcast() signals all threads waiting on a condition variable.&lt;br /&gt;
* vlc_cond_wait() waits for a condition variable to be signaled (can also wake up spuriously).&lt;br /&gt;
* vlc_cond_timedwait() waits for a condition variable to be signaled up to a certain timeout (can also wake up spuriosuly).&lt;br /&gt;
* vlc_cond_destroy() destroys a condition variable.&lt;br /&gt;
&lt;br /&gt;
=== Misc ===&lt;br /&gt;
VLC also has abstractions for slim read/write locks, spin locks, thread-specific variables, similar to POSIX threads.&lt;br /&gt;
&lt;br /&gt;
=== Atomic variables ===&lt;br /&gt;
Atomic variables are small (sizeof(void *)) values that can be manipulated from multiple threads without locking. See include/vlc_atomic.h for the list of supported operations.&lt;br /&gt;
&lt;br /&gt;
== Synchronization  ==&lt;br /&gt;
&lt;br /&gt;
Another key feature of VLC is that decoding and playing are asynchronous: decoding is done by a decoder thread, playing is done by audio_output or video_output thread. The design goal is to ensure that an audio or video frame is played exactly at the right time, without blocking any of the decoder threads. This leads to a complex communication structure between the interface, the input, the decoders and the outputs. &lt;br /&gt;
&lt;br /&gt;
Having several input and video_output threads reading multiple files at the same time is permitted, despite the fact that the current interface doesn&#039;t allow any way to do it (this is subject to change in the near future). Anyway the client has been written from the ground up with this in mind. This also implies that a non-reentrant library (including in particular liba52&amp;lt;sup&amp;gt;[[Talk:Hacker Guide/Core|See talk page]]&amp;lt;/sup&amp;gt;) cannot be used without using a global lock. &lt;br /&gt;
&lt;br /&gt;
Presentation Time Stamps located in the system layer of the stream are passed to the decoders, and all resulting samples are dated accordingly. The output layers are supposed to play them at the right time. Dates are converted to microseconds&amp;amp;nbsp;; an absolute date is the number of microseconds since Epoch (Jan 1st, 1970). The mtime_t type is a signed 64-bit integer. &lt;br /&gt;
&lt;br /&gt;
The current date can be retrieved with mdate(). The execution of a thread can be suspended until a certain date via mwait ( mtime_t date ). You can sleep for a fixed number of microseconds with msleep ( mtime_t delay ). &lt;br /&gt;
&lt;br /&gt;
=== Warning  ===&lt;br /&gt;
&lt;br /&gt;
Please remember to wake up slightly before the presentation date, if some particular treatment needs to be done (e.g. a chroma transformation). For instance in modules/codec/libmpeg2.c, track of the average decoding times is kept to ensure pictures are not decoded too late.&lt;br /&gt;
&lt;br /&gt;
== Core Source code details  ==&lt;br /&gt;
&lt;br /&gt;
All the [[LibVLCcore|libVLCcore]] source files are located in the src/ directory and its subdirectories: &lt;br /&gt;
&lt;br /&gt;
*[[Documentation:Hacker&#039;s Guide/Audio Output|audio_output/]]: initializes the audio mixer, ie. finds the right playing frequency, and then resamples audio frames received from the decoder(s). &lt;br /&gt;
*config/: load the configuration from command line and configuration file, provides functions for the modules to read and write to configuration &lt;br /&gt;
*control/: functions to control the behaviour of [[LibVLCcore|libVLCcore]], like Play/Pause, volume management, fullscreen, log verbosity, etc. &lt;br /&gt;
*extras/: mostly platform-specific code &lt;br /&gt;
*[[Documentation:Hacker&#039;s Guide/Input|input/]]: opens an input module, reads packets, parses them and passes reconstituted elementary streams to the decoder(s).*modules/: module management &lt;br /&gt;
*[[Documentation:Hacker&#039;s Guide/Interfaces|interface/]]: contains code for user interaction such as key presses and device ejection. &lt;br /&gt;
*misc/: miscellaneous utilities used in other parts of libvlc, such as the thread system, the message queue, CPU detection, the object lookup system, or platform-specific code. &lt;br /&gt;
*modules/: modules management &lt;br /&gt;
*network/: network interface (socket management, network errors, etc.) &lt;br /&gt;
*osd/: On Screen Display manipulation &lt;br /&gt;
*playlist/: manages playlist interaction such as stop, play, next, or random playback. &lt;br /&gt;
*stream_output/: functions to stream audio and video to the network &lt;br /&gt;
*test/: libVLC needs to be tested, and not only by users&amp;amp;nbsp;:) &lt;br /&gt;
*text/: charset stuff &lt;br /&gt;
*[[Documentation:Hacker&#039;s Guide/Video Output|video_output/]]: initializes the video display, gets all pictures and subpictures (ie. subtitles) from the decoder(s), optionally converts them to another format (such as YUV to RGB), and displays them.&lt;br /&gt;
&lt;br /&gt;
{{Hacker_Guide}}&lt;/div&gt;</summary>
		<author><name>Elindsey</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Talk:Hacker_Guide/Core&amp;diff=27495</id>
		<title>Talk:Hacker Guide/Core</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Talk:Hacker_Guide/Core&amp;diff=27495"/>
		<updated>2014-11-24T18:45:40Z</updated>

		<summary type="html">&lt;p&gt;Elindsey: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Based on the VLC media player API Documentation by Christophe Massiot and Samuel Hocevar&lt;br /&gt;
&lt;br /&gt;
=== Question about liba52 facts ===&lt;br /&gt;
According to http://liba52.sourceforge.net/ retrieved November 24, 2014, &amp;quot;July 27, 2002: a52dec-0.7.4 is released ! With full reentrancy...&amp;quot;  Does this affect liba52 which is stated &#039;&#039;&#039;not&#039;&#039;&#039; to have reentrancy on this page?&lt;/div&gt;</summary>
		<author><name>Elindsey</name></author>
	</entry>
</feed>