Problem in FFmpeg decoder, Android

Put problems with the Android NDK in this forum.

Problem in FFmpeg decoder, Android

Postby fargath » Fri Nov 04, 2011 5:23 pm

I have try to implement the ffmpeg decoding library in my android project.Dowload FFmpeg.I got the ffmpeg library from the bambuser client version and unpack that into the project jni folder.Then i run the extract command(./extract.sh) in cygwin compiler tool(its becoz am using windows os) after that am trying to build ffmpeg library using the command ./build.sh

NDK version: NDKr5b
Cygwin tool version: 1.7

my build.sh file is

************ Command starts here ************

#!/bin/bash
if [ "$NDK" = "" ]; then
echo NDK variable not set, assuming ${HOME}/android-ndk
export NDK=${HOME}/android-ndk
fi

SYSROOT=$NDK/platforms/android-8/arch-arm
# Expand the prebuilt/* path into the correct one
TOOLCHAIN=`echo $NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows`
export PATH=$TOOLCHAIN/bin:$PATH

rm -rf build/ffmpeg
mkdir -p build/ffmpeg
cd ffmpeg

# Don't build any neon version for now
for version in armv5te armv7a; do

DEST=../build/ffmpeg
FLAGS="--target-os=linux --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- --arch=arm --cc=$TOOLCHAIN/bin/arm-linux-androideabi-gcc"
FLAGS="$FLAGS --sysroot=$SYSROOT"
FLAGS="$FLAGS --soname-prefix=/data/data/org.sample.ffmpegsample/lib/"
FLAGS="$FLAGS --enable-shared --disable-symver --enable-cross-compile"
FLAGS="$FLAGS --enable-small --enable-version3 --optimization-flags=-O2"
FLAGS="$FLAGS --nm=$TOOLCHAIN/bin/arm-linux-androideabi-nm"
FLAGS="$FLAGS --ar=$TOOLCHAIN/bin/arm-linux-androideabi-ar"
FLAGS="$FLAGS --enable-gpl --enable-nonfree --disable-stripping"
FLAGS="$FLAGS --enable-encoder=mpeg2video --enable-encoder=nellymoser"
$ADDITIONAL_CONFIGURE_FLAG

case "$version" in
neon)
EXTRA_CFLAGS="-march=armv7-a -mfloat-abi=softfp -mfpu=neon"
EXTRA_LDFLAGS="-Wl,--fix-cortex-a8"
# Runtime choosing neon vs non-neon requires
# renamed files
ABI="armeabi-v7a"
;;
armv7a)
EXTRA_CFLAGS="-march=armv7-a -mfloat-abi=softfp"
EXTRA_LDFLAGS=""
ABI="armeabi-v7a"
;;
*)
EXTRA_CFLAGS=""
EXTRA_LDFLAGS=""
ABI="armeabi"
;;
esac
DEST="$DEST/$ABI"
FLAGS="$FLAGS --prefix=$DEST"

mkdir -p $DEST
echo $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" > $DEST/info.txt
./configure $FLAGS --extra-cflags="$EXTRA_CFLAGS" --extra-ldflags="$EXTRA_LDFLAGS" | tee $DEST/configuration.txt
[ $PIPESTATUS == 0 ] || exit 1
make clean
make -j4 || exit 1
make install || exit 1
done

************ Command ends here ************

Here I attach my cygwin command tool screenshot,
Thanks in advance.

http://www.mediafire.com/?xc3511m9miyknia
Attachments
clip_image002.jpg
cygwin_command_tool_error
clip_image002.jpg (41.2 KiB) Viewed 257 times
fargath
Junior Developer
Junior Developer
 
Posts: 14
Joined: Mon Nov 22, 2010 3:44 pm

Top

Return to NDK Problems

Who is online

Users browsing this forum: No registered users and 1 guest