vlcandroid
① VLC播放器的Android版本
英文名稱:VLC Beta
軟體版本: V0.0.1
更新時間:2012-07-27
軟體類別:媒體播放
軟體系統:Android 2.1+
② vlc android源碼導入android studio還需要ndk編譯嗎
ndk編譯是針對jni的。jni是java native interface的縮寫,意為java本地介面。
java本地介面一般是用c語言來實現一些功能,然後通過特定的格式暴露介面給java調用。但是C語言的代碼不能直接被java使用,而是需要通過ndk進行編譯,編譯後會在libs目錄下生成.so文件,這事動態運行庫,這時C語言曝露出的介面才能被java調用。
樓主可以檢查你的vlc項目中的libs目錄下,是否包含了.so文件,如果有的話一般是不需要ndk進行 編譯的。不過如果樓主修改了c語言中的代碼,那麼為了使修改生效必須從新用ndk編譯,編譯後會刪除原來生成的.so,並生成新的.so文件。
使用ndk-r7以及更高版本的ndk,可以免安裝cygwin而直接使用命令行進行編譯,非常方便。
方法:
將ndk的根目錄設置環境變數,然後dos命令行進入需要編譯的項目的根目錄,執行命令
ndk-build
③ 有沒有vlc對應的android 版本
Android版VLC應用正式升級至1.0.0版本;
新版修復了ARMv8處理器,Android 5.0上的崩潰問題並在細節處進行了調整;
新版全新的界面已經在黑色和白色主題中使用;
④ 如何打包vlc for android sdk library
一: 安裝android SDK, NDK, JDK三個工具,SDK是android系統用的,有些SDK還包含了eclipse,
NDK是用來編譯C/C++代碼的,這樣使得android應用程序可能通過java來調用c/c++程序、JDK不用說,是java運行必須的環境。
二: 根據第一步解壓的三個工具,配置這三個工具的環境變數(PATH),方法很多,可以修改~/.bashrc /etc/profile等等,這一步一定要正確,否則系統會找不到這三個工具,後面的編譯會用到這幾個工具,當然也就會出錯了,因為系統默認不知道這幾個程序的位置,這跟windows下的環境變數一個道理。為了驗證環境變數是否配置正確,可以到別的目錄下運行這幾個程序,比如到根目錄下看能否運行ndk-build adb等程序,或者echo $PATH列印一下當前的環境變數並驗證。
⑤ vlc-android要怎麼用
做vlc-android移植的道友都應該知道,當編譯完vlc-android 源碼後EventManager.java 類中定義了許多事件,下面是源碼一部分: public class EventManager { /* * Be sure to subscribe to events you need in the JNI too. */ //public static final int MediaMetaChanged = 0; //public static final int MediaSubItemAdded = 1; //public static final int MediaDurationChanged = 2; //public static final int MediaParsedChanged = 3; //public static final int MediaFreed = 4; //public static final int MediaStateChanged = 5; //public static final int MediaPlayerMediaChanged = 0x100; //public static final int MediaPlayerNothingSpecial = 0x101; //public static final int MediaPlayerOpening = 0x102; //public static final int MediaPlayerBuffering = 0x103; public static final int MediaPlayerPlaying = 0x104; public static final int MediaPlayerPaused = 0x105; public static final int MediaPlayerStopped = 0x106; ...... } 可是對於這些事件有很多都被注釋掉了,當我們需要被注釋掉的事件時,就算把注釋拿掉,再調用mEventManager.addHandler(EventManager.getInstance())添加事件之後,也不會在定義的mEventHandler 的handleMessage()中監聽到,下面為一個mEventHandler定義的demo: [java] view plain private final VideoEventHandler mEventHandler = new VideoEventHandler(this); private class VideoEventHandler extends WeakHandler<DtvPlayer>{ public VideoEventHandler(DtvPlayer owner) { super(owner); } @Override public void handleMessage(Message msg) { DtvPlayer activity = getOwner(); if(activity == null) return; switch (msg.getData().getInt("event")) { case EventManager.MediaPlayerBuffering: Log.d(TAG, "MediaPlayerBuffering"); break; case EventManager.MediaPlayerEncounteredError: Log.d(TAG, "MediaPlayerEncounteredError"); break; ...... default: Log.e(TAG, String.format("Event not handled (0x%x)", msg.getData().getInt("event"))); break; } super.handleMessage(msg); } } 那麼如何才能夠在mEventHandler中監聽到我們需要的事件呢,下面將進入主題。 在libvlcjni.c中有一個靜態常量,其中指定了我們目前需要獲取哪些事件: [html] view plain static const libvlc_event_type_t mp_events[] = { libvlc_MediaPlayerPlaying, libvlc_MediaPlayerPaused, libvlc_MediaPlayerEndReached, libvlc_MediaPlayerStopped, libvlc_MediaPlayerVout, libvlc_MediaPlayerPositionChanged }; 你可以將自己需要的事件添加在裡面,然後將EventManager中響應的事件注釋拿掉,之後重新編譯源碼就可以再mEventHandler中獲取你剛添加的事件了。 (例如:你要想獲取MediaPlayerEncounteredError事件,先將libvlc_MediaPlayerEncounteredError添加在mp_events[]靜態常量中(注意,這里前面多了libvlc_),然後把EventManager中的public static final int MediaPlayerEncounteredError = 0x10a;注釋拿掉,重新編譯源碼之後就可以在你得mEventHandler 的handleMessage()中獲取到EventManger.MediaPlayerEncounteredError事件)。 在vlc-android/vlc/lib/event.c中定義了所有事件: [cpp] view plain #define DEF( a ) { libvlc_##a, #a, }, typedef struct { int type; const char name[40]; } event_name_t; static const event_name_t event_list[] = { DEF(MediaMetaChanged) DEF(MediaSubItemAdded) DEF(MediaDurationChanged) DEF(MediaParsedChanged) DEF(MediaFreed) DEF(MediaStateChanged) DEF(MediaPlayerMediaChanged) DEF(MediaPlayerNothingSpecial) DEF(MediaPlayerOpening) DEF(MediaPlayerBuffering) DEF(MediaPlayerPlaying) DEF(MediaPlayerPaused) DEF(MediaPlayerStopped) DEF(MediaPlayerForward) DEF(MediaPlayerBackward) DEF(MediaPlayerEndReached) DEF(MediaPlayerEncounteredError) DEF(MediaPlayerTimeChanged) DEF(MediaPlayerPositionChanged) DEF(MediaPlayerSeekableChanged) DEF(MediaPlayerPausableChanged) DEF(MediaPlayerTitleChanged) DEF(MediaPlayerSnapshotTaken) DEF(MediaPlayerLengthChanged) DEF(MediaPlayerVout) DEF(MediaListItemAdded) DEF(MediaListWillAddItem) DEF(MediaListItemDeleted) DEF(MediaListWillDeleteItem) DEF(MediaListViewItemAdded) DEF(MediaListViewWillAddItem) DEF(MediaListViewItemDeleted) DEF(MediaListViewWillDeleteItem) DEF(MediaListPlayerPlayed) DEF(MediaListPlayerNextItemSet) DEF(MediaListPlayerStopped) DEF(MediaDiscovererStarted) DEF(MediaDiscovererEnded) DEF(VlmMediaAdded) DEF(VlmMediaRemoved) DEF(VlmMediaChanged) DEF(VlmMediaInstanceStarted) DEF(VlmMediaInstanceStopped) DEF(VlmMediaInstanceStatusInit) DEF(VlmMediaInstanceStatusOpening) DEF(VlmMediaInstanceStatusPlaying) DEF(VlmMediaInstanceStatusPause) DEF(VlmMediaInstanceStatusEnd) DEF(VlmMediaInstanceStatusError) }; #undef DEF 其中DEF()將MediaPlayerEncounteredError定義為libvlc_MediaPlayerEncounteredError,當本地代碼產生MediaPlayerEncounteredError事件時會將libvlc_MediaPlayerEncounteredError傳遞給jni,與此同時jni又會傳遞給java層。不管是本地libvlc_MediaPlayerEncounteredError還是java層MediaPlayerEncounteredError,對於同一個事件被定義的值都是相同的,傳輸的是同一個消息值。本地代碼定義在vlc-android/vlc/include/libvlc_events.h, java代碼定義在EventManager.java中。
⑥ 怎麼在新版本的vlcandroid中使用舊版本的vlc
做vlc-android移植的道友都應該知道,當編譯完vlc-android 源碼後EventManager.java
類中定義了許多事件,下面是源碼一部分:
public class EventManager {/*
* Be sure to subscribe to events you need in the JNI too.
*///public static final int MediaMetaChanged = 0;
//public static final int MediaSubItemAdded = 1;
//public static final int MediaDurationChanged = 2;
//public static final int MediaParsedChanged = 3;
//public static final int MediaFreed = 4;
//public static final int MediaStateChanged = 5;//public static final int MediaPlayerMediaChanged = 0
⑦ 如何讓VLC安卓版連續播放本地視頻
據我所知,VLC 2.5暫時沒有播放列表順序播放的功能。
你可以看一下軟體的設置內是否有新建播放列表的選項。
⑧ android vlc怎麼硬解碼
前幾天用PC平台上的VLC播放RTSP流媒體時延遲時間較長,存在1s左右的延遲,效果不是很好,後來查了資料,發現這個延遲時間是可以修改的。 找到工具->首選項,然後參數設置左下角選擇「全部」,左邊選擇 「輸入編解碼」->「網路緩存」選項,可以根據具體需要加以修改,具體見下圖不過這個值不要太小,否則緩存太小,播放視頻的過程中會很卡
⑨ android 如何使用vlc進行二次開發
到vlc官網下載vlc
for
android工程,就可以進行二次開發。看你需要什麼內容,我這邊也有一個調試好的工程,需要就加我QQ463855700