~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/doc/general.texi

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
@contents
11
11
 
12
 
@chapter external libraries
 
12
@chapter External libraries
13
13
 
14
14
Libav can be hooked up with a number of external libraries to add support
15
15
for more formats. None of them are used by default, their use has to be
16
16
explicitly requested by passing the appropriate flags to @file{./configure}.
17
17
 
18
 
@section OpenCORE AMR
19
 
 
20
 
Libav can make use of the OpenCORE libraries for AMR-NB
21
 
decoding/encoding and AMR-WB decoding.
22
 
 
23
 
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the instructions for
24
 
installing the libraries. Then pass @code{--enable-libopencore-amrnb} and/or
25
 
@code{--enable-libopencore-amrwb} to configure to enable the libraries.
26
 
 
27
 
Note that OpenCORE is under the Apache License 2.0 (see
28
 
@url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is
 
18
@section OpenCORE and VisualOn libraries
 
19
 
 
20
Spun off Google Android sources, OpenCore and VisualOn libraries provide
 
21
encoders for a number of audio codecs.
 
22
 
 
23
@float NOTE
 
24
OpenCORE and VisualOn libraries are under the Apache License 2.0
 
25
(see @url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is
29
26
incompatible with the LGPL version 2.1 and GPL version 2. You have to
30
27
upgrade Libav's license to LGPL version 3 (or if you have enabled
31
28
GPL components, GPL version 3) to use it.
 
29
@end float
 
30
 
 
31
@subsection OpenCORE AMR
 
32
 
 
33
Libav can make use of the OpenCORE libraries for AMR-NB
 
34
decoding/encoding and AMR-WB decoding.
 
35
 
 
36
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
 
37
instructions for installing the libraries.
 
38
Then pass @code{--enable-libopencore-amrnb} and/or
 
39
@code{--enable-libopencore-amrwb} to configure to enable them.
 
40
 
 
41
@subsection VisualOn AAC encoder library
 
42
 
 
43
Libav can make use of the VisualOn AACenc library for AAC encoding.
 
44
 
 
45
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
 
46
instructions for installing the library.
 
47
Then pass @code{--enable-libvo-aacenc} to configure to enable it.
 
48
 
 
49
@subsection VisualOn AMR-WB encoder library
 
50
 
 
51
Libav can make use of the VisualOn AMR-WBenc library for AMR-WB encoding.
 
52
 
 
53
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
 
54
instructions for installing the library.
 
55
Then pass @code{--enable-libvo-amrwbenc} to configure to enable it.
 
56
 
 
57
@section LAME
 
58
 
 
59
Libav can make use of the LAME library for MP3 encoding.
 
60
 
 
61
Go to @url{http://lame.sourceforge.net/} and follow the
 
62
instructions for installing the library.
 
63
Then pass @code{--enable-libmp3lame} to configure to enable it.
 
64
 
 
65
@section libvpx
 
66
 
 
67
Libav can make use of the libvpx library for VP8 encoding.
 
68
 
 
69
Go to @url{http://www.webmproject.org/} and follow the instructions for
 
70
installing the library. Then pass @code{--enable-libvpx} to configure to
 
71
enable it.
 
72
 
 
73
@section x264
 
74
 
 
75
Libav can make use of the x264 library for H.264 encoding.
 
76
 
 
77
Go to @url{http://www.videolan.org/developers/x264.html} and follow the
 
78
instructions for installing the library. Then pass @code{--enable-libx264} to
 
79
configure to enable it.
 
80
 
 
81
@float NOTE
 
82
x264 is under the GNU Public License Version 2 or later
 
83
(see @url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} for
 
84
details), you must upgrade Libav's license to GPL in order to use it.
 
85
@end float
 
86
 
32
87
 
33
88
 
34
89
@chapter Supported File Formats and Codecs
66
121
    @tab Used in Z and Z95 games.
67
122
@item Brute Force & Ignorance   @tab   @tab X
68
123
    @tab Used in the game Flash Traffic: City of Angels.
 
124
@item BWF                       @tab X @tab X
 
125
@item CRI ADX                   @tab X @tab X
 
126
    @tab Audio-only format used in console video games.
 
127
@item Discworld II BMV          @tab   @tab X
69
128
@item Interplay C93             @tab   @tab X
70
129
    @tab Used in the game Cyberia from Interplay.
71
130
@item Delphine Software International CIN @tab   @tab X
90
149
@item Electronic Arts cdata  @tab    @tab X
91
150
@item Electronic Arts Multimedia  @tab    @tab X
92
151
    @tab Used in various EA games; files have extensions like WVE and UV2.
93
 
@item FFM (FFserver live feed)  @tab X @tab X
 
152
@item FFM (AVserver live feed)  @tab X @tab X
94
153
@item Flash (SWF)               @tab X @tab X
95
154
@item Flash 9 (AVM2)            @tab X @tab X
96
155
    @tab Only embedded audio is decoded.
117
176
    @tab A format generated by IndigoVision 8000 video server.
118
177
@item IVF (On2)                 @tab X @tab X
119
178
    @tab A format used by libvpx
 
179
@item LATM                      @tab X @tab X
120
180
@item LMLM4                     @tab   @tab X
121
181
    @tab Used by Linux Media Labs MPEG-4 PCI boards
122
182
@item LXF                       @tab   @tab X
162
222
@item NUT                       @tab X @tab X
163
223
    @tab NUT Open Container Format
164
224
@item Ogg                       @tab X @tab X
 
225
@item Playstation Portable PMP  @tab   @tab X
165
226
@item TechnoTrend PVA           @tab   @tab X
166
227
    @tab Used by TechnoTrend DVB PCI boards.
167
228
@item QCP                       @tab   @tab X
235
296
    @tab Used in Sierra CD-ROM games.
236
297
@item Smacker                   @tab   @tab X
237
298
    @tab Multimedia format used by many games.
238
 
@item Sony OpenMG (OMA)         @tab   @tab X
 
299
@item SMJPEG                    @tab   @tab X
 
300
    @tab Used in certain Loki game ports.
 
301
@item Sony OpenMG (OMA)         @tab X @tab X
239
302
    @tab Audio format used in Sony Sonic Stage and Sony Vegas.
240
303
@item Sony PlayStation STR      @tab   @tab X
241
304
@item Sony Wave64 (W64)         @tab   @tab X
258
321
    @tab Multimedia format used in Westwood Studios games.
259
322
@item Westwood Studios VQA      @tab   @tab X
260
323
    @tab Multimedia format used in Westwood Studios games.
 
324
@item XMV                       @tab   @tab X
 
325
    @tab Microsoft video container used in Xbox games.
261
326
@item xWMA                      @tab   @tab X
262
327
    @tab Microsoft audio container used by XAudio 2.
263
328
@item YUV4MPEG pipe             @tab X @tab X
337
402
    @tab Used in Chinese MP3 players.
338
403
@item ANSI/ASCII art         @tab     @tab  X
339
404
@item Apple MJPEG-B          @tab     @tab  X
 
405
@item Apple ProRes           @tab     @tab  X
340
406
@item Apple QuickDraw        @tab     @tab  X
341
407
    @tab fourcc: qdrw
342
408
@item Asus v1                @tab  X  @tab  X
371
437
    @tab AVS1-P2, JiZhun profile, encoding through external library libxavs
372
438
@item Delphine Software International CIN video  @tab     @tab  X
373
439
    @tab Codec used in Delphine Software International games.
 
440
@item Discworld II BMV Video @tab     @tab  X
374
441
@item Cinepak                @tab     @tab  X
375
 
@item Cirrus Logic AccuPak   @tab     @tab  X
 
442
@item Cirrus Logic AccuPak   @tab  X  @tab  X
376
443
    @tab fourcc: CLJR
377
444
@item Creative YUV (CYUV)    @tab     @tab  X
378
445
@item DFA                    @tab     @tab  X
387
454
@item Duck TrueMotion 2.0    @tab     @tab  X
388
455
    @tab fourcc: TM20
389
456
@item DV (Digital Video)     @tab  X  @tab  X
 
457
@item Dxtory capture format  @tab     @tab  X
390
458
@item Feeble Files/ScummVM DXA  @tab     @tab  X
391
459
    @tab Codec originally used in Feeble Files game.
392
460
@item Electronic Arts CMV video  @tab     @tab  X
400
468
    @tab experimental lossless codec (fourcc: FFV1)
401
469
@item Flash Screen Video v1  @tab  X  @tab  X
402
470
    @tab fourcc: FSV1
 
471
@item Flash Screen Video v2  @tab     @tab  X
403
472
@item Flash Video (FLV)      @tab  X  @tab  X
404
473
    @tab Sorenson H.263 used in Flash
405
474
@item Fraps                  @tab     @tab  X
418
487
@item id RoQ video           @tab  X  @tab  X
419
488
    @tab Used in Quake III, Jedi Knight 2, other computer games.
420
489
@item IFF ILBM               @tab     @tab  X
421
 
    @tab IFF interlaved bitmap
 
490
    @tab IFF interleaved bitmap
422
491
@item IFF ByteRun1           @tab     @tab  X
423
492
    @tab IFF run length encoded bitmap
424
493
@item Intel H.263            @tab     @tab  X
425
494
@item Intel Indeo 2          @tab     @tab  X
426
495
@item Intel Indeo 3          @tab     @tab  X
 
496
@item Intel Indeo 4          @tab     @tab  X
427
497
@item Intel Indeo 5          @tab     @tab  X
428
498
@item Interplay C93          @tab     @tab  X
429
499
    @tab Used in the game Cyberia from Interplay.
510
580
    @tab encoding supported through external library libtheora
511
581
@item Tiertex Limited SEQ video  @tab     @tab  X
512
582
    @tab Codec used in DOS CD-ROM FlashBack game.
513
 
@item V210 Quicktime Uncompressed 4:2:2 10-bit     @tab  X  @tab  X
 
583
@item Ut Video               @tab     @tab  X
 
584
@item v210 QuickTime uncompressed 4:2:2 10-bit     @tab  X  @tab  X
 
585
@item v410 QuickTime uncompressed 4:4:4 10-bit     @tab  X  @tab  X
 
586
@item VBLE Lossless Codec    @tab     @tab  X
514
587
@item VMware Screen Codec / VMware Video  @tab     @tab  X
515
588
    @tab Codec used in videos captured by VMware.
516
589
@item Westwood Studios VQA (Vector Quantized Animation) video  @tab     @tab  X
 
590
@item Windows Media Image    @tab     @tab  X
517
591
@item Windows Media Video 7  @tab  X  @tab  X
518
592
@item Windows Media Video 8  @tab  X  @tab  X
519
593
@item Windows Media Video 9  @tab     @tab  X
600
674
    @tab Used in Bink and Smacker files in many games.
601
675
@item Delphine Software International CIN audio  @tab     @tab  X
602
676
    @tab Codec used in Delphine Software International games.
 
677
@item Discworld II BMV Audio @tab     @tab  X
603
678
@item COOK                   @tab     @tab  X
604
679
    @tab All versions except 5.1 are supported.
605
680
@item DCA (DTS Coherent Acoustics)  @tab     @tab  X
658
733
@item PCM unsigned 24-bit little-endian  @tab  X  @tab  X
659
734
@item PCM unsigned 32-bit big-endian  @tab  X  @tab  X
660
735
@item PCM unsigned 32-bit little-endian  @tab  X  @tab  X
661
 
@item PCM Zork               @tab  X  @tab  X
 
736
@item PCM Zork               @tab     @tab  X
662
737
@item QCELP / PureVoice      @tab     @tab  X
663
738
@item QDesign Music Codec 2  @tab     @tab  X
664
739
    @tab There are still some distortions.
674
749
    @tab Used in Sierra VMD files.
675
750
@item Smacker audio          @tab     @tab  X
676
751
@item SMPTE 302M AES3 audio  @tab     @tab  X
677
 
@item Speex                  @tab     @tab  E
 
752
@item Speex                  @tab  E  @tab  E
678
753
    @tab supported through external library libspeex
679
754
@item True Audio (TTA)       @tab     @tab  X
680
755
@item TrueHD                 @tab     @tab  X
739
814
@item JACK              @tab X      @tab
740
815
@item LIBDC1394         @tab X      @tab
741
816
@item OSS               @tab X      @tab X
 
817
@item Pulseaudio        @tab X      @tab
742
818
@item Video4Linux       @tab X      @tab
743
819
@item Video4Linux2      @tab X      @tab
744
820
@item VfW capture       @tab X      @tab
747
823
 
748
824
@code{X} means that input/output is supported.
749
825
 
750
 
 
751
 
@chapter Platform Specific information
752
 
 
753
 
@section DOS
754
 
 
755
 
Using a cross-compiler is preferred for various reasons.
756
 
 
757
 
@section OS/2
758
 
 
759
 
For information about compiling Libav on OS/2 see
760
 
@url{http://www.edm2.com/index.php/FFmpeg}.
761
 
 
762
 
@section Unix-like
763
 
 
764
 
Some parts of Libav cannot be built with version 2.15 of the GNU
765
 
assembler which is still provided by a few AMD64 distributions. To
766
 
make sure your compiler really uses the required version of gas
767
 
after a binutils upgrade, run:
768
 
 
769
 
@example
770
 
$(gcc -print-prog-name=as) --version
771
 
@end example
772
 
 
773
 
If not, then you should install a different compiler that has no
774
 
hard-coded path to gas. In the worst case pass @code{--disable-asm}
775
 
to configure.
776
 
 
777
 
@subsection BSD
778
 
 
779
 
BSD make will not build Libav, you need to install and use GNU Make
780
 
(@file{gmake}).
781
 
 
782
 
@subsection (Open)Solaris
783
 
 
784
 
GNU Make is required to build Libav, so you have to invoke (@file{gmake}),
785
 
standard Solaris Make will not work. When building with a non-c99 front-end
786
 
(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o}
787
 
or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options
788
 
since the libc is not c99-compliant by default. The probes performed by
789
 
configure may raise an exception leading to the death of configure itself
790
 
due to a bug in the system shell. Simply invoke a different shell such as
791
 
bash directly to work around this:
792
 
 
793
 
@example
794
 
bash ./configure
795
 
@end example
796
 
 
797
 
@subsection Darwin (MacOS X, iPhone)
798
 
 
799
 
MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from
800
 
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
801
 
assembler functions. Just download the Perl script and put it somewhere
802
 
in your PATH, Libav's configure will pick it up automatically.
803
 
 
804
 
@section Windows
805
 
 
806
 
@subsection Native Windows compilation
807
 
 
808
 
Libav can be built to run natively on Windows using the MinGW tools. Install
809
 
the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}.
810
 
You can find detailed installation
811
 
instructions in the download section and the FAQ.
812
 
 
813
 
Libav does not build out-of-the-box with the packages the automated MinGW
814
 
installer provides. It also requires coreutils to be installed and many other
815
 
packages updated to the latest version. The minimum version for some packages
816
 
are listed below:
817
 
 
818
 
@itemize
819
 
@item bash 3.1
820
 
@item msys-make 3.81-2 (note: not mingw32-make)
821
 
@item w32api 3.13
822
 
@item mingw-runtime 3.15
823
 
@end itemize
824
 
 
825
 
Libav automatically passes @code{-fno-common} to the compiler to work around
826
 
a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}).
827
 
 
828
 
Notes:
829
 
 
830
 
@itemize
831
 
 
832
 
@item Building natively using MSYS can be sped up by disabling implicit rules
833
 
in the Makefile by calling @code{make -r} instead of plain @code{make}. This
834
 
speed up is close to non-existent for normal one-off builds and is only
835
 
noticeable when running make for a second time (for example in
836
 
@code{make install}).
837
 
 
838
 
@item In order to compile FFplay, you must have the MinGW development library
839
 
of SDL. Get it from @url{http://www.libsdl.org}.
840
 
Edit the @file{bin/sdl-config} script so that it points to the correct prefix
841
 
where SDL was installed. Verify that @file{sdl-config} can be launched from
842
 
the MSYS command line.
843
 
 
844
 
@item By using @code{./configure --enable-shared} when configuring Libav,
845
 
you can build libavutil, libavcodec and libavformat as DLLs.
846
 
 
847
 
@end itemize
848
 
 
849
 
@subsection Microsoft Visual C++ compatibility
850
 
 
851
 
As stated in the FAQ, Libav will not compile under MSVC++. However, if you
852
 
want to use the libav* libraries in your own applications, you can still
853
 
compile those applications using MSVC++. But the libav* libraries you link
854
 
to @emph{must} be built with MinGW. However, you will not be able to debug
855
 
inside the libav* libraries, since MSVC++ does not recognize the debug
856
 
symbols generated by GCC.
857
 
We strongly recommend you to move over from MSVC++ to MinGW tools.
858
 
 
859
 
This description of how to use the Libav libraries with MSVC++ is based on
860
 
Microsoft Visual C++ 2005 Express Edition. If you have a different version,
861
 
you might have to modify the procedures slightly.
862
 
 
863
 
@subsubsection Using static libraries
864
 
 
865
 
Assuming you have just built and installed Libav in @file{/usr/local}.
866
 
 
867
 
@enumerate
868
 
 
869
 
@item Create a new console application ("File / New / Project") and then
870
 
select "Win32 Console Application". On the appropriate page of the
871
 
Application Wizard, uncheck the "Precompiled headers" option.
872
 
 
873
 
@item Write the source code for your application, or, for testing, just
874
 
copy the code from an existing sample application into the source file
875
 
that MSVC++ has already created for you. For example, you can copy
876
 
@file{libavformat/output-example.c} from the Libav distribution.
877
 
 
878
 
@item Open the "Project / Properties" dialog box. In the "Configuration"
879
 
combo box, select "All Configurations" so that the changes you make will
880
 
affect both debug and release builds. In the tree view on the left hand
881
 
side, select "C/C++ / General", then edit the "Additional Include
882
 
Directories" setting to contain the path where the Libav includes were
883
 
installed (i.e. @file{c:\msys\1.0\local\include}).
884
 
Do not add MinGW's include directory here, or the include files will
885
 
conflict with MSVC's.
886
 
 
887
 
@item Still in the "Project / Properties" dialog box, select
888
 
"Linker / General" from the tree view and edit the
889
 
"Additional Library Directories" setting to contain the @file{lib}
890
 
directory where Libav was installed (i.e. @file{c:\msys\1.0\local\lib}),
891
 
the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}),
892
 
and the directory where MinGW's GCC libs are installed
893
 
(i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select
894
 
"Linker / Input" from the tree view, and add the files @file{libavformat.a},
895
 
@file{libavcodec.a}, @file{libavutil.a}, @file{libmingwex.a},
896
 
@file{libgcc.a}, and any other libraries you used (i.e. @file{libz.a})
897
 
to the end of "Additional Dependencies".
898
 
 
899
 
@item Now, select "C/C++ / Code Generation" from the tree view. Select
900
 
"Debug" in the "Configuration" combo box. Make sure that "Runtime
901
 
Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in
902
 
the "Configuration" combo box and make sure that "Runtime Library" is
903
 
set to "Multi-threaded DLL".
904
 
 
905
 
@item Click "OK" to close the "Project / Properties" dialog box.
906
 
 
907
 
@item MSVC++ lacks some C99 header files that are fundamental for Libav.
908
 
Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list}
909
 
and install it in MSVC++'s include directory
910
 
(i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}).
911
 
 
912
 
@item MSVC++ also does not understand the @code{inline} keyword used by
913
 
Libav, so you must add this line before @code{#include}ing libav*:
914
 
@example
915
 
#define inline _inline
916
 
@end example
917
 
 
918
 
@item Build your application, everything should work.
919
 
 
920
 
@end enumerate
921
 
 
922
 
@subsubsection Using shared libraries
923
 
 
924
 
This is how to create DLL and LIB files that are compatible with MSVC++:
925
 
 
926
 
@enumerate
927
 
 
928
 
@item Add a call to @file{vcvars32.bat} (which sets up the environment
929
 
variables for the Visual C++ tools) as the first line of @file{msys.bat}.
930
 
The standard location for @file{vcvars32.bat} is
931
 
@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat},
932
 
and the standard location for @file{msys.bat} is @file{C:\msys\1.0\msys.bat}.
933
 
If this corresponds to your setup, add the following line as the first line
934
 
of @file{msys.bat}:
935
 
 
936
 
@example
937
 
call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
938
 
@end example
939
 
 
940
 
Alternatively, you may start the @file{Visual Studio 2005 Command Prompt},
941
 
and run @file{c:\msys\1.0\msys.bat} from there.
942
 
 
943
 
@item Within the MSYS shell, run @code{lib.exe}. If you get a help message
944
 
from @file{Microsoft (R) Library Manager}, this means your environment
945
 
variables are set up correctly, the @file{Microsoft (R) Library Manager}
946
 
is on the path and will be used by Libav to create
947
 
MSVC++-compatible import libraries.
948
 
 
949
 
@item Build Libav with
950
 
 
951
 
@example
952
 
./configure --enable-shared --enable-memalign-hack
953
 
make
954
 
make install
955
 
@end example
956
 
 
957
 
Your install path (@file{/usr/local/} by default) should now have the
958
 
necessary DLL and LIB files under the @file{bin} directory.
959
 
 
960
 
@end enumerate
961
 
 
962
 
To use those files with MSVC++, do the same as you would do with
963
 
the static libraries, as described above. But in Step 4,
964
 
you should only need to add the directory where the LIB files are installed
965
 
(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are
966
 
installed in the @file{bin} directory. And instead of adding the static
967
 
libraries (@file{libxxx.a} files) you should add the MSVC import libraries
968
 
(@file{avcodec.lib}, @file{avformat.lib}, and
969
 
@file{avutil.lib}). Note that you should not use the GCC import
970
 
libraries (@file{libxxx.dll.a} files), as these will give you undefined
971
 
reference errors. There should be no need for @file{libmingwex.a},
972
 
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
973
 
statically linked into the DLLs. The @file{bin} directory contains a bunch
974
 
of DLL files, but the ones that are actually used to run your application
975
 
are the ones with a major version number in their filenames
976
 
(i.e. @file{avcodec-51.dll}).
977
 
 
978
 
Libav headers do not declare global data for Windows DLLs through the usual
979
 
dllexport/dllimport interface. Such data will be exported properly while
980
 
building, but to use them in your MSVC++ code you will have to edit the
981
 
appropriate headers and mark the data as dllimport. For example, in
982
 
libavutil/pixdesc.h you should have:
983
 
@example
984
 
extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
985
 
@end example
986
 
 
987
 
Note that using import libraries created by dlltool requires
988
 
the linker optimization option to be set to
989
 
"References: Keep Unreferenced Data (/OPT:NOREF)", otherwise
990
 
the resulting binaries will fail during runtime. This isn't
991
 
required when using import libraries generated by lib.exe.
992
 
 
993
 
@subsection Cross compilation for Windows with Linux
994
 
 
995
 
You must use the MinGW cross compilation tools available at
996
 
@url{http://www.mingw.org/}.
997
 
 
998
 
Then configure Libav with the following options:
999
 
@example
1000
 
./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
1001
 
@end example
1002
 
(you can change the cross-prefix according to the prefix chosen for the
1003
 
MinGW tools).
1004
 
 
1005
 
Then you can easily test Libav with Wine
1006
 
(@url{http://www.winehq.com/}).
1007
 
 
1008
 
@subsection Compilation under Cygwin
1009
 
 
1010
 
Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
1011
 
llrint() in its C library.
1012
 
 
1013
 
Install your Cygwin with all the "Base" packages, plus the
1014
 
following "Devel" ones:
1015
 
@example
1016
 
binutils, gcc4-core, make, git, mingw-runtime, texi2html
1017
 
@end example
1018
 
 
1019
 
And the following "Utils" one:
1020
 
@example
1021
 
diffutils
1022
 
@end example
1023
 
 
1024
 
Then run
1025
 
 
1026
 
@example
1027
 
./configure --enable-static --disable-shared
1028
 
@end example
1029
 
 
1030
 
to make a static build.
1031
 
 
1032
 
The current @code{gcc4-core} package is buggy and needs this flag to build
1033
 
shared libraries:
1034
 
 
1035
 
@example
1036
 
./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
1037
 
@end example
1038
 
 
1039
 
If you want to build Libav with additional libraries, download Cygwin
1040
 
"Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
1041
 
@example
1042
 
libogg-devel, libvorbis-devel
1043
 
@end example
1044
 
 
1045
 
These library packages are only available from Cygwin Ports
1046
 
(@url{http://sourceware.org/cygwinports/}) :
1047
 
 
1048
 
@example
1049
 
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel,
1050
 
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
1051
 
libxvidcore-devel
1052
 
@end example
1053
 
 
1054
 
The recommendation for libnut and x264 is to build them from source by
1055
 
yourself, as they evolve too quickly for Cygwin Ports to be up to date.
1056
 
 
1057
 
Cygwin 1.7.x has IPv6 support. You can add IPv6 to Cygwin 1.5.x by means
1058
 
of the @code{libgetaddrinfo-devel} package, available at Cygwin Ports.
1059
 
 
1060
 
@subsection Crosscompilation for Windows under Cygwin
1061
 
 
1062
 
With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
1063
 
 
1064
 
Just install your Cygwin as explained before, plus these additional
1065
 
"Devel" packages:
1066
 
@example
1067
 
gcc-mingw-core, mingw-runtime, mingw-zlib
1068
 
@end example
1069
 
 
1070
 
and add some special flags to your configure invocation.
1071
 
 
1072
 
For a static build run
1073
 
@example
1074
 
./configure --target-os=mingw32 --enable-memalign-hack --enable-static --disable-shared --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
1075
 
@end example
1076
 
 
1077
 
and for a build with shared libraries
1078
 
@example
1079
 
./configure --target-os=mingw32 --enable-memalign-hack --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
1080
 
@end example
1081
 
 
1082
826
@bye