前面都是按照网上文章的教程一步步安装好了gcc cmake yasm,并配置好了jdk和ndk的环境变量。然后修改configure并创建build_android.sh。
执行./configure的时候,前面执行没问题,最后出现一句:WARNING: pkg-config not found, library detection may fail.
我不管,反正该生成的文件都生成了,继续执行./build_android.sh。
发现执行过程中没有error,但是有很多warning,都是提示方法弃用的。唯一不同的是不同目录不同文件的方法而已。
截取片段如下:
In file included from fftools/ffprobe.c:31:0:
./libavformat/avformat.h:885:21: note: declared here
AVCodecContext *codec;
等了很久。最后执行结尾是:
.............
..............
INSTALL libavutil/timecode.h
INSTALL libavutil/timestamp.h
INSTALL libavutil/tree.h
INSTALL libavutil/twofish.h
INSTALL libavutil/version.h
INSTALL libavutil/xtea.h
INSTALL libavutil/tea.h
INSTALL libavutil/tx.h
INSTALL libavutil/lzo.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/ffversion.h
INSTALL libavutil/libavutil.pc
但最后发现当前目录(.build_android.sh所在目录)下没有生成android目录,于是查看确认了一下build_android.sh,目录输出设置是:
..............................
export PREFIX=$(pwd)/android/$CPU
export ADDI_CFLAGS="-marm"
求问一下,楚什么问题了?
补充:root用户下执行的,ffmpeg版本是4.2.2