日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

vlc android 移植版编译

發布時間:2023/12/15 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vlc android 移植版编译 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

同步發表于http://avenwu.net/2015/07/27/vlc-android-compiling

安裝必備工具/解決環境問題

環境準備什么的如果沒配置過需要一步步配置,主要是sdk/ndk,以及一些編譯過程中需要用到的命令工具。
* Requirements

You MUST build on Linux (or OSX if you know what you are doing). The following packages MUST must be installed: * the GNU autotools: autoconf, libtool, automake and make (a.k.a. gmake) * ...and their dependencies: m4 and gawk, mawk or nawk, * the GNU C and C++ compilers a.k.a. gcc and g++, * some GNU build utilities: pkg-config and patch, * the following other build utilities: Apache Ant (or Ant), cmake, protobuf, ragel, * the Subversion and Git version control systems * unzip and either curl or wget for retreiving sources. * Very recent versions of some of those tools may be required. At the time of writing, notably gettext 0.19.3 or later is required. If any of the above is missing, expect the build to fail at some point. If targeting an Android-x86 device, yasm must be installed too.

特別要注意gettext的版本問題,系統如果自帶了可能版本不一致,比如筆者的時0.18.3,這個時候可以進行升級,可利用port,如果原版本是用homebrew安裝的則也可以通過brew升級,但是port安裝的不能通過brew升級,這樣的操作會導致本地安裝一個新的gettext,并未覆蓋原有的版本

port upgrade outdated

獲取源碼/編譯

接著開始獲取源代碼,嘗試編譯;

獲取源代碼

git clone git://git.videolan.org/vlc-ports/android.git vlc-android

很遺憾第一次失敗了:

aven-mac-pro:vlc-android aven$ ./compile.sh *** No ANDROID_ABI defined architecture: using ARMv7 Downloading gradle% Total % Received % Xferd Average Speed Time Time Time CurrentDload Upload Total Spent Left Speed0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 Archive: gradle-2.2.1-all.zipEnd-of-central-directory signature not found. Either this file is nota zipfile, or it constitutes one disk of a multi-part archive. In thelatter case the central directory and zipfile comment will be found onthe last disk(s) of this archive. note: gradle-2.2.1-all.zip may be a plain executable, not an archive unzip: cannot find zipfile directory in one of gradle-2.2.1-all.zip orgradle-2.2.1-all.zip.zip, and cannot find gradle-2.2.1-all.zip.ZIP, period.

錯誤處理

從異常信息來看應該是gradle-2.2.1-all.zip文件無效,導致文件校驗失敗。可以手工檢測下gradle文件的內容:

aven-mac-pro:vlc-android aven$ unzip -l gradle-2.2.1-all.zip Archive: gradle-2.2.1-all.zipEnd-of-central-directory signature not found. Either this file is nota zipfile, or it constitutes one disk of a multi-part archive. In thelatter case the central directory and zipfile comment will be found onthe last disk(s) of this archive. note: gradle-2.2.1-all.zip may be a plain executable, not an archive unzip: cannot find zipfile directory in one of gradle-2.2.1-all.zip orgradle-2.2.1-all.zip.zip, and cannot find gradle-2.2.1-all.zip.ZIP, period.

果然失敗,目測應該是網絡下載文件失敗,嘗試FQ后重新下載,或從其他項目拷貝一份,gradle官網羅列了所有可供下載的版本:https://services.gradle.org/distributions

下載完畢后解壓為gradle/*,和AndroidStudio的格式保持一致,這個就是用來生成AndroidStudio配置使用的;

接下來腳本會自動嘗試下載vlc源碼,若有本地已有vlc源碼可以拷貝一份vlc,因為下載比較慢

再次編譯,遇到protobuf的缺失問題,port或brew安裝之;

protoc not found To-be-built packages: protoc rm -f -R protobuf && tar xvjf protobuf-2.6.0.tar.bz2 mv protobuf-2.6.0 protobuf && touch protobuf mv: rename protobuf-2.6.0 to protobuf: No such file or directory make: *** [protobuf] Error 1 buildsystem tools: make

安裝過程最好保持FQ狀態,否則容易出現個別地址無法訪問,例如amazon的云服務

(7) Failed to connect to s3.amazonaws.com port 443: Operation timed out

解決完錯誤,繼續編譯,看到這段輸出時基本也就大功告成:

make: Entering directory `/Users/aven/work/video/vlc-android/libvlc' [armeabi-v7a] Gdbserver : [arm-linux-androideabi-4.8] libs/armeabi-v7a/gdbserver [armeabi-v7a] Gdbsetup : libs/armeabi-v7a/gdb.setup [armeabi-v7a] Install : libanw.10.so => libs/armeabi-v7a/libanw.10.so [armeabi-v7a] Install : libanw.13.so => libs/armeabi-v7a/libanw.13.so [armeabi-v7a] Install : libanw.14.so => libs/armeabi-v7a/libanw.14.so [armeabi-v7a] Install : libanw.18.so => libs/armeabi-v7a/libanw.18.so [armeabi-v7a] Install : libanw.21.so => libs/armeabi-v7a/libanw.21.so [armeabi-v7a] Install : libiomx.10.so => libs/armeabi-v7a/libiomx.10.so [armeabi-v7a] Install : libiomx.13.so => libs/armeabi-v7a/libiomx.13.so [armeabi-v7a] Install : libiomx.14.so => libs/armeabi-v7a/libiomx.14.so [armeabi-v7a] Compile thumb : vlcjni <= libvlcjni.c [armeabi-v7a] SharedLibrary : libvlcjni.so [armeabi-v7a] Install : libvlcjni.so => libs/armeabi-v7a/libvlcjni.so make: Leaving directory `/Users/aven/work/video/vlc-android/libvlc'//省略部分:vlc-android:processVanillaARMv7DebugManifest UP-TO-DATE :vlc-android:processVanillaARMv7DebugResources UP-TO-DATE :vlc-android:generateVanillaARMv7DebugSources UP-TO-DATE :vlc-android:processVanillaARMv7DebugJavaRes UP-TO-DATE :vlc-android:compileVanillaARMv7DebugJava UP-TO-DATE :vlc-android:compileVanillaARMv7DebugNdk UP-TO-DATE :vlc-android:compileVanillaARMv7DebugSources UP-TO-DATE :vlc-android:preDexVanillaARMv7Debug :vlc-android:dexVanillaARMv7Debug :vlc-android:validateDebugSigning :vlc-android:packageVanillaARMv7Debug :vlc-android:zipalignVanillaARMv7Debug :vlc-android:assembleVanillaARMv7DebugBUILD SUCCESSFULTotal time: 23.73 secs

檢查并安裝demo:

aven-mac-pro:vlc-android aven$ ls -al vlc-android/build/outputs/apk/ total 53856 drwxr-xr-x 4 aven staff 136 Aug 1 12:34 . drwxr-xr-x 4 aven staff 136 Aug 1 12:34 .. -rw-r--r-- 1 aven staff 13785101 Aug 1 12:34 VLC-Android-1.5.0-ARMv7.apk -rw-r--r-- 1 aven staff 13783961 Aug 1 12:34 vlc-android-vanilla-ARMv7-debug-unaligned.apkaven-mac-pro:vlc-android aven$ adb install vlc-android/build/outputs/apk/VLC-Android-1.5.0-ARMv7.apk 5836 KB/s (13785101 bytes in 2.306s)pkg: /data/local/tmp/VLC-Android-1.5.0-ARMv7.apk Success

檢驗成果

運行demo,功能還是很強大的,基本上就是一個完善的播放器,還支持一些實用的功能,比如倍速播放;


參考文檔

  • https://wiki.videolan.org/AndroidCompile/

轉載于:https://www.cnblogs.com/avenwu/p/4812279.html

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的vlc android 移植版编译的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。