简体   繁体   English

在ffmpeg中使用build_libstagefright来为Android构建文件.so

[英]Use build_libstagefright in ffmpeg to build file .so for android

In order to use ffmpeg in android , I tried to build ffmpeg by using build_libstagefright in 为了在android中使用ffmpeg,我尝试通过使用build_libstagefright来构建ffmpeg

ffmpeg/tools/lib_stagefright 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 ffmpeg / config.log底部的消息是

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 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 /核心/包含-I ../ android-source / frameworks / base / media / libstagefright -I ../ android-source / frameworks / base / include / media / stagefright / openmax -I / home / user / android-ndk /来源/ 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 ./configure:第701行:/home/user/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++:无法执行二进制文件

ERROR: libstagefright_h264 not found 错误:找不到libstagefright_h264

Anyone have the solution of this ?? 有人对此有解决方案吗?

my Build Environment is 我的构建环境是

  1. Window 7 视窗7
  2. Cygwin 西格温
  3. android-NDK-r8b linux version android-NDK-r8b linux版本

I found a method ,let me cross this error. 我找到了一种方法,让我克服这个错误。

In file of ffmpeg/configure 在ffmpeg / configure文件中

origin : 来源:

enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h 已启用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 已启用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. 当我在这里将libstagefright_h264修复为libstagefright时,直到下一个错误为止,这似乎是正常的。

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 PS:ffmpeg版本是1.0

Take a look at ffmpeg/config.log - there has to be an error description on the last line. 看一看ffmpeg/config.log在最后一行必须有一个错误描述。

PS. PS。 On windows i used MinGW|MSYS to successfully compile ffmpeg 在Windows上,我使用MinGW | MSYS成功编译了ffmpeg

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM