【问题标题】:FFMPEG for Android toolchains: arm-linux-armeabi-eabi-pkg-config - is there any toolchain in existence containing the pkg-config tool适用于 Android 工具链的 FFMPEG:arm-linux-armeabi-eabi-pkg-config - 是否存在任何包含 pkg-config 工具的工具链
【发布时间】:2012-08-21 14:13:26
【问题描述】:

有人知道 ffmpeg linux arm 平台的任何工具链,其中包含 arm-linux-androideabi-pkg-config 工具吗?

Android NDK 不包含它。还有人成功地为包含 alsa 设备的 android 构建 ffmpeg 吗?请注意,libasound 存在于我的 Ubuntu x86 PC 上。

经过非常广泛的研究访问论坛,包括 ffmpeg.org、ffmpeg--nabbles、groups.google.com,包括 andro 和 android-ndk gropus,以及总的来说,我没有成功找到任何似乎知道它存在的人。充其量,我读过人们说忽略它。考虑到它的用途,我认为这样说是幼稚的。

对标准 ffmpeg 配置脚本的仔细审查表明,对于某些输入和输出设备,工具链描述为 pkg_config_default=pkg-配置 是必需的。此外,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 not found,库检测可能 失败。

在装有 Ubuntu 的 PC 上,pkg-config 没有问题。

当一个 greps 从 Ubuntu x86 PC 的 config.log 文件中搜索输入/输出设备时,请比较以下输出和使用 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='是'
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 #包括
/tmp/ffconf.VCjQQAHQ.c:1:28: 错误: 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
开始 /tmp/ffconf.VCjQQAHQ.c
1 #包括
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@android-master:~/ffmpeg$ cat 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 #包括
这里没有报错,而且 alsa 成功包含在 ffmpeg 构建中

【问题讨论】:

  • 你找到解决这个警告的方法了吗?

标签: android compilation ffmpeg static-libraries linux-toolchain


【解决方案1】:

https://github.com/guardianproject/android-ffmpeg

https://github.com/guardianproject/android-ffmpeg/commit/f08db49e613a7ea4423effb22973e3f1afefb819

查看链接。他只是做了一个提交,包括“freetype2”子模块,以解决 pkg-config 问题。

【讨论】:

  • @rowntreerob,感谢您提供此链接。我确实接受了一个 ollok 并试图了解他在这里做什么。我还有很多问题。运行 fake-pkg-config 的最终结果是什么?它是否尝试构建库或直接向编译器和链接器提供所需的缺失或必要文件。
  • 不知道...我从不注意“pkg-config”上的编译器警告。
猜你喜欢
  • 2011-01-10
  • 2012-08-29
  • 1970-01-01
  • 1970-01-01
  • 2012-04-22
  • 2014-05-09
  • 1970-01-01
  • 2016-08-30
  • 1970-01-01
相关资源
最近更新 更多