aboutsummaryrefslogtreecommitdiff
path: root/lib/ffmpeg/build_xbmc_win32.sh
blob: cc5682f9d995750e57185f4ac8491dd1b6c95e14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash

MAKEFLAGS=""

if [ "$1" == "clean" ]
then
  if [ -d .libs ]
  then
    rm -r .libs
  fi
  make distclean
fi

if [ $NUMBER_OF_PROCESSORS > 1 ]; then
  MAKEFLAGS=-j$NUMBER_OF_PROCESSORS
fi

if [ ! -d .libs ]; then
  mkdir .libs
fi

# add --enable-debug (remove --disable-debug ofc) to get ffmpeg log messages in xbmc.log
# the resulting debug dll's are twice to fourth time the size of the release binaries

OPTIONS="
--enable-shared \
--enable-memalign-hack \
--enable-gpl \
--enable-w32threads \
--enable-postproc \
--enable-zlib \
--disable-static \
--disable-altivec \
--disable-muxers \
--disable-encoders \
--disable-debug \
--disable-ffplay \
--disable-ffserver \
--disable-ffmpeg \
--disable-ffprobe \
--disable-devices \
--disable-crystalhd \
--enable-muxer=spdif \
--enable-muxer=adts \
--enable-encoder=ac3 \
--enable-encoder=aac \
--enable-runtime-cpudetect \
--enable-avfilter \
--disable-doc"

./configure --extra-cflags="-fno-common -Iinclude-xbmc-win32/dxva2 -DNDEBUG" --extra-ldflags="-L/xbmc/system/players/dvdplayer" ${OPTIONS} &&
 
make $MAKEFLAGS &&
cp lib*/*.dll .libs/ &&
cp .libs/avcodec-53.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/avformat-53.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/avutil-51.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/avfilter-2.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/postproc-52.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/swresample-0.dll /xbmc/system/players/dvdplayer/ &&
cp .libs/swscale-2.dll /xbmc/system/players/dvdplayer/