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