2012-08-27 41 views
13

是否有人知道的ffmpeg linux的手臂平臺的任何工具鏈,其中包含掰任何工具鏈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-config的工具鏈是必需的。此外,HAVE_LIST上的所有項目都是系統依賴項。配置腳本非常清楚地說明每個indev或outdev項目所需的依賴關係。顯然,這個工具被使用,則驗證時需要的依賴

這是發生了什麼,當你試圖爲Android

FFMPEG爲Android工具鏈ARM-Linux的armeabi-EABI-pkg配置 - 是有存在包含pkg配置工具

[email protected]:~/android-ffmpeg/Project/jni$ ./configure_ffmpeg.sh
...
...
..
....
License: GPL version 3 or later Creating config.mak and config.h...

config.h is unchanged

config.asm is unchanged

libavutil/avconfig.h is unchanged

WARNING: /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, library detection may fail.

配置的ffmpeg在與Ubuntu PC機庫,沒有問題與pkg配置。

當一個裏grep從的config.log文件的輸入/輸出設備ALSA的一個Ubuntu的x86 PC和請比較下面的輸出,對於使用Android的NDK-R8工具鏈

[email protected]:~/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 snd_pcm_htimestamp'
alsa_outdev='yes'
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:1:28: error: alsa/asoundlib.h: No such file or directory

這在Android箱被編譯器輸出表示錯誤的來源:

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; }
END /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: error: alsa/asoundlib.h: No such file or directory
/tmp/ffconf.VCjQQAHQ.c: In function 'check_snd_pcm_htimestamp':
/tmp/ffconf.VCjQQAHQ.c:2: error: 'snd_pcm_htimestamp' undeclared (first use in this function)
/tmp/ffconf.VCjQQAHQ.c:2: error: (Each undeclared identifier is reported only once
/tmp/ffconf.VCjQQAHQ.c:2: error: for each function it appears in.)

This is for the Ubuntu x86PC ffmpeg
[email protected]:~/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 snd_pcm_htimestamp'
alsa_outdev='yes'
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
There is no error here and alsa is successfully included in the ffmpeg build

+0

您是否找到解決方案來解決此警告? –

回答

2

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

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

看看鏈接。他只是做了一個提交,包括'freetype2'子模塊,以解決pkg-config問題。

+1

@rowntreerob,感謝您的鏈接。我確實採取了ollok並試圖理解他在這裏做什麼。我仍然有許多問題。運行假pkg-config的最終結果是什麼?它試圖構建庫還是直接向編譯器和鏈接器提供缺少的或必需的文件。 – user1545779

+0

不知道......我從不關注'pkg-config'上的編譯器警告。 –