Android Video
来源:互联网 发布:python入门经典pdf下载 编辑:程序博客网 时间:2024/06/06 14:01
http://www.felixjones.co.uk/neo%20website/Android_View/
http://www.jianshu.com/p/d3d3186eefcb
http://www.jianshu.com/p/b2d949ab1a1a
http://www.jianshu.com/p/291ff6ddc164
https://github.com/ChouRay/PlayVideo-OpenGL
https://github.com/yulu/ShaderCam
I can't help you with Unity, but in java, you can create a texture with OpenGL-ES:
private static int GL_TEXTURE_EXTERNAL_OES = 0x8D65;....GLES20.glGenTextures(1, textureHandle, 0);GLES20.glBindTexture(GL_TEXTURE_EXTERNAL_OES, textureHandle[0]);
Use it to create a surface texture and a surface:
SurfaceTexture surfaceTexture = new SurfaceTexture(textureHandle[0]);Surface surface = new Surface(surfaceTexture);
And then pass that surface to android.media.MediaPlayer:
MediaPlayer mediaPlayer = new MediaPlayer(getContext(), uriToMyMediaFile, surface);
Bind that texture to a square in your scene and call this every frame:
surfaceTexture.updateTexImage()
and the video will play when you call mediaPlayer.start();
If Unity allows you to write your own java code to run behind the scenes, this should work if you bind that texture to a surface from Unity.
If you have a video stream that you can't play with mediaPlayer (like a live video chat, etc), you can use the surface with android.media.MediaCodec as well, but there's a lot more setup work involved
这是最简单的一个显示图片的例子
http://m.fx114.net/qa-126-150453.aspx
Rendering SurfaceTexture to Unity Texture2D : http://codegur.com/35227222/rendering-surfacetexture-to-unity-texture2d
- android video
- Android Video
- android html5 video
- Android实现HTML5 video
- android html5 video
- Android webview+Html5 video
- Android Video学习笔记
- Android Video视频播放
- Android Video 问题集
- video player demo in android
- android webkit HTML5 video研究
- android webkit HTML5 video研究
- android webkit HTML5 video研究
- android html5<video> 视频播放
- zz Android HTML5 video play
- android录像/打开video文件
- Android webkit HTML5 Video Play
- android webkit HTML5 video播放
- 字符串存成excel表范例
- yii2入口文件
- bzoj 4475: [Jsoi2015]子集选取
- handler实现按两次返回键退出程序
- 获取系统日期和时间
- Android Video
- TOPOGRAPHIC LASER RANGING AND SCANNING Principles and Processing学习笔记
- iOS开发-URLSession使用-URLSession网络请求
- C++编程笔记
- 线性表之顺序表增强操作
- 线程的强制运行:join()方法
- 第六周书面项目(1):程序理解
- MyBatis官方教程及源码解析——mapper映射文件
- java核心基础文章精选