diff --git a/ci/install-travis.sh b/ci/install-travis.sh index 4153e115814..79fbf9add44 100755 --- a/ci/install-travis.sh +++ b/ci/install-travis.sh @@ -23,7 +23,7 @@ if [[ "$OS" == "linux-x86" ]] || [[ "$OS" == "linux-x86_64" ]] || [[ "$OS" =~ an DOCKER_CONTAINER_ID=$(docker ps | grep centos | awk '{print $1}') echo "Container id is $DOCKER_CONTAINER_ID please wait while updates applied" docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "yum -y install centos-release-scl-rh epel-release" > /dev/null - docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "yum -y install devtoolset-3-toolchain maven30 clang gcc-c++ gcc-gfortran java-devel maven python numpy swig git file which wget unzip tar bzip2 gzip xz patch make cmake3 libtool perl nasm yasm alsa-lib-devel freeglut-devel glfw-devel gtk2-devel libusb-devel libusb1-devel zlib-devel SDL-devel" > /dev/null + docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "yum -y install devtoolset-3-toolchain maven30 clang gcc-c++ gcc-gfortran java-devel maven python numpy swig git file which wget unzip tar bzip2 gzip xz patch make cmake3 libtool perl nasm yasm alsa-lib-devel freeglut-devel glfw-devel gtk2-devel libusb-devel libusb1-devel zlib-devel SDL-devel libva-devel" > /dev/null if [ "$OS" == "linux-x86" ]; then docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "rpm -qa | sed s/.x86_64$/.i686/ | xargs yum -y install > /dev/null" fi diff --git a/ffmpeg/cppbuild.sh b/ffmpeg/cppbuild.sh index 92e6b321e6d..205f5ae255c 100755 --- a/ffmpeg/cppbuild.sh +++ b/ffmpeg/cppbuild.sh @@ -27,6 +27,7 @@ VPX_VERSION=1.6.1 ALSA_VERSION=1.1.5 FFMPEG_VERSION=3.4 FREETYPE_VERSION=2.8.1 +MFX_VERSION=1.23 download http://zlib.net/$ZLIB.tar.gz $ZLIB.tar.gz download http://downloads.sourceforge.net/project/lame/lame/3.100/$LAME.tar.gz $LAME.tar.gz download http://downloads.xiph.org/releases/speex/$SPEEX.tar.gz $SPEEX.tar.gz @@ -40,6 +41,7 @@ download https://github.com/videolan/x265/archive/$X265.tar.gz x265-$X265.tar.gz download https://github.com/webmproject/libvpx/archive/v$VPX_VERSION.tar.gz libvpx-$VPX_VERSION.tar.gz download ftp://ftp.alsa-project.org/pub/lib/alsa-lib-$ALSA_VERSION.tar.bz2 alsa-lib-$ALSA_VERSION.tar.bz2 download http://download.savannah.gnu.org/releases/freetype/freetype-$FREETYPE_VERSION.tar.bz2 freetype-$FREETYPE_VERSION.tar.bz2 +download https://github.com/lu-zero/mfx_dispatch/archive/$MFX_VERSION.tar.gz mfx_dispatch-$MFX_VERSION.tar.gz download http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2 ffmpeg-$FFMPEG_VERSION.tar.bz2 mkdir -p $PLATFORM @@ -58,6 +60,7 @@ tar --totals -xjf ../last_stable_x264.tar.bz2 tar --totals -xzf ../x265-$X265.tar.gz tar --totals -xzf ../libvpx-$VPX_VERSION.tar.gz tar --totals -xjf ../freetype-$FREETYPE_VERSION.tar.bz2 +tar --totals -xzf ../mfx_dispatch-$MFX_VERSION.tar.gz tar --totals -xjf ../ffmpeg-$FFMPEG_VERSION.tar.bz2 X264=`echo x264-snapshot-*` @@ -246,9 +249,17 @@ case $PLATFORM in make -j $MAKEJ make install cd ../freetype-$FREETYPE_VERSION - ./configure --prefix=$INSTALL_PATH --with-bzip2=no --with-harfbuzz=no --with-png=no --enable-static --disable-shared --with-pic --host=i686-linux + ./configure --prefix=$INSTALL_PATH --with-bzip2=no --with-harfbuzz=no --with-png=no --enable-static --disable-shared --with-pic --host=i686-linux CFLAGS="-m32" make -j $MAKEJ make install + if [[ ! -z $(ldconfig -p | grep libva-drm) ]]; then + cd ../mfx_dispatch-$MFX_VERSION + autoreconf -fiv + PKG_CONFIG_PATH="../lib/pkgconfig" ./configure --prefix=$INSTALL_PATH --disable-shared --enable-static --enable-fast-install --with-pic --host=i686-linux CFLAGS="-m32" CXXFLAGS="-m32" + make -j $MAKEJ + make install + ENABLE="$ENABLE --enable-libmfx" + fi cd ../ffmpeg-$FFMPEG_VERSION patch -Np1 < ../../../ffmpeg-linux.patch PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE --enable-pthreads --enable-libxcb --cc="gcc -m32" --extra-cflags="-I../include/" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl" @@ -303,6 +314,14 @@ case $PLATFORM in ./configure --prefix=$INSTALL_PATH --with-bzip2=no --with-harfbuzz=no --with-png=no --enable-static --disable-shared --with-pic --host=x86_64-linux CFLAGS="-m64" make -j $MAKEJ make install + if [[ ! -z $(ldconfig -p | grep libva-drm) ]]; then + cd ../mfx_dispatch-$MFX_VERSION + autoreconf -fiv + PKG_CONFIG_PATH="../lib/pkgconfig" ./configure --prefix=$INSTALL_PATH --disable-shared --enable-static --enable-fast-install --with-pic --host=x86_64-linux CFLAGS="-m64" CXXFLAGS="-m64" + make -j $MAKEJ + make install + ENABLE="$ENABLE --enable-libmfx" + fi cd ../ffmpeg-$FFMPEG_VERSION patch -Np1 < ../../../ffmpeg-linux.patch PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE --enable-pthreads --enable-libxcb --cc="gcc -m64" --extra-cflags="-I../include/" --extra-ldflags="-L../lib/" --extra-libs="-lstdc++ -ldl" @@ -612,12 +631,17 @@ case $PLATFORM in make -j $MAKEJ make install cd ../freetype-$FREETYPE_VERSION - ./configure --prefix=$INSTALL_PATH --with-bzip2=no --with-harfbuzz=no --with-png=no --enable-static --disable-shared --with-pic --target=x86_64-win64-gcc + ./configure --prefix=$INSTALL_PATH --with-bzip2=no --with-harfbuzz=no --with-png=no --enable-static --disable-shared --with-pic --host=i686-w64-mingw32 CFLAGS="-m32" + make -j $MAKEJ + make install + cd ../mfx_dispatch-$MFX_VERSION + autoreconf -fiv + PKG_CONFIG_PATH="../lib/pkgconfig" ./configure --prefix=$INSTALL_PATH --disable-shared --enable-static --enable-fast-install --with-pic --host=i686-w64-mingw32 # CFLAGS="-m32" CXXFLAGS="-m32" make -j $MAKEJ make install cd ../ffmpeg-$FFMPEG_VERSION patch -Np1 < ../../../ffmpeg-windows.patch - PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m32" --extra-cflags="-I../include/" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -Wl,-Bdynamic" + PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m32" --extra-cflags="-I../include/" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -Wl,-Bdynamic" make -j $MAKEJ make install ;; @@ -664,12 +688,17 @@ case $PLATFORM in make -j $MAKEJ make install cd ../freetype-$FREETYPE_VERSION - ./configure --prefix=$INSTALL_PATH --with-bzip2=no --with-harfbuzz=no --with-png=no --enable-static --disable-shared --with-pic --target=x86_64-win64-gcc CFLAGS="-m64" + ./configure --prefix=$INSTALL_PATH --with-bzip2=no --with-harfbuzz=no --with-png=no --enable-static --disable-shared --with-pic --host=x86_64-w64-mingw32 CFLAGS="-m64" + make -j $MAKEJ + make install + cd ../mfx_dispatch-$MFX_VERSION + autoreconf -fiv + PKG_CONFIG_PATH="../lib/pkgconfig" ./configure --prefix=$INSTALL_PATH --disable-shared --enable-static --enable-fast-install --with-pic --host=x86_64-w64-mingw32 # CFLAGS="-m64" CXXFLAGS="-m64" make -j $MAKEJ make install cd ../ffmpeg-$FFMPEG_VERSION patch -Np1 < ../../../ffmpeg-windows.patch - PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m64" --extra-cflags="-I../include/" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -Wl,-Bdynamic" + PKG_CONFIG_PATH=../lib/pkgconfig/ ./configure --prefix=.. $DISABLE $ENABLE --enable-libmfx --enable-w32threads --enable-indev=dshow --target-os=mingw32 --cc="gcc -m64" --extra-cflags="-I../include/" --extra-ldflags="-L../lib/" --extra-libs="-static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lgcc -lgcc_eh -lWs2_32 -lcrypt32 -lpthread -Wl,-Bdynamic" make -j $MAKEJ make install ;; diff --git a/ffmpeg/lame.patch b/ffmpeg/lame.patch old mode 100755 new mode 100644