Merge pull request #477 from awiouy/ffmpeg-rework

ffmpeg: rework
This commit is contained in:
Lukas Rusak 2016-07-05 10:42:39 -07:00 committed by GitHub
commit e2817f8ab6

View File

@ -34,10 +34,10 @@ PKG_LONGDESC="FFmpeg is a complete, cross-platform solution to record, convert a
PKG_IS_ADDON="no" PKG_IS_ADDON="no"
PKG_AUTORECONF="no" PKG_AUTORECONF="no"
# configure GPU drivers and dependencies: # Dependencies
get_graphicdrivers get_graphicdrivers
if [ "$VAAPI_SUPPORT" = yes ]; then if [ "$VAAPI_SUPPORT" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva-intel-driver" PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva-intel-driver"
FFMPEG_VAAPI="--enable-vaapi" FFMPEG_VAAPI="--enable-vaapi"
else else
@ -51,7 +51,7 @@ else
FFMPEG_VDPAU="--disable-vdpau" FFMPEG_VDPAU="--disable-vdpau"
fi fi
if [ "$DEBUG" = yes ]; then if [ "$DEBUG" = "yes" ]; then
FFMPEG_DEBUG="--enable-debug --disable-stripping" FFMPEG_DEBUG="--enable-debug --disable-stripping"
else else
FFMPEG_DEBUG="--disable-debug --enable-stripping" FFMPEG_DEBUG="--disable-debug --enable-stripping"
@ -63,14 +63,10 @@ fi
case "$TARGET_ARCH" in case "$TARGET_ARCH" in
arm) arm)
FFMPEG_CPU=""
FFMPEG_TABLES="--enable-hardcoded-tables" FFMPEG_TABLES="--enable-hardcoded-tables"
FFMPEG_PIC="--enable-pic"
;; ;;
x86_64) *)
FFMPEG_CPU=""
FFMPEG_TABLES="--disable-hardcoded-tables" FFMPEG_TABLES="--disable-hardcoded-tables"
FFMPEG_PIC="--enable-pic"
;; ;;
esac esac
@ -78,11 +74,8 @@ case "$TARGET_FPU" in
neon*) neon*)
FFMPEG_FPU="--enable-neon" FFMPEG_FPU="--enable-neon"
;; ;;
vfp*)
FFMPEG_FPU=""
;;
*) *)
FFMPEG_FPU="" FFMPEG_FPU="--disable-neon"
;; ;;
esac esac
@ -90,28 +83,28 @@ pre_configure_target() {
cd $ROOT/$PKG_BUILD cd $ROOT/$PKG_BUILD
rm -rf .$TARGET_NAME rm -rf .$TARGET_NAME
# ffmpeg fails building with LTO support # ffmpeg fails building for x86_64 with LTO support
strip_lto strip_lto
# ffmpeg fails running with GOLD support # ffmpeg fails running with GOLD support
strip_gold strip_gold
if [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then if [ "$KODIPLAYER_DRIVER" = "bcm2835-driver" ]; then
export CFLAGS="-I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux -DRPI=1 $CFLAGS" CFLAGS="-I$SYSROOT_PREFIX/usr/include/interface/vcos/pthreads -I$SYSROOT_PREFIX/usr/include/interface/vmcs_host/linux -DRPI=1 $CFLAGS"
export FFMPEG_LIBS="-lbcm_host -lvcos -lvchiq_arm -lmmal -lmmal_core -lmmal_util -lvcsm" FFMPEG_LIBS="-lbcm_host -lvcos -lvchiq_arm -lmmal -lmmal_core -lmmal_util -lvcsm"
fi fi
} }
configure_target() { configure_target() {
./configure --prefix=/usr \ ./configure --prefix="/usr" \
--cpu=$TARGET_CPU \ --cpu="$TARGET_CPU" \
--arch=$TARGET_ARCH \ --arch="$TARGET_ARCH" \
--enable-cross-compile \ --enable-cross-compile \
--cross-prefix=$TARGET_PREFIX \ --cross-prefix="$TARGET_PREFIX" \
--sysroot=$SYSROOT_PREFIX \ --sysroot="$SYSROOT_PREFIX" \
--sysinclude="$SYSROOT_PREFIX/usr/include" \ --sysinclude="$SYSROOT_PREFIX/usr/include" \
--target-os="linux" \ --target-os="linux" \
--extra-version="$PKG_VERSION" \
--nm="$NM" \ --nm="$NM" \
--ar="$AR" \ --ar="$AR" \
--as="$CC" \ --as="$CC" \
@ -122,10 +115,8 @@ configure_target() {
--host-ldflags="$HOST_LDFLAGS" \ --host-ldflags="$HOST_LDFLAGS" \
--host-libs="-lm" \ --host-libs="-lm" \
--extra-cflags="$CFLAGS" \ --extra-cflags="$CFLAGS" \
--extra-ldflags="$LDFLAGS -fPIC" \ --extra-ldflags="$LDFLAGS" \
--extra-libs="$FFMPEG_LIBS" \ --extra-libs="$FFMPEG_LIBS" \
--extra-version="" \
--build-suffix="" \
--disable-static \ --disable-static \
--enable-shared \ --enable-shared \
--enable-gpl \ --enable-gpl \
@ -134,7 +125,7 @@ configure_target() {
--enable-logging \ --enable-logging \
--disable-doc \ --disable-doc \
$FFMPEG_DEBUG \ $FFMPEG_DEBUG \
$FFMPEG_PIC \ --enable-pic \
--pkg-config="$ROOT/$TOOLCHAIN/bin/pkg-config" \ --pkg-config="$ROOT/$TOOLCHAIN/bin/pkg-config" \
--enable-optimizations \ --enable-optimizations \
--disable-extra-warnings \ --disable-extra-warnings \
@ -215,7 +206,6 @@ configure_target() {
--enable-zlib \ --enable-zlib \
--enable-asm \ --enable-asm \
--disable-altivec \ --disable-altivec \
$FFMPEG_CPU \
$FFMPEG_FPU \ $FFMPEG_FPU \
--enable-yasm \ --enable-yasm \
--disable-symver --disable-symver