mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 20:56:55 +00:00
commit
e2817f8ab6
@ -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,55 +63,48 @@ 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"
|
*)
|
||||||
;;
|
FFMPEG_TABLES="--disable-hardcoded-tables"
|
||||||
x86_64)
|
;;
|
||||||
FFMPEG_CPU=""
|
|
||||||
FFMPEG_TABLES="--disable-hardcoded-tables"
|
|
||||||
FFMPEG_PIC="--enable-pic"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$TARGET_FPU" in
|
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
|
||||||
|
|
||||||
pre_configure_target() {
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user