与LibVLC开发的android上的Windows [英] Develop with LibVLC for android on Windows

查看:878
本文介绍了与LibVLC开发的android上的Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力,即使得到与Android-LibVLC运行演示应用程序。

I've struggled to even get a demo application running with Android-LibVLC.

我只能找到Linux的文档并不能应用到我的设备上运行(尽管它编译)。

I can only find documentation for linux and can't get the application to run on my device (although it compiles).

当我启动它记录应用程序:

When I launch the application it logs:

12-16 15:58:19.572    9121-9121/? E/VLC/LibVLC﹕ Can't load vlcjni library: java.lang.UnsatisfiedLinkError: Couldn't load vlcjni from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.compdigitec.libvlcandroidsample-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.compdigitec.libvlcandroidsample-1, /vendor/lib, /system/lib]]]: findLibrary returned null
12-16 15:58:19.667    9135-9135/com.compdigitec.libvlcandroidsample E/VLC/LibVLC﹕ Can't load vlcjni library: java.lang.UnsatisfiedLinkError: Couldn't load vlcjni from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.compdigitec.libvlcandroidsample-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.compdigitec.libvlcandroidsample-1, /vendor/lib, /system/lib]]]: findLibrary returned null

我编译该项目APK与org.videolan.libvlc目录类为源根的一部分,并用相同的模块中的JNI目录和失败,我还包含了整个VLC模块作为一个单独的库模块并使其依赖,这也失败了。

I've compiled the project APK with the org.videolan.libvlc directory classes as part of the source root and with the jni directory in the same module and failed, I've also included the whole VLC module as a separate library module and made it a dependency, this also failed.

没有任何人有一种行之有效的方法来配置/建立与LibVLC一个Android项目,从窗户?或链接到的指令/文件? (我一直没能找到任何东西)。

Does anybody have a proven method to configure/build an android project with LibVLC, from windows? Or a link to instructions/documentation? (I haven't been able to find anything).

我们的目标是要取代我的android MediaPlayer的依赖类的库/实现,支持更多的文件类型/ codeCS。

The goal is to replace my android MediaPlayer reliant classes to a library/implementation that supports more filetypes / codecs.

推荐答案

而在Windows中会得到警告说建设Android.mk:iomx-hc:非系统库的链接器标志: - lgcc -lstagefright - lmedia -lbinder你会得到他们为多个文件。报告也警告 的Andr​​oid NDK:这可能导致不正确的构建尝试使用LOCAL_STATIC_LIBRARIES 所以,即使你得到的构建输出不会有所需的文件。因此,你所得到的错误,同时运行的应用程序。

While building in windows your will get warning saying "Android.mk:iomx-hc: non-system libraries in linker flags: -lgcc -lstagefright - lmedia -lbinder" you will get them for multiple files. And it also warns "Android NDK:This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES" So even if you get the builds output it will not have the required files. And hence you are getting the error while running the application.

现在,如果你看看Android.mk你会发现

Now if you look into Android.mk you will find

include $(CLEAR_VARS)

LOCAL_MODULE     := libiomx-gingerbread
LOCAL_SRC_FILES  := ../$(VLC_SRC_DIR)/modules/codec/omxil/iomx.cpp
LOCAL_C_INCLUDES := $(VLC_SRC_DIR)/modules/codec/omxil $(ANDROID_SYS_HEADERS_GINGERBREAD)/frameworks/base/include $(ANDROID_SYS_HEADERS_GINGERBREAD)/system/core/include
LOCAL_CFLAGS     := -Wno-psabi
LOCAL_LDLIBS     := -L$(ANDROID_LIBS) -lgcc -lstagefright -lmedia -lutils -lbinder

include $(BUILD_SHARED_LIBRARY)

我下载了VLC的来源从这里并提取源我后能找到extracted_pa​​th\ VLC-2.1.4 \模块\ codeC \ omxil \ iomx.cpp。所以,如果你能为VLC_SRC_DIR更改为VLC源提取Windows机器上的目录包含路径,我认为你应该能够编译它。如果没有使用虚拟机上运行的Linux编译project.It还需要归档库(.a),你不会找到VLC的来源中。所以,你必须先建立VLC的源,然后在项目中包含的所有东西。我认为Linux的虚拟机是您最好的选择。

I downloaded the source of vlc from here and after extracting the source i was able to find "extracted_path"\vlc-2.1.4\modules\codec\omxil\iomx.cpp. So if you can change the include path for VLC_SRC_DIR to the directory where the source of vlc is extracted on WINDOWS machine I think you should be able to compile it. If not use a virtual machine running linux to compile the project.It also requires Archive libraries (.a) which you won't find in the source of vlc. So you will have to first build the source of vlc and then include all the stuff in the project. I think linux in virtual machine is your best bet.

这篇关于与LibVLC开发的android上的Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆