基于 【EasyPlayerPro-Android】 播放器,增加 OpenGL 滤镜功能。
Based on 【EasyPlayerPro-Android】 player, add OpenGL filter function.
滤镜采用 OpenGL2.0
+ GLSurfaceView
实现,具体阅读 GLSurfaceRenderView
类源码。
调用 IjkVideoView
的接口就可以实现三个滤镜效果:
- 亮度
- 对比度
- 饱和度
The filter is implemented by OpenGL2.0
+ GLSurfaceView
, read the source code of GLSurfaceRenderView
class for details.
Three filter effects can be realized by calling the IjkVideoView
interface:
- Brightness
- Contrast
- Saturation
- Step 1. Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { mavenCentral() maven { url 'https://jitpack.io' } } }
- Step 2. Add the dependency
dependencies { implementation 'com.github.kevinvane:EasyPlayerPro-Android-OpenGL:14210703-1.4.21.0703' }
-
克隆 Clone
git clone https://github.com/kevinvane/EasyPlayerPro-Android-OpenGL
-
构建 Build
cd EasyPlayerPro-Android-OpenGL ./gradlew assembly
-
引入 implementation
dependencies { implementation project(':ijkplayer-java') }
IjkVideoView.setBrightness(value); //设置亮度,value范围 [-1.0, 1.0], 默认为 0.0,负数调暗,正数调亮
IjkVideoView.setContrast(value); //设置对比度,value范围 [0.0,2.0], 默认为 1.0
IjkVideoView.setSaturation(value); //设置饱和度,value范围[0.0, 2.0], 默认为 1.0
preview2.mp4
【EasyPlayerPro-14210703-1.4.21.0703.apk】
EasyPlayerPro是由EasyDarwin团队开发和维护的一款精炼、易用、高效、稳定的流媒体播放器,支持RTSP(RTP over TCP/UDP)、RTMP、HTTP、HLS、TCP、UDP等多种流媒体协议,支持各种各样编码格式的流媒体音视频直播流、点播流、文件播放!
An elegant, simple, fast android RTSP/RTMP/HLS/HTTP Player.EasyPlayer support RTSP(RTP over TCP/UDP),RTMP,HTTP,HLS,cover all kinds of streaming media!
http://app.tsingsee.com/EasyPlayerPro
EasyDarwin社区:https://www.easydarwin.org Copyright © EasyDarwin.org 2012~2024