Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2012-10-30 23:27:57 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2012-10-31 22:22:56 +0400
commit3658d046e4a7a74f108e7d41ba8c977f1c7282d5 (patch)
tree1d9e972dd1e0fa1043f9ebb50992057f99d0f916 /build_ffmpeg_msvc.sh
parente9f345f492c5f12e025ec4b40c25390233d68a96 (diff)
Add ffmpeg msvc build script
Diffstat (limited to 'build_ffmpeg_msvc.sh')
-rw-r--r--build_ffmpeg_msvc.sh97
1 files changed, 97 insertions, 0 deletions
diff --git a/build_ffmpeg_msvc.sh b/build_ffmpeg_msvc.sh
new file mode 100644
index 00000000..da476cda
--- /dev/null
+++ b/build_ffmpeg_msvc.sh
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+if [ "${1}" == "x64" ]; then
+ arch=x86_64
+ archdir=x64
+else
+ arch=x86
+ archdir=Win32
+fi
+
+make_dirs() (
+ if [ ! -d bin_${archdir}d/lib ]; then
+ mkdir -p bin_${archdir}d/lib
+ fi
+)
+
+copy_libs() (
+ cp lib*/*-lav-*.dll ../bin_${archdir}d
+ cp lib*/*-lav-*.pdb ../bin_${archdir}d
+ cp lib*/*.lib ../bin_${archdir}d/lib
+)
+
+clean() (
+ make distclean > /dev/null 2>&1
+)
+
+configure() (
+ OPTIONS="
+ --enable-shared \
+ --enable-gpl \
+ --enable-version3 \
+ --enable-w32threads \
+ --enable-runtime-cpudetect \
+ --enable-demuxers \
+ --disable-demuxer=matroska \
+ --disable-filters \
+ --enable-filter=yadif \
+ --enable-filter=buffer \
+ --enable-filter=buffersink \
+ --enable-filter=scale \
+ --disable-protocols \
+ --enable-protocol=file \
+ --enable-protocol=mmsh \
+ --enable-protocol=mmst \
+ --enable-protocol=rtp \
+ --enable-protocol=http \
+ --disable-muxers \
+ --enable-muxer=spdif \
+ --disable-hwaccels \
+ --enable-hwaccel=h264_dxva2 \
+ --enable-hwaccel=vc1_dxva2 \
+ --enable-hwaccel=wmv3_dxva2 \
+ --enable-hwaccel=mpeg2_dxva2 \
+ --enable-avresample \
+ --disable-avdevice \
+ --disable-postproc \
+ --disable-swresample \
+ --disable-static \
+ --disable-encoders \
+ --disable-bsfs \
+ --disable-devices \
+ --disable-ffplay \
+ --disable-ffserver \
+ --disable-ffmpeg \
+ --disable-ffprobe \
+ --build-suffix=-lav \
+ --arch=${arch}"
+
+ sh configure --toolchain=msvc --enable-debug ${OPTIONS}
+)
+
+build() (
+ make -j8
+)
+
+echo Building ffmpeg in MSVC Debug config...
+
+make_dirs
+
+cd ffmpeg
+
+clean
+
+## run configure, redirect to file because of a msys bug
+configure > config.out 2>&1
+CONFIGRETVAL=$?
+
+## show configure output
+cat config.out
+
+## Only if configure succeeded, actually build
+if [ ${CONFIGRETVAL} -eq 0 ]; then
+ build &&
+ copy_libs
+fi
+
+cd ..