add option to change ffmpeg url

pull/66/head
hanbowen 3 years ago
parent 1005b38a2e
commit d5af44c1b4
  1. 2
      scripts/ffmpeg/download.sh
  2. 6
      scripts/parse-arguments.sh

@ -28,7 +28,7 @@ function ensureSourcesGit() {
FFMPEG_SOURCES=$(pwd)/${GIT_DIRECTORY} FFMPEG_SOURCES=$(pwd)/${GIT_DIRECTORY}
if [[ ! -d "$FFMPEG_SOURCES" ]]; then if [[ ! -d "$FFMPEG_SOURCES" ]]; then
git clone https://git.ffmpeg.org/ffmpeg.git ${GIT_DIRECTORY} git clone ${FFMPEG_SOURCE_URL} ${GIT_DIRECTORY}
fi fi
cd ${GIT_DIRECTORY} cd ${GIT_DIRECTORY}

@ -8,6 +8,7 @@
# See the end of this file for more description. # See the end of this file for more description.
ABIS_TO_BUILD=() ABIS_TO_BUILD=()
API_LEVEL=19 API_LEVEL=19
SOURCE_URL=https://git.ffmpeg.org/ffmpeg.git
SOURCE_TYPE=TAR SOURCE_TYPE=TAR
SOURCE_VALUE=5.0.1 SOURCE_VALUE=5.0.1
EXTERNAL_LIBRARIES=() EXTERNAL_LIBRARIES=()
@ -61,6 +62,10 @@ for argument in "$@"; do
--android-api-level=* | -android=*) --android-api-level=* | -android=*)
API_LEVEL="${argument#*=}" API_LEVEL="${argument#*=}"
;; ;;
# Checkout an alternative fork of the FFmpeg's git repository
--source-git-origin=*)
SOURCE_URL= "${argument#*=}"
echo ffmpeg url $SOURCE_URL
# 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
@ -144,6 +149,7 @@ fi
export FFMPEG_ABIS_TO_BUILD=${ABIS_TO_BUILD[@]} export FFMPEG_ABIS_TO_BUILD=${ABIS_TO_BUILD[@]}
# Saving the information FFmpeg's source code downloading # Saving the information FFmpeg's source code downloading
export FFMPEG_SOURCE_URL=$SOURCE_URL
export FFMPEG_SOURCE_TYPE=$SOURCE_TYPE export FFMPEG_SOURCE_TYPE=$SOURCE_TYPE
export FFMPEG_SOURCE_VALUE=$SOURCE_VALUE export FFMPEG_SOURCE_VALUE=$SOURCE_VALUE

Loading…
Cancel
Save