Coder Social home page Coder Social logo

cn-huangzhou / pano360 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from martin20150405/pano360

0.0 2.0 0.0 23.78 MB

Pure Java library to play 360 degree panorama video / photo (VR video) on Android. Using OpenGL ES 2.0 -安卓全景视频/图片播放器

License: MIT License

Java 97.78% GLSL 2.22%

pano360's Introduction

Pano360

Build Status

license

progress

Pure Java library to play 360 degree panorama video (VR video) on Android. Using OpenGL ES 2.0

Pano 360 是一个Android平台下纯Java的全景(360度/VR)视频播放库,使用OpenGL ES 2.0来进行视频渲染,没有使用第三方库

Demo App 在这里下~

###Read this in other languages: English

平台需求

  • OpenGL ES 2.0
  • Android 4.0.3 (API-15) 以上

##特性

  • 单、双屏切换
    • 支持单屏、双屏切换,通过配置rows和cols可以实现任意行任意列的分屏数目
  • 陀螺仪、触控(拖动、缩放)两种交互模式切换
  • 播放进度控制,控制栏自动隐藏
  • 类似GPUImage的滤镜组,支持多个滤镜叠加,滤镜顺序可在渲染到球体之前或之后
  • 支持原视频渲染(铺满屏幕/剪切/自适应)
  • 支持播放全景图片
  • 视频实时截图
  • 在线视频播放(你可能需要自行处理多种格式的解码问题)
  • 支持锁定任意坐标轴,用户从不同角度进入,看到的是同一个场景
    • LOCK_MODE_AXIS_Y: 和Cardboard Motion类似
  • 支持忽略任意坐标轴的旋转角度

##截图 ScreenShot

ScreenShot

ScreenShot

##适用对象

  • 如果你对于如何实现一个Android平台下的全景视频播放器感兴趣,或者急于使用一个带播放控制功能的全景视频播放器,或者有意在全景视频播放器中加入各种奇怪的功能,这个项目可能会对你有帮助。

##如何使用

  • 有两种方法可以使用该库,详情请参考Demo App

  • 使用带播放控制的Activity (由类库提供)

Intent intent=new Intent(MainActivity.this,PanoPlayerActivity.class);
intent.putExtra("videoPath",filePath);
startActivity(intent);
  • 提供一个GLSurfaceView,你可以在任意地方使用,但是需要自己处理播放控制和模式切换
<android.opengl.GLSurfaceView
    android:id="@+id/surface_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
GLSurfaceView glSurfaceView=(GLSurfaceView) findViewById(R.id.surface_view);
panoViewWrapper =new PanoViewWrapper(this,videoPath, glSurfaceView);
glSurfaceView.setOnTouchListener(new View.OnTouchListener() {
	@Override
	public boolean onTouch(View v, MotionEvent event) {
		return panoViewWrapper.handleTouchEvent(event);
	}
});

##未来特性(不要期望过高- -|||)

  • 加速度+电子罗盘支持(适合没有陀螺仪的手机)
  • 快速切换使用的解码器,例如IjkMediaPlayer
  • jcenter/maven
  • 小窗口/fragment播放
  • Handler+MessageQueue
  • 多种全景格式
  • 热点支持(Hotspot)、头控支持
  • Anti Distortion
  • RTSP RTMP (with VLC/Vitamio)
  • 完整播放控制功能
  • 视频录制/转码/倍速播放 (Mediacodec/ffmpeg)

##反馈交流

  • 开启一个issue
  • 我的博客留言
  • 发送邮件至[email protected]
  • 如果觉得这个项目对你有帮助,欢迎star,欢迎来一起改进这个项目

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.