Skip to content

Commit

Permalink
6.0.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
CarGuoSmall committed Aug 22, 2018
1 parent d1d86d7 commit e686ae6
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 35 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ implementation 'com.shuyu:GSYVideoPlayer:6.0.0-beta'
implementation 'com.shuyu:gsyVideoPlayer-java:6.0.0-beta'
//是否需要ExoPlayer模式
implementation 'com.shuyu:gsyVideoPlayer-exo2:6.0.0-beta'
implementation 'com.shuyu:GSYVideoPlayer-exo2:6.0.0-beta'
//根据你的需求ijk模式的so
implementation 'com.shuyu:gsyVideoPlayer-armv5:6.0.0-beta'
Expand All @@ -75,7 +75,7 @@ C 引入的so支持mpeg编码和其他补充协议,但是so包相对变大。
implementation 'com.shuyu:gsyVideoPlayer-java:6.0.0-beta'
//是否需要ExoPlayer模式
implementation 'com.shuyu:gsyVideoPlayer-exo2:6.0.0-beta'
implementation 'com.shuyu:GSYVideoPlayer-exo2:6.0.0-beta'
//更多ijk的编码支持
implementation 'com.shuyu:gsyVideoPlayer-ex_so:6.0.0-beta'
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ dependencies {
implementation androidDependencies.support_v4
implementation androidDependencies.design

implementation project(':gsyVideoPlayer')
//implementation project(':gsyVideoPlayer')

implementation dataDependencies.okhttpUtil
implementation dataDependencies.okhttp
Expand All @@ -89,7 +89,7 @@ dependencies {


//jcenter
//implementation "com.shuyu:GSYVideoPlayer:$gsyVideoVersion"
implementation "com.shuyu:GSYVideoPlayer:$gsyVideoVersion"

//implementation "com.shuyu:gsyVideoPlayer-java:$gsyVideoVersion'

Expand Down
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ext {

imageLoader = '4.0.0'

gsyVideoVersion = '5.0.2'
gsyVideoVersion = '6.0.0-beta'

exo_player2 = '2.8.4'

Expand Down
4 changes: 2 additions & 2 deletions doc/DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ implementation 'com.shuyu:GSYVideoPlayer:6.0.0-beta'
implementation 'com.shuyu:gsyVideoPlayer-java:6.0.0-beta'
//是否需要ExoPlayer模式
implementation 'com.shuyu:gsyVideoPlayer-exo2:6.0.0-beta'
implementation 'com.shuyu:GSYVideoPlayer-exo2:6.0.0-beta'
//根据你的需求ijk模式的so
implementation 'com.shuyu:gsyVideoPlayer-armv5:6.0.0-beta'
Expand All @@ -37,7 +37,7 @@ C 引入的so支持mpeg编码和其他补充协议,但是so包相对变大。
implementation 'com.shuyu:gsyVideoPlayer-java:6.0.0-beta'
//是否需要ExoPlayer模式
implementation 'com.shuyu:gsyVideoPlayer-exo2:6.0.0-beta'
implementation 'com.shuyu:GSYVideoPlayer-exo2:6.0.0-beta'
//更多ijk的编码支持
implementation 'com.shuyu:gsyVideoPlayer-ex_so:6.0.0-beta'
Expand Down
4 changes: 4 additions & 0 deletions doc/FURTURE.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@

1、精简库依赖,提供按需依赖载入

2、拆分缓存框架

3、拆分绘制surface框架,增加SurfaceFactory
36 changes: 30 additions & 6 deletions doc/USE.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,16 +460,40 @@ public void onConfigurationChanged(Configuration newConfig) {
(以下设置全局生效哦)

#### 切换内核
```
//PlayerFactory.setPlayManager(new Exo2PlayerManager());//EXO模式
//PlayerFactory.setPlayManager(new SystemPlayerManager());//系统模式
//PlayerFactory.setPlayManager(new IjkPlayerManager());//ijk模式
```
//默认ijk播放内核
GSYVideoManager.instance().setVideoType(this, GSYVideoType.IJKPLAYER);
//EXO 2 播放内核
GSYVideoManager.instance().setVideoType(this, GSYVideoType.IJKEXOPLAYER2);
//系统播放器
GSYVideoManager.instance().setVideoType(this, GSYVideoType.SYSTEMPLAYER);

#### 调整代码结构,CacheFactory 更方便自定义,默认 ProxyCacheManager。

```
//CacheFactory.setCacheManager(new ExoPlayerCacheManager());//exo缓存模式,支持m3u8,只支持exo
//CacheFactory.setCacheManager(new ProxyCacheManager());//代理缓存模式,支持所有模式,不支持m3u8等
```

#### 增加 ExoMediaSourceInterceptListener,方便 Exo 模式下使用自定义的 MediaSource。

```
ExoSourceManager.setExoMediaSourceInterceptListener(new ExoMediaSourceInterceptListener() {
/**
* @param dataSource 链接
* @param preview 是否带上header,默认有header自动设置为true
* @param cacheEnable 是否需要缓存
* @param isLooping 是否循环
* @param cacheDir 自定义缓存目录
* @return 返回不为空时,使用返回的自定义mediaSource
*/
@Override
public MediaSource getMediaSource(String dataSource, boolean preview, boolean cacheEnable, boolean isLooping, File cacheDir) {
return null;
}
});
```



#### 切换比例

```
Expand Down
10 changes: 3 additions & 7 deletions gsyVideoPlayer-exo_player2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,16 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
def viewDependencies = rootProject.ext.viewDependencies
api viewDependencies.ijkplayer_java

api viewDependencies.exo_player2
api viewDependencies.exo_player2_rtmp

//api "com.shuyu:GSYVideoPlayer-base:$gsyVideoVersion"
api project(':gsyVideoPlayer-base')
//api project(':gsyVideoPlayer-base')
api "com.shuyu:gsyVideoPlayer-base:$gsyVideoVersion"

//compile fileTree(dir: 'libs', include: ['*.jar'])
//def viewDependencies = rootProject.ext.viewDependencies
//compile viewDependencies.ijkplayer_java
//compile viewDependencies.exo_player2
//compile viewDependencies.exo_player2_rtmp
//compile "com.shuyu:GSYVideoPlayer-base:$gsyVideoVersion"
//compile "com.shuyu:gsyVideoPlayer-base:6.0.0-beta"

}

Expand Down
10 changes: 5 additions & 5 deletions gsyVideoPlayer-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ dependencies {
api viewDependencies.ijkplayer_java
api viewDependencies.ijkplayer_exo
api viewDependencies.transitionseverywhere
//api dataDependencies.videocache
//api "com.shuyu:GSYVideoPlayer-base:$gsyVideoVersion"
api project(':gsyVideoPlayer-proxy_cache')
api project(':gsyVideoPlayer-base')
//api project(':gsyVideoPlayer-proxy_cache')
//api project(':gsyVideoPlayer-base')
api "com.shuyu:gsyVideoPlayer-base:$gsyVideoVersion"
api "com.shuyu:gsyvideoplayer-androidvideocache:$gsyVideoVersion"


// compile fileTree(dir: 'libs', include: ['*.jar'])
Expand All @@ -48,7 +48,7 @@ dependencies {
// compile viewDependencies.ijkplayer_java
// compile viewDependencies.transitionseverywhere
// compile "com.shuyu:gsyvideoplayer-androidvideocache:$gsyVideoVersion"
// compile "com.shuyu:GSYVideoPlayer-base:$gsyVideoVersion"
// compile "com.shuyu:gsyVideoPlayer-base:$gsyVideoVersion"

}

Expand Down
21 changes: 11 additions & 10 deletions gsyVideoPlayer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

api project(':gsyVideoPlayer-java')
api project(':gsyVideoPlayer-exo_player2')
//api project(':gsyVideoPlayer-java')
//api project(':gsyVideoPlayer-exo_player2')
//api project(':gsyVideoPlayer-armv5')
//api project(':gsyVideoPlayer-armv7a')
//api project(':gsyVideoPlayer-armv64')
Expand All @@ -44,20 +44,21 @@ dependencies {

//api "com.shuyu:GSYVideoPlayer:$gsyVideoVersion"

//api "com.shuyu:gsyVideoPlayer-java:$gsyVideoVersion"
//api "com.shuyu:gsyVideoPlayer-armv5:$gsyVideoVersion"
//api "com.shuyu:gsyVideoPlayer-armv7a:$gsyVideoVersion"
//api "com.shuyu:gsyVideoPlayer-arm64:$gsyVideoVersion"
//api "com.shuyu:gsyVideoPlayer-x64:$gsyVideoVersion"
//api "com.shuyu:gsyVideoPlayer-x86:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-java:$gsyVideoVersion"
api "com.shuyu:GSYVideoPlayer-exo2:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-armv5:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-armv7a:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-arm64:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-x64:$gsyVideoVersion"
api "com.shuyu:gsyVideoPlayer-x86:$gsyVideoVersion"

//更多配置版so,增加了concat,rtsp,mpeg,crypto
api "com.shuyu:gsyVideoPlayer-ex_so:$gsyVideoVersion"
//api "com.shuyu:gsyVideoPlayer-ex_so:$gsyVideoVersion"


//compile fileTree(dir: 'libs', include: ['*.jar'])
//compile "com.shuyu:gsyVideoPlayer-java:$gsyVideoVersion"
//compile "com.shuyu:gsyVideoPlayer-exo2:$gsyVideoVersion"
//compile "com.shuyu:GSYVideoPlayer-exo2:$gsyVideoVersion"
//compile "com.shuyu:gsyVideoPlayer-armv5:$gsyVideoVersion"
//compile "com.shuyu:gsyVideoPlayer-armv7a:$gsyVideoVersion"
//compile "com.shuyu:gsyVideoPlayer-arm64:$gsyVideoVersion"
Expand Down

0 comments on commit e686ae6

Please sign in to comment.