Merge branch 'WAT-51-New-external-libraries-Audio' into WAT-53-libopus

ffmpeg_4.4.2
Javernaut 5 years ago
commit 14fa34abc8
  1. 2
      .travis.yml
  2. 4
      ffmpeg-android-maker.sh
  3. 13
      scripts/export-build-variables.sh
  4. 10
      scripts/ffmpeg/build.sh
  5. 2
      scripts/libmp3lame/build.sh
  6. 25
      scripts/parse-arguments.sh

@ -17,4 +17,4 @@ install:
- curl http://archive.ubuntu.com/ubuntu/pool/universe/n/nasm/nasm_2.14.02-1_amd64.deb --output $HOME/nasm_2.14.02-1_amd64.deb - curl http://archive.ubuntu.com/ubuntu/pool/universe/n/nasm/nasm_2.14.02-1_amd64.deb --output $HOME/nasm_2.14.02-1_amd64.deb
- sudo dpkg -i $HOME/nasm_2.14.02-1_amd64.deb - sudo dpkg -i $HOME/nasm_2.14.02-1_amd64.deb
script: script:
- bash -e ffmpeg-android-maker.sh -dav1d -mp3lame -aom -opus -android=18 - ./ffmpeg-android-maker.sh -dav1d -mp3lame -aom -opus -android=18

@ -112,13 +112,13 @@ do
cd ${!COMPONENT_SOURCES_DIR_VARIABLE} cd ${!COMPONENT_SOURCES_DIR_VARIABLE}
# and executing the component-specific build script # and executing the component-specific build script
source ${SCRIPTS_DIR}/${COMPONENT}/build.sh source ${SCRIPTS_DIR}/${COMPONENT}/build.sh || exit 1
# Returning to the root directory. Just in case. # Returning to the root directory. Just in case.
cd ${BASE_DIR} cd ${BASE_DIR}
done done
checkTextRelocations checkTextRelocations || exit 1
prepareOutput prepareOutput
done done

@ -54,18 +54,18 @@ export TARGET_TRIPLE_MACHINE_CC=$TARGET_TRIPLE_MACHINE_CC
export CPU_FAMILY=$CPU_FAMILY export CPU_FAMILY=$CPU_FAMILY
# Common prefix for ld, as, etc. # Common prefix for ld, as, etc.
if [ $DESIRED_BINUTILS = "gnu" ] ; then
export CROSS_PREFIX=${TARGET_TRIPLE_MACHINE_BINUTILS}-linux-${TARGET_TRIPLE_OS}- export CROSS_PREFIX=${TARGET_TRIPLE_MACHINE_BINUTILS}-linux-${TARGET_TRIPLE_OS}-
else
export CROSS_PREFIX=llvm-
fi
export CROSS_PREFIX_WITH_PATH=${TOOLCHAIN_PATH}/bin/${CROSS_PREFIX} export CROSS_PREFIX_WITH_PATH=${TOOLCHAIN_PATH}/bin/${CROSS_PREFIX}
# Exporting Binutils paths, if passing just CROSS_PREFIX_WITH_PATH is not enough # Exporting Binutils paths, if passing just CROSS_PREFIX_WITH_PATH is not enough
# The FAM_ prefix is used to eliminate passing those values implicitly to build systems # The FAM_ prefix is used to eliminate passing those values implicitly to build systems
export FAM_ADDR2LINE=${CROSS_PREFIX_WITH_PATH}addr2line export FAM_ADDR2LINE=${CROSS_PREFIX_WITH_PATH}addr2line
export FAM_AR=${CROSS_PREFIX_WITH_PATH}ar export FAM_AR=${CROSS_PREFIX_WITH_PATH}ar
export FAM_AS=${CROSS_PREFIX_WITH_PATH}as
export FAM_DWP=${CROSS_PREFIX_WITH_PATH}dwp
export FAM_ELFEDIT=${CROSS_PREFIX_WITH_PATH}elfedit
export FAM_GPROF=${CROSS_PREFIX_WITH_PATH}gprof
export FAM_LD=${CROSS_PREFIX_WITH_PATH}ld
export FAM_NM=${CROSS_PREFIX_WITH_PATH}nm export FAM_NM=${CROSS_PREFIX_WITH_PATH}nm
export FAM_OBJCOPY=${CROSS_PREFIX_WITH_PATH}objcopy export FAM_OBJCOPY=${CROSS_PREFIX_WITH_PATH}objcopy
export FAM_OBJDUMP=${CROSS_PREFIX_WITH_PATH}objdump export FAM_OBJDUMP=${CROSS_PREFIX_WITH_PATH}objdump
@ -79,6 +79,9 @@ export TARGET=${TARGET_TRIPLE_MACHINE_CC}-linux-${TARGET_TRIPLE_OS}${ANDROID_PLA
# The name for compiler is slightly different, so it is defined separatly. # The name for compiler is slightly different, so it is defined separatly.
export FAM_CC=${TOOLCHAIN_PATH}/bin/${TARGET}-clang export FAM_CC=${TOOLCHAIN_PATH}/bin/${TARGET}-clang
export FAM_CXX=${FAM_CC}++ export FAM_CXX=${FAM_CC}++
export FAM_LD=${FAM_CC}
export FAM_AS=${FAM_CC}
# TODO consider abondaning this strategy of defining the name of the clang wrapper # TODO consider abondaning this strategy of defining the name of the clang wrapper
# in favour of just passing -mstackrealign and -fno-addrsig depending on # in favour of just passing -mstackrealign and -fno-addrsig depending on
# ANDROID_ABI, ANDROID_PLATFORM and NDK's version # ANDROID_ABI, ANDROID_PLATFORM and NDK's version

@ -27,15 +27,21 @@ DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS"
--target-os=android \ --target-os=android \
--arch=${TARGET_TRIPLE_MACHINE_BINUTILS} \ --arch=${TARGET_TRIPLE_MACHINE_BINUTILS} \
--sysroot=${SYSROOT_PATH} \ --sysroot=${SYSROOT_PATH} \
--cross-prefix=${CROSS_PREFIX_WITH_PATH} \
--cc=${FAM_CC} \ --cc=${FAM_CC} \
--cxx=${FAM_CXX} \
--ld=${FAM_LD} \
--ar=${FAM_AR} \
--as=${FAM_AS} \
--nm=${FAM_NM} \
--ranlib=${FAM_RANLIB} \
--strip=${FAM_STRIP} \
--extra-cflags="-O3 -fPIC $DEP_CFLAGS" \ --extra-cflags="-O3 -fPIC $DEP_CFLAGS" \
--extra-ldflags="$DEP_LD_FLAGS" \ --extra-ldflags="$DEP_LD_FLAGS" \
--enable-shared \ --enable-shared \
--disable-static \ --disable-static \
--pkg-config=$(which pkg-config) \ --pkg-config=$(which pkg-config) \
${EXTRA_BUILD_CONFIGURATION_FLAGS} \ ${EXTRA_BUILD_CONFIGURATION_FLAGS} \
$ADDITIONAL_COMPONENTS $ADDITIONAL_COMPONENTS || exit 1
${MAKE_EXECUTABLE} clean ${MAKE_EXECUTABLE} clean
${MAKE_EXECUTABLE} -j${HOST_NPROC} ${MAKE_EXECUTABLE} -j${HOST_NPROC}

@ -13,7 +13,7 @@
--disable-frontend \ --disable-frontend \
CC=${FAM_CC} \ CC=${FAM_CC} \
AR=${FAM_AR} \ AR=${FAM_AR} \
RANLIB=${FAM_RANLIB} RANLIB=${FAM_RANLIB} || exit 1
${MAKE_EXECUTABLE} clean ${MAKE_EXECUTABLE} clean
${MAKE_EXECUTABLE} -j${HOST_NPROC} ${MAKE_EXECUTABLE} -j${HOST_NPROC}

@ -10,10 +10,10 @@ ABIS_TO_BUILD=()
API_LEVEL=16 API_LEVEL=16
SOURCE_TYPE=TAR SOURCE_TYPE=TAR
SOURCE_VALUE=4.2.2 SOURCE_VALUE=4.2.2
BINUTILS=gnu
EXTERNAL_LIBRARIES=() EXTERNAL_LIBRARIES=()
for argument in "$@" for argument in "$@"; do
do
case $argument in case $argument in
# Build for only specified ABIs (separated by comma) # Build for only specified ABIs (separated by comma)
--target-abis=*|-abis=*) --target-abis=*|-abis=*)
@ -38,38 +38,43 @@ do
# Use this value as Android platform version during compilation. # Use this value as Android platform version during compilation.
--android-api-level=*|-android=*) --android-api-level=*|-android=*)
API_LEVEL="${argument#*=}" API_LEVEL="${argument#*=}"
shift
;; ;;
# Checkout the particular tag in the FFmpeg's git repository # Checkout the particular tag in the FFmpeg's git repository
--source-git-tag=*) --source-git-tag=*)
SOURCE_TYPE=GIT_TAG SOURCE_TYPE=GIT_TAG
SOURCE_VALUE="${argument#*=}" SOURCE_VALUE="${argument#*=}"
shift
;; ;;
# Checkout the particular branch in the FFmpeg's git repository # Checkout the particular branch in the FFmpeg's git repository
--source-git-branch=*) --source-git-branch=*)
SOURCE_TYPE=GIT_BRANCH SOURCE_TYPE=GIT_BRANCH
SOURCE_VALUE="${argument#*=}" SOURCE_VALUE="${argument#*=}"
shift
;; ;;
# Download the particular tar archive by its version # Download the particular tar archive by its version
--source-tar=*) --source-tar=*)
SOURCE_TYPE=TAR SOURCE_TYPE=TAR
SOURCE_VALUE="${argument#*=}" SOURCE_VALUE="${argument#*=}"
shift ;;
# Which binutils to use (gnu or llvm)
--binutils=*|-binutils=*)
binutils_value="${argument#*=}"
case $binutils_value in
gnu|llvm)
BINUTILS=$binutils_value
;;
*)
echo "Unknown binutils: $binutils_value"
;;
esac
;; ;;
# Arguments below enable certain external libraries to build into FFmpeg # Arguments below enable certain external libraries to build into FFmpeg
--enable-libaom|-aom) --enable-libaom|-aom)
EXTERNAL_LIBRARIES+=( "libaom" ) EXTERNAL_LIBRARIES+=( "libaom" )
shift
;; ;;
--enable-libdav1d|-dav1d) --enable-libdav1d|-dav1d)
EXTERNAL_LIBRARIES+=( "libdav1d" ) EXTERNAL_LIBRARIES+=( "libdav1d" )
shift
;; ;;
--enable-libmp3lame|-mp3lame) --enable-libmp3lame|-mp3lame)
EXTERNAL_LIBRARIES+=( "libmp3lame" ) EXTERNAL_LIBRARIES+=( "libmp3lame" )
shift
;; ;;
--enable-libopus|-opus) --enable-libopus|-opus)
EXTERNAL_LIBRARIES+=( "libopus" ) EXTERNAL_LIBRARIES+=( "libopus" )
@ -79,6 +84,7 @@ do
echo "Unknown argument $argument" echo "Unknown argument $argument"
;; ;;
esac esac
shift
done done
# if ABIS_TO_BUILD list is empty, then fill it with all supported ABIs # if ABIS_TO_BUILD list is empty, then fill it with all supported ABIs
@ -101,3 +107,4 @@ export FFMPEG_EXTERNAL_LIBRARIES=${EXTERNAL_LIBRARIES[@]}
# Desired Android API level to use during compilation # Desired Android API level to use during compilation
# Will be replaced with 21 for 64bit ABIs if the value is less than 21 # Will be replaced with 21 for 64bit ABIs if the value is less than 21
export DESIRED_ANDROID_API_LEVEL=${API_LEVEL} export DESIRED_ANDROID_API_LEVEL=${API_LEVEL}
export DESIRED_BINUTILS=${BINUTILS}

Loading…
Cancel
Save