但无法执行ffmpeg命令。
*My build.sh is as follows
function build_r8b_test
{
bash configure --target-os=linux \
--arch=arm \
--cpu=cortex-a8 \
--enable-runtime-cpudetect \
--prefix=$PREFIX \
--enable-pic \
--disable-shared \
--enable-static \
--enable-cross-compile \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--sysroot="$PLATFORM" \
--extra-cflags="-I../x264 -mfloat-abi=softfp -mfpu=neon -fPIE -pie -fPIC -DANDROID -marm -march=armv7-" \
--extra-ldflags="-L../x264 -L$PREBUILT/lib/gcc/arm-linux-androideabi/4.9" \
--extra-libs="-lgcc" \
--enable-gpl \
--enable-version3 \
--enable-nonfree \
--disable-doc \
--enable-yasm \
--enable-decoders \
--enable-encoders \
--enable-muxers \
--enable-demuxers \
--enable-parsers \
--enable-protocols \
--enable-filters \
--disable-indevs \
--disable-outdevs \
--enable-hwaccels \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-network \
--enable-zlib \
--enable-demuxer=mov \
--enable-demuxer=h264 \
--enable-protocol=file \
--enable-avformat \
--enable-avcodec \
--enable-decoder=rawvideo \
--enable-decoder=mjpeg \
--enable-decoder=h263 \
--enable-decoder=mpeg4 \
--enable-decoder=h264 \
--enable-parser=h264 \
--enable-encoder=mpeg4 \
--disable-asm \
--enable-neon \
--enable-armv5te \
--disable-network \
--enable-avfilter \
--disable-avdevice \
--enable-postproc \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ld -rpath- link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libavfilter/libavfilter.a libpostproc/libpostproc.a libswresample/libswresample.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-search-mismatch --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.9/libgcc.a
}
#arm v7vfpv3
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_r8b_test
* and my androi.mk is as follow
LOCAL_PATH := $(call my-dir)
APP_ABI := armeabi-v7a
include $(CLEAR_VARS)
LOCAL_MODULE =myffmpeg
LOCAL_SRC_FILES :=libffmpeg.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
PATH_TO_FFMPEG_SOURCE:=$(LOCAL_PATH)/ffmpeg
LOCAL_C_INCLUDES += $(PATH_TO_FFMPEG_SOURCE)
LOCAL_MODULE=ffmpeg-jni
LOCAL_LDLIBS := -L/home/admin/android-sdk-linux/ndk-bundle/platforms/android-21/arch-arm/usr/lib -L$(LOCAL_PATH) -llog -ljnigraphics -lz -ldl -lgcc -lm
LOCAL_SRC_FILES := ffmpeg-jni.c ffmpeg/cmdutils.h ffmpeg/cmdutils.c ffmpeg/ffmpeg.h ffmpeg/ffmpeg_opt.c ffmpeg/ffmpeg_filter.c
LOCAL_SHARED_LIBRARIES:=myffmpeg
include $(BUILD_SHARED_LIBRARY)