因工作需求需要使用到VLC的一些功能
官網下載原始碼自行編譯
Source code: http://code.videolan.org/videolan/vlc-android
Compile tutorial: http://wiki.videolan.org/AndroidCompile/
我的os平台是Ubuntu 15.10, 在編譯過程當中我碰到的一些問題:
(1) 修改gettext版本
Note : VLC requires gettext version 0.19.3, but Ubuntu version 15.04 (Vivid Vervet) provides version 0.19.2
To build VLC with this release, either build your own gettext from sources, or
edit vlc/contrib/contrib-tizen-arm-linux-gnueabi/libgpg-error/configure.ac, line 158 and change version 0.19.3 to version 0.19.2
(2) 如果出現_Static_assert(x, s) blablabla..之類的錯誤請打開vlc_fixups.h
位置在(/source code folder../vlc/include)
將#define _Static_assert(x, s) ((void)sizeof (struct {unsigned: -!(x);})) 註解掉
若不想自行編譯, 我將我自己編好的.aar函式庫分享到google drive上, 請自行下載使用
版本有:armeabi armeabi-v7a x86 mips
https://drive.google.com/file/d/0B5z0azUwvd7yQ0tHMjBkcFlETHc/view?usp=sharing
Android Studio使用方法:
File->New->New Module->Import .JAR/.AAR Package 選擇你要使用的library
import進來後, 再設定dependency就好了
File->Project Structure->左邊列表的Modules->app->上方的Dependencies分頁-> 按右上角的+號 -> Module dependency-> 選擇:libvlc-3.0.0
若有編譯上的問題, 歡迎提出來一起討論~