0
votes

In order to use ffmpeg in android , I tried to build ffmpeg by using build_libstagefright in

ffmpeg/tools/lib_stagefright

but it alwalys appear a error which i coundn't solve it.

the message in the bottom of ffmpeg/config.log is

arm-linux-androideabi-g++ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I../android-source/frameworks/base/include -I../android-source/system/core/include -I../android-source/frameworks/base/media/libstagefright -I../android-source/frameworks/base/include/media/stagefright/openmax -I/home/user/android-ndk/sources/cxx-stl/gnu-libstdc++/include -I/home/user/android-ndk/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include -march=armv7-a -mfloat-abi=softfp -mfpu=neon -march=armv7-a -std=c99 -fomit-frame-pointer -fPIC -marm -Wno-multichar -fno-exceptions -fno-rtti -D__STDC_CONSTANT_MACROS -c -o /tmp/ffconf.6ZzEMs87.o /tmp/ffconf.5jbfvJxK.cpp

./configure: line 701: /home/user/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++: cannot execute binary file

ERROR: libstagefright_h264 not found

Anyone have the solution of this ??

my Build Environment is

  1. Window 7
  2. Cygwin
  3. android-NDK-r8b linux version
2
/home/user/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ is for Linux, but you specify Windows 7 as build environment. Have you instealled the Windows NDK since then?Alex Cohn

2 Answers

0
votes

I found a method ,let me cross this error.

In file of ffmpeg/configure

origin :

enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h

fixed :

enabled libstagefright && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h

When I fix libstagefright_h264 to libstagefright here, it seems be normal until the next error.

CC      libavcodec/lagarithrac.o
CC      libavcodec/latm_parser.o
CXX     libavcodec/libstagefright.o
/bin/sh: /home/user/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux- x86/bin/arm-linux-androideabi-g++: cannot execute binary file
CC      libavcodec/lcldec.o
common.mak:51: recipe for target `libavcodec/libstagefright.o' failed
make: *** [libavcodec/libstagefright.o] Error 126
make: *** Waiting for unfinished jobs....

PS: ffmpeg version is 1.0

0
votes

Take a look at ffmpeg/config.log - there has to be an error description on the last line.

PS. On windows i used MinGW|MSYS to successfully compile ffmpeg