配置Half-ninja android FFMPEG项目

时间:2013-12-24 05:03:47

标签: android android-ndk ffmpeg

我完全配置了android-halfninja项目,我设法构建

refered to this link

libs / armeabi / libvideokit.so和 libs / armeabi / ffmpeg

来自给定来源的库

但我必须对.sh文件进行一些更改才能构建.so文件。

但是现在我试图在我的android项目中执行以下ffmpeg命令它无法正常运行

    String var[] = {"ffmpeg","-i",input};



12-24 10:34:44.569: I/VideoKit(14374): Loading native library compiled at 14:43:51 Dec 18 2013
12-24 10:34:44.599: I/ActivityManager(290): Process uk.co.halfninja.videokit (pid 14374) has died.
12-24 10:34:44.599: W/ActivityManager(290): Force removing ActivityRecord{2bea3e28 uk.co.halfninja.videokit/.MainActivity}: app died, no saved state

任何人都可以告诉我在half-nonja项目中出现此错误可能是什么问题

这是我的configure_ffmpeg.sh文件

    #!/bin/bash
pushd `dirname $0`
. settings.sh

if [[ $DEBUG == 1 ]]; then
  echo "DEBUG = 1"
  DEBUG_FLAG="--disable-stripping"
fi

# I haven't found a reliable way to install/uninstall a patch from a Makefile,
# so just always try to apply it, and ignore it if it fails. Works fine unless
# the files being patched have changed, in which cause a partial application
# could happen unnoticed.
patch -N -p1 --reject-file=- < redact-plugins.patch
patch -N -p1 --reject-file=- < arm-asm-fix.patch
patch -d ffmpeg -N -p1 --reject-file=- < \
    ARM_generate_position_independent_code_to_access_data_symbols.patch
patch -d ffmpeg -N -p1 --reject-file=- < \
    ARM_intmath_use_native-size_return_types_for_clipping_functions.patch
patch -d ffmpeg -N -p1 --reject-file=- < \
    enable-fake-pkg-config.patch

pushd ffmpeg

./configure \
$DEBUG_FLAG \
--arch=arm \
--cpu=cortex-a8 \
--target-os=linux \
--enable-runtime-cpudetect \
--prefix=$prefix \
--enable-pic \
--disable-shared \
--enable-static \
--cross-prefix=$NDK_TOOLCHAIN_BASE/bin/$NDK_ABI-linux-androideabi- \
--sysroot="$NDK_SYSROOT" \
--extra-cflags="-I../x264 -mfloat-abi=softfp -mfpu=neon" \
--extra-ldflags="-L../x264" \
\
--enable-version3 \
--enable-gpl \
\
--disable-doc \
--enable-yasm \
\
--disable-everything \
--enable-decoder=mjpeg \
--enable-demuxer=mjpeg \
--enable-parser=mjpeg \
--enable-demuxer=image2 \
--enable-muxer=mp4 \
--enable-encoder=libx264 \
--enable-decoder=rawvideo \
--enable-protocol=file \
--enable-hwaccels \
--enable-filter=buffer \
--enable-filter=buffersink \
--disable-demuxer=v4l \
--disable-demuxer=v4l2 \
--disable-indev=v4l \
--disable-indev=v4l2 \
\
--disable-indevs \
--enable-indev=lavfi \
--disable-outdevs \
\
--enable-hwaccels \
\
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-network \
\
--enable-libx264 \
--enable-zlib \
--enable-muxer=md5

popd; popd


#--enable-decoders \
#--enable-encoders \
#--enable-muxers \
#--enable-demuxers \
#--enable-parsers \
#--enable-protocols \
#--enable-filter=buffer \
#--enable-filter=buffersink \
#--enable-avresample \
#--enable-faac \

0 个答案:

没有答案