From f76cacb349e62cf170346896bc909e1ae56624ab Mon Sep 17 00:00:00 2001 From: luoye Date: Tue, 25 Apr 2023 23:58:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE$LIBARY=5FNAME=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E5=AF=B9=E5=BA=94=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ffmpeg/build.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/ffmpeg/build.sh b/scripts/ffmpeg/build.sh index 6801310..6d053b5 100755 --- a/scripts/ffmpeg/build.sh +++ b/scripts/ffmpeg/build.sh @@ -25,8 +25,21 @@ ADDITIONAL_COMPONENTS= for LIBARY_NAME in ${FFMPEG_EXTERNAL_LIBRARIES[@]} do ADDITIONAL_COMPONENTS+=" --enable-$LIBARY_NAME" + case $LIBARY_NAME in + libx264) + ADDITIONAL_COMPONENTS+=" --enable-encoder=libx264" + ;; + libmp3lame) + ADDITIONAL_COMPONENTS+=" --enable-decoder=mp3" + ;; + *) + echo "Unknown ADDITIONAL_COMPONENTS LIBARY_NAME: $LIBARY_NAME" + ;; + esac done +echo ADDITIONAL_COMPONENTS=${ADDITIONAL_COMPONENTS} + # Referencing dependencies without pkgconfig DEP_CFLAGS="-I${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/include" DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS" @@ -153,7 +166,7 @@ DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS" --enable-version3 \ --pkg-config=${PKG_CONFIG_EXECUTABLE} \ ${EXTRA_BUILD_CONFIGURATION_FLAGS} \ - $ADDITIONAL_COMPONENTS || exit 1 + ${ADDITIONAL_COMPONENTS} || exit 1 ${MAKE_EXECUTABLE} clean ${MAKE_EXECUTABLE} -j${HOST_NPROC}