ffmpeg_6.0.0
luoye 1 year ago
parent ecd31b982e
commit 0a1bff83b2
  1. 12
      scripts/ffmpeg/build.sh

@ -22,8 +22,7 @@ fi
# Preparing flags for enabling requested libraries # Preparing flags for enabling requested libraries
ADDITIONAL_COMPONENTS= ADDITIONAL_COMPONENTS=
for LIBARY_NAME in ${FFMPEG_EXTERNAL_LIBRARIES[@]} for LIBARY_NAME in ${FFMPEG_EXTERNAL_LIBRARIES[@]}; do
do
ADDITIONAL_COMPONENTS+=" --enable-$LIBARY_NAME" ADDITIONAL_COMPONENTS+=" --enable-$LIBARY_NAME"
case $LIBARY_NAME in case $LIBARY_NAME in
libx264) libx264)
@ -163,6 +162,10 @@ DEP_LD_FLAGS="-L${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}/lib $FFMPEG_EXTRA_LD_FLAGS"
--enable-jni \ --enable-jni \
--enable-nonfree \ --enable-nonfree \
--enable-mediacodec \ --enable-mediacodec \
--enable-decoder=h264_mediacodec \
--enable-decoder=hevc_mediacodec \
--enable-encoder=h264_mediacodec \
--enable-encoder=hevc_mediacodec \
--enable-version3 \ --enable-version3 \
--pkg-config=${PKG_CONFIG_EXECUTABLE} \ --pkg-config=${PKG_CONFIG_EXECUTABLE} \
${EXTRA_BUILD_CONFIGURATION_FLAGS} \ ${EXTRA_BUILD_CONFIGURATION_FLAGS} \
@ -172,7 +175,6 @@ ${MAKE_EXECUTABLE} clean
${MAKE_EXECUTABLE} -j${HOST_NPROC} ${MAKE_EXECUTABLE} -j${HOST_NPROC}
${MAKE_EXECUTABLE} install ${MAKE_EXECUTABLE} install
export STATIC_LIB_DIR=${BUILD_DIR_FFMPEG}/${ANDROID_ABI}/lib export STATIC_LIB_DIR=${BUILD_DIR_FFMPEG}/${ANDROID_ABI}/lib
export EXTERNAL_LIB_DIR=${INSTALL_DIR}/lib export EXTERNAL_LIB_DIR=${INSTALL_DIR}/lib
echo STATIC_LIB_DIR=${STATIC_LIB_DIR} echo STATIC_LIB_DIR=${STATIC_LIB_DIR}
@ -180,8 +182,7 @@ echo EXTERNAL_LIB_DIR=${EXTERNAL_LIB_DIR}
echo FAM_CC=${FAM_CC} echo FAM_CC=${FAM_CC}
EXTERNAL_STATIC_LIB_PATH="" EXTERNAL_STATIC_LIB_PATH=""
for LIBARY_NAME in ${FFMPEG_EXTERNAL_LIBRARIES[@]} for LIBARY_NAME in ${FFMPEG_EXTERNAL_LIBRARIES[@]}; do
do
EXTERNAL_STATIC_LIB_PATH+="${EXTERNAL_LIB_DIR}/${LIBARY_NAME}.a " EXTERNAL_STATIC_LIB_PATH+="${EXTERNAL_LIB_DIR}/${LIBARY_NAME}.a "
done done
echo EXTERNAL_STATIC_LIB_PATH=${EXTERNAL_STATIC_LIB_PATH} echo EXTERNAL_STATIC_LIB_PATH=${EXTERNAL_STATIC_LIB_PATH}
@ -202,4 +203,3 @@ mkdir -p ${OUTPUT_CONFIG_HEADERS_DIR}
cp config.h ${OUTPUT_CONFIG_HEADERS_DIR}/config.h cp config.h ${OUTPUT_CONFIG_HEADERS_DIR}/config.h
${FAM_STRIP} --strip-unneeded ${STATIC_LIB_DIR}/${OUTPUT_SO_NAME} ${FAM_STRIP} --strip-unneeded ${STATIC_LIB_DIR}/${OUTPUT_SO_NAME}

Loading…
Cancel
Save