|
|
@ -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} |
|
|
|