gpt4 book ai didi

android - 为 x86 构建 LibVLC

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:43:53 25 4
gpt4 key购买 nike

我一直在尝试使用适用于 Android 的 LibVLC,并且我遵循了 https://wiki.videolan.org/AndroidCompile 中的说明。并使其在 ARM 上完美运行。但是,在尝试将其编译为 x86 时,我设置了:

导出 ANDROID_ABI=x86

然后以同样的方式编译,但现在我遇到了一个问题,因为它无法编译。这是截断的构建日志:

~/vlc-android$ sh compile.sh
VLC source found
Building tools
You are ready to build VLC and its contribs
Building the contribs
Generating EGL pkg-config file
Generating GLESv2 pkg-config file
Guessing build system... x86_64-linux-gnu
Creating configuration file... config.mak
Bootstrap completed.

...

config.status: executing libtool commands
Type "make; make install" to compile and install Speex
cd speexdsp && make install
make[1]: Entering directory `/home/user/vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp'
Making install in libspeexdsp
make[2]: Entering directory `/home/user/vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp/libspeexdsp'
CC resample.lo
In file included from resample.c:104:0:
resample_neon.h:142:21: error: redefinition of 'inner_product_single'
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
^
In file included from resample.c:100:0:
resample_sse.h:40:21: note: previous definition of 'inner_product_single' was here
static inline float inner_product_single(const float *a, const float *b, unsigned int len)
^
make[2]: *** [resample.lo] Error 1
make[2]: Leaving directory `/home/user/vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp/libspeexdsp'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/user/vlc-android/vlc/contrib/contrib-android-i686-linux-android/speexdsp'
make: *** [.speexdsp] Error 2

据我所知,在该项目中出于某种原因同时包含了 ARM header 和 SSE header ,从而导致重新定义错误。但是,我不知道为什么或尝试修复它。任何建议将不胜感激。

最佳答案

Autoconf 看起来不太正确,x86 构建与 NEON 指令集无关,因此不应包含 resample_neon.h。我还没有找到根本原因,但为了快速解决,打开 ../vlc-android/vlc/contrib/contrib-android-i686-linux-android 下的 resample.c/speexdsp/libspeexdsp 并删除以下行:

...
#ifdef _USE_NEON
#include "resample_neon.h"
#endif
...

然后重新运行 compile.sh,您应该会得到一个适用于您的 x86 模拟器/设备的可用 apk。

关于android - 为 x86 构建 LibVLC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26609320/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com