有人知道包含arm-linux-androideabi-pkg-config工具的ffmpeg linux arm平台的任何工具链吗?Android NDK 不包含它。还有人成功地为包含 alsa 设备的 android 构建 ffmpeg 吗?请注意,我的 Ubuntu x86 PC 上存在 libasound。在访问了包括 ffmpeg.org、ffmpeg--nabbles、groups.google.com 在内的论坛(包括 andro 和 android-ndk gropus)以及整个互联网之后,我没有成功地找到任何似乎知道它存在的人. 充其量,我读过人们说忽略它。考虑到它需要什么,我认为这是一件天真的事情。
对标准 ffmpeg 配置脚本的仔细审查表明,对于某些输入和输出设备,需要一个描述为pkg_config_default=pkg-config的工具链。此外,HAVE_LIST 上的所有项目都是 SYSTEM DEPENDENT。配置脚本非常清楚地说明了每个 indev 或 outdev 项需要哪些依赖项。显然,此工具用于验证依赖项所需的库 这
是当您尝试为 android 配置 ffmpeg 时发生的情况
jasongipsyblues@android-master:~/android-ffmpeg/Project/jni$ ./configure_ffmpeg.sh
...
...
..
....
许可证:GPL 版本 3 或更高版本 创建 config.mak 和 config.h.. .config.h 不变
config.asm 不变
libavutil/avconfig.h 不变
警告:/home/jasongipsyblues/Desktop/apps/android-ndk-r8b/toolchains/arm-linux-androideabi- 4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-pkg-config 未找到,库检测可能会失败。
在装有 Ubuntu 的 PC 上,pkg-config 没有问题。
请比较以下输出,当一个 greps 来自 Ubuntu x86 PC 的 config.log 文件中的输入/输出设备 alsa 和使用 android-ndk-r8 工具链的 android 机器时
jasongipsyblues@android-master:~/android-ffmpeg/Project/jni/ffmpeg$ cat config.log|grep >alsa
alsa_indev
alsa_outdev
alsa_asoundlib_h
INDEV_LIST='alsa_indev
OUTDEV_LIST='alsa_outdev
alsa_indev='yes'
alsa_indev_deps='alsa_asoundlib_h
sndout_pcm_h '是'
alsa_outdev_deps='alsa_asoundlib_h'
indevs_if_any='alsa_indev
outdevs_if_any='alsa_outdev
check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
check_func_headers alsa/asoundlib.h snd_pcm_htimestamp -lasound
1 #include
/tmp/ffconf.VCjQQAHQ:c:错误:alsa/asoundlib.h:没有这样的文件或目录
这是显示错误来源的编译器输出:
check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
check_func_headers alsa/asoundlib.h snd_pcm_htimestamp -lasound
check_ld cc -lasound
check_cc
BEGIN /tmp/ffconf.VCjQQAHQ.c
1 #include
2 long check_snd_pcm_htimestamp(void) { return (long) snd_pcm_htimestamp; }
3 int main(void) { return 0; }
结束 /tmp/ffconf.VCjQQAHQ.c
/home/jasongipsyblues/Desktop/apps/android-ndk-r8b/toolchains/arm-linux-androideabi->4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/home/ jasongipsyblues/Desktop/apps/android-ndk-r8b/platforms/android-14/arch-arm -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I../x264 -mcpu=cortex- a9 -std=c99 -fomit-frame-pointer -fPIC -marm -c -o /tmp/ffconf.I2B2AXfH.o
/tmp/ffconf.VCjQQAHQ.c
/tmp/ffconf.VCjQQAHQ.c:1:28:错误: alsa/asoundlib.h: 没有这样的文件或目录
/tmp/ffconf.VCjQQAHQ.c: 在函数 'check_snd_pcm_htimestamp':
/tmp/ffconf.VCjQQAHQ.c:2: 错误: 'snd_pcm_htimestamp' 未声明(首次在此函数中使用)
/tmp/ffconf.VCjQQAHQ.c:2:错误:(每个未声明的标识符仅报告一次
/tmp/ffconf.VCjQQAHQ.c:2:错误:对于它出现的每个函数。)
这是针对 Ubuntu x86PC ffmpeg
jasongipsyblues @安卓主:〜/ ffmpeg的$猫的config.log | grep的
ALSA
alsa_indev alsa_outdev
alsa_asoundlib_h
INDEV_LIST = 'alsa_indev
OUTDEV_LIST =' alsa_outdev
alsa_indev = '是'
alsa_indev_deps = 'alsa_asoundlib_h snd_pcm_htimestamp'
alsa_outdev = '是'
alsa_outdev_deps = 'alsa_asoundlib_h'
indevs_if_any = 'alsa_indev
outdevs_if_any='alsa_outdev
check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
check_func_headers alsa/asoundlib.h snd_pcm_htimestamp -lasound
1 #include
这里没有错误,alsa成功包含在ffmpeg构建中