Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ac13
GSYVideoPlayer
提交
d285bbf1
G
GSYVideoPlayer
项目概览
ac13
/
GSYVideoPlayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
GSYVideoPlayer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d285bbf1
编写于
8月 21, 2018
作者:
G
guoshuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整框架,剔除exoplayer到外部依赖
上级
4516fb6a
变更
38
隐藏空白更改
内联
并排
Showing
38 changed file
with
262 addition
and
473 deletion
+262
-473
app/build.gradle
app/build.gradle
+1
-0
app/src/main/java/com/example/gsyvideoplayer/GSYApplication.java
.../main/java/com/example/gsyvideoplayer/GSYApplication.java
+14
-4
app/src/main/java/com/example/gsyvideoplayer/exo/GSYExoVideoManager.java
...va/com/example/gsyvideoplayer/exo/GSYExoVideoManager.java
+1
-1
app/src/main/java/com/example/gsyvideoplayer/simple/SimpleDetailActivityMode1.java
...mple/gsyvideoplayer/simple/SimpleDetailActivityMode1.java
+2
-2
gradle.properties
gradle.properties
+1
-1
gsyVideoPlayer-armv5/gradle.properties
gsyVideoPlayer-armv5/gradle.properties
+1
-1
gsyVideoPlayer-armv64/gradle.properties
gsyVideoPlayer-armv64/gradle.properties
+1
-1
gsyVideoPlayer-armv7a/gradle.properties
gsyVideoPlayer-armv7a/gradle.properties
+1
-1
gsyVideoPlayer-base/.gitignore
gsyVideoPlayer-base/.gitignore
+1
-0
gsyVideoPlayer-base/bintray.gradle
gsyVideoPlayer-base/bintray.gradle
+104
-0
gsyVideoPlayer-base/build.gradle
gsyVideoPlayer-base/build.gradle
+42
-0
gsyVideoPlayer-base/gradle.properties
gsyVideoPlayer-base/gradle.properties
+20
-0
gsyVideoPlayer-base/proguard-rules.pro
gsyVideoPlayer-base/proguard-rules.pro
+21
-0
gsyVideoPlayer-base/src/main/AndroidManifest.xml
gsyVideoPlayer-base/src/main/AndroidManifest.xml
+2
-0
gsyVideoPlayer-base/src/main/java/com/shuyu/gsyvideoplayer/cache/ICacheManager.java
...in/java/com/shuyu/gsyvideoplayer/cache/ICacheManager.java
+0
-0
gsyVideoPlayer-base/src/main/java/com/shuyu/gsyvideoplayer/model/GSYModel.java
...rc/main/java/com/shuyu/gsyvideoplayer/model/GSYModel.java
+0
-0
gsyVideoPlayer-base/src/main/java/com/shuyu/gsyvideoplayer/model/VideoOptionModel.java
...java/com/shuyu/gsyvideoplayer/model/VideoOptionModel.java
+0
-0
gsyVideoPlayer-base/src/main/java/com/shuyu/gsyvideoplayer/player/IPlayerManager.java
.../java/com/shuyu/gsyvideoplayer/player/IPlayerManager.java
+1
-1
gsyVideoPlayer-ex_so/gradle.properties
gsyVideoPlayer-ex_so/gradle.properties
+1
-1
gsyVideoPlayer-java/build.gradle
gsyVideoPlayer-java/build.gradle
+4
-5
gsyVideoPlayer-java/gradle.properties
gsyVideoPlayer-java/gradle.properties
+1
-1
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYPreViewManager.java
...main/java/com/shuyu/gsyvideoplayer/GSYPreViewManager.java
+0
-163
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoBaseManager.java
...in/java/com/shuyu/gsyvideoplayer/GSYVideoBaseManager.java
+8
-28
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
...c/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
+0
-1
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/cache/CacheFactory.java
...ain/java/com/shuyu/gsyvideoplayer/cache/CacheFactory.java
+8
-41
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/player/PlayerFactory.java
...n/java/com/shuyu/gsyvideoplayer/player/PlayerFactory.java
+10
-11
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/utils/GSYVideoType.java
...ain/java/com/shuyu/gsyvideoplayer/utils/GSYVideoType.java
+0
-15
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/CustomGSYVideoPlayer.java
.../com/shuyu/gsyvideoplayer/video/CustomGSYVideoPlayer.java
+0
-183
gsyVideoPlayer-x86/gradle.properties
gsyVideoPlayer-x86/gradle.properties
+1
-1
gsyVideoPlayer-x86_64/gradle.properties
gsyVideoPlayer-x86_64/gradle.properties
+1
-1
gsyVideoPlayer/build.gradle
gsyVideoPlayer/build.gradle
+2
-0
gsyVideoPlayer/gradle.properties
gsyVideoPlayer/gradle.properties
+1
-1
gsyvideoplayer-androidvideocache/gradle.properties
gsyvideoplayer-androidvideocache/gradle.properties
+1
-1
gsyvideoplayer-exo2/build.gradle
gsyvideoplayer-exo2/build.gradle
+4
-1
gsyvideoplayer-exo2/gradle.properties
gsyvideoplayer-exo2/gradle.properties
+1
-1
gsyvideoplayer-exo2/src/main/java/tv/danmaku/ijk/media/exo2/Exo2PlayerManager.java
...ain/java/tv/danmaku/ijk/media/exo2/Exo2PlayerManager.java
+2
-2
gsyvideoplayer-exo2/src/main/java/tv/danmaku/ijk/media/exo2/ExoPlayerCacheManager.java
...java/tv/danmaku/ijk/media/exo2/ExoPlayerCacheManager.java
+3
-3
settings.gradle
settings.gradle
+1
-1
未找到文件。
app/build.gradle
浏览文件 @
d285bbf1
...
...
@@ -88,6 +88,7 @@ dependencies {
}
annotationProcessor
dataDependencies
.
permissionsdispatcherProcessor
//jcenter
//implementation "com.shuyu:GSYVideoPlayer:$gsyVideoVersion"
...
...
app/src/main/java/com/example/gsyvideoplayer/GSYApplication.java
浏览文件 @
d285bbf1
...
...
@@ -4,8 +4,16 @@ import android.app.Application;
import
android.support.multidex.MultiDexApplication
;
import
com.shuyu.gsyvideoplayer.GSYVideoManager
;
import
com.shuyu.gsyvideoplayer.cache.CacheFactory
;
import
com.shuyu.gsyvideoplayer.cache.ProxyCacheManager
;
import
com.shuyu.gsyvideoplayer.player.IjkPlayerManager
;
import
com.shuyu.gsyvideoplayer.player.PlayerFactory
;
import
com.shuyu.gsyvideoplayer.player.SystemPlayerManager
;
import
com.shuyu.gsyvideoplayer.utils.GSYVideoType
;
import
tv.danmaku.ijk.media.exo2.Exo2PlayerManager
;
import
tv.danmaku.ijk.media.exo2.ExoPlayerCacheManager
;
//import com.squareup.leakcanary.LeakCanary;
/**
...
...
@@ -24,13 +32,15 @@ public class GSYApplication extends MultiDexApplication {
//}
//LeakCanary.install(this);
//GSYVideoType.enableMediaCodec();
//GSYVideoType.enableMediaCodecTexture();
//GSYVideoManager.instance().setVideoType(this, GSYVideoType.IJKEXOPLAYER); //EXO 1 播放内核,弃用
//GSYVideoManager.instance().setVideoType(this, GSYVideoType.IJKEXOPLAYER2); //EXO 2 播放内核
//GSYVideoManager.instance().setVideoType(this, GSYVideoType.SYSTEMPLAYER); //系统播放器
PlayerFactory
.
setPlayManager
(
new
Exo2PlayerManager
());
//EXO模式
//PlayerFactory.setPlayManager(new SystemPlayerManager());//系统模式
//PlayerFactory.setPlayManager(new IjkPlayerManager());//ijk模式
CacheFactory
.
setCacheManager
(
new
ExoPlayerCacheManager
());
//exo缓存模式,支持m3u8,只支持exo
//CacheFactory.setCacheManager(new ProxyCacheManager());//代理缓存模式,支持所有模式,不支持m3u8等
//GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL);
//GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL);
...
...
app/src/main/java/com/example/gsyvideoplayer/exo/GSYExoVideoManager.java
浏览文件 @
d285bbf1
...
...
@@ -49,7 +49,7 @@ public class GSYExoVideoManager extends GSYVideoBaseManager {
}
@Override
protected
IPlayerManager
getPlayManager
(
int
videoType
)
{
protected
IPlayerManager
getPlayManager
()
{
return
new
GSYExoPlayerManager
();
}
...
...
app/src/main/java/com/example/gsyvideoplayer/simple/SimpleDetailActivityMode1.java
浏览文件 @
d285bbf1
...
...
@@ -17,7 +17,7 @@ public class SimpleDetailActivityMode1 extends GSYBaseActivityDetail<StandardGSY
StandardGSYVideoPlayer
detailPlayer
;
private
String
url
=
"http://
9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4
"
;
private
String
url
=
"http://
7xp06y.com1.z0.glb.clouddn.com/b10/%E4%B8%80%E6%97%A0%E6%89%80%E6%9C%89%E6%9C%89%E6%A2%A6%E8%80%8C%E5%B7%B2%20solo%20cut.mp3
"
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -42,7 +42,7 @@ public class SimpleDetailActivityMode1 extends GSYBaseActivityDetail<StandardGSY
public
GSYVideoOptionBuilder
getGSYVideoOptionBuilder
()
{
//内置封面可参考SampleCoverVideo
ImageView
imageView
=
new
ImageView
(
this
);
loadCover
(
imageView
,
url
);
//
loadCover(imageView, url);
return
new
GSYVideoOptionBuilder
()
.
setThumbImageView
(
imageView
)
.
setUrl
(
url
)
...
...
gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx
1536
m
org.gradle.jvmargs
=
-Xmx
2048
m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyVideoPlayer-armv5/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536m
#
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyVideoPlayer-armv64/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536m
#
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyVideoPlayer-armv7a/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536
m
#org.gradle.jvmargs=-Xmx1024
m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyVideoPlayer-base/.gitignore
0 → 100644
浏览文件 @
d285bbf1
/build
gsyVideoPlayer-base/bintray.gradle
0 → 100644
浏览文件 @
d285bbf1
group
=
PROJ_GROUP
version
=
PROJ_VERSION
project
.
archivesBaseName
=
PROJ_ARTIFACTID
apply
plugin:
'com.jfrog.bintray'
apply
plugin:
'com.github.dcendents.android-maven'
task
sourcesJar
(
type:
Jar
)
{
from
android
.
sourceSets
.
main
.
java
.
srcDirs
classifier
=
'sources'
}
task
javadoc
(
type:
Javadoc
)
{
source
=
android
.
sourceSets
.
main
.
java
.
srcDirs
classpath
+=
configurations
.
compile
classpath
+=
project
.
files
(
android
.
getBootClasspath
().
join
(
File
.
pathSeparator
))
}
task
javadocJar
(
type:
Jar
,
dependsOn:
javadoc
)
{
classifier
=
'javadoc'
from
javadoc
.
destinationDir
}
javadoc
{
options
{
encoding
"UTF-8"
charSet
'UTF-8'
author
true
version
true
links
"http://docs.oracle.com/javase/7/docs/api"
title
"$PROJ_NAME $PROJ_VERSION"
}
}
artifacts
{
archives
sourcesJar
archives
javadocJar
}
install
{
repositories
.
mavenInstaller
{
pom
.
project
{
name
PROJ_NAME
description
PROJ_DESCRIPTION
url
PROJ_WEBSITEURL
inceptionYear
'2016'
packaging
'aar'
groupId
PROJ_GROUP
artifactId
PROJ_ARTIFACTID
version
PROJ_VERSION
licenses
{
license
{
name
'The Apache Software License, Version 2.0'
url
'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution
'repo'
}
}
scm
{
connection
PROJ_VCSURL
url
PROJ_WEBSITEURL
}
developers
{
developer
{
id
DEVELOPER_ID
name
DEVELOPER_NAME
email
DEVELOPER_EMAIL
}
}
}
}
}
bintray
{
user
=
project
.
hasProperty
(
'bintrayUser'
)
?
project
.
property
(
'bintrayUser'
)
:
project
.
property
(
'BINTRAY_USER'
)
key
=
project
.
hasProperty
(
'bintrayKey'
)
?
project
.
property
(
'bintrayKey'
)
:
project
.
property
(
'BINTRAY_KEY'
)
configurations
=
[
'archives'
]
dryRun
=
false
publish
=
true
pkg
{
//userOrg = PROJ_USER_ORG //这个是你创建时的organization,必须要有,不然没办法找到指定路径
repo
=
PROJ_USER_MAVEN
name
=
PROJ_NAME
licenses
=
[
'Apache-2.0'
]
vcsUrl
=
PROJ_VCSURL
websiteUrl
=
PROJ_WEBSITEURL
issueTrackerUrl
=
PROJ_ISSUETRACKERURL
publicDownloadNumbers
=
true
version
{
name
=
PROJ_VERSION
desc
=
PROJ_DESCRIPTION
vcsTag
=
PROJ_VERSION
gpg
{
sign
=
true
}
}
}
}
gsyVideoPlayer-base/build.gradle
0 → 100644
浏览文件 @
d285bbf1
apply
plugin:
'com.android.library'
android
{
def
globalConfiguration
=
rootProject
.
extensions
.
getByName
(
"ext"
)
compileSdkVersion
globalConfiguration
.
androidCompileSdkVersion
buildToolsVersion
globalConfiguration
.
androidBuildToolsVersion
defaultConfig
{
minSdkVersion
globalConfiguration
.
androidMinSdkVersion
targetSdkVersion
globalConfiguration
.
androidTargetSdkVersion
versionCode
1
versionName
"1.0"
}
buildTypes
{
release
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android.txt'
),
'proguard-rules.pro'
}
}
sourceSets
{
main
{
jniLibs
.
srcDirs
=
[
'libs'
]
}
}
}
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
def
viewDependencies
=
rootProject
.
ext
.
viewDependencies
api
viewDependencies
.
ijkplayer_java
//compile fileTree(dir: 'libs', include: ['*.jar'])
//def viewDependencies = rootProject.ext.viewDependencies
//compile viewDependencies.ijkplayer_java
}
apply
from:
'./bintray.gradle'
gsyVideoPlayer-base/gradle.properties
0 → 100644
浏览文件 @
d285bbf1
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
#org.gradle.jvmargs=-Xmx1024m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
PROJ_NAME
=
GSYVideoPlayer-base
PROJ_ARTIFACTID
=
GSYVideoPlayer-base
gsyVideoPlayer-base/proguard-rules.pro
0 → 100644
浏览文件 @
d285bbf1
# Add project specific ProGuard rules here.
#
You
can
control
the
set
of
applied
configuration
files
using
the
#
proguardFiles
setting
in
build
.
gradle
.
#
#
For
more
details
,
see
#
http
://
developer
.
android
.
com
/
guide
/
developing
/
tools
/
proguard
.
html
#
If
your
project
uses
WebView
with
JS
,
uncomment
the
following
#
and
specify
the
fully
qualified
class
name
to
the
JavaScript
interface
#
class
:
#-
keepclassmembers
class
fqcn
.
of
.
javascript
.
interface
.
for
.
webview
{
#
public
*
;
#
}
#
Uncomment
this
to
preserve
the
line
number
information
for
#
debugging
stack
traces
.
#-
keepattributes
SourceFile
,
LineNumberTable
#
If
you
keep
the
line
number
information
,
uncomment
this
to
#
hide
the
original
source
file
name
.
#-
renamesourcefileattribute
SourceFile
gsyVideoPlayer-base/src/main/AndroidManifest.xml
0 → 100644
浏览文件 @
d285bbf1
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.shuyu.gsy.base"
/>
gsyVideoPlayer-
java
/src/main/java/com/shuyu/gsyvideoplayer/cache/ICacheManager.java
→
gsyVideoPlayer-
base
/src/main/java/com/shuyu/gsyvideoplayer/cache/ICacheManager.java
浏览文件 @
d285bbf1
文件已移动
gsyVideoPlayer-
java
/src/main/java/com/shuyu/gsyvideoplayer/model/GSYModel.java
→
gsyVideoPlayer-
base
/src/main/java/com/shuyu/gsyvideoplayer/model/GSYModel.java
浏览文件 @
d285bbf1
文件已移动
gsyVideoPlayer-
java
/src/main/java/com/shuyu/gsyvideoplayer/model/VideoOptionModel.java
→
gsyVideoPlayer-
base
/src/main/java/com/shuyu/gsyvideoplayer/model/VideoOptionModel.java
浏览文件 @
d285bbf1
文件已移动
gsyVideoPlayer-
java
/src/main/java/com/shuyu/gsyvideoplayer/player/IPlayerManager.java
→
gsyVideoPlayer-
base
/src/main/java/com/shuyu/gsyvideoplayer/player/IPlayerManager.java
浏览文件 @
d285bbf1
...
...
@@ -3,8 +3,8 @@ package com.shuyu.gsyvideoplayer.player;
import
android.content.Context
;
import
android.os.Message
;
import
com.shuyu.gsyvideoplayer.cache.ICacheManager
;
import
com.shuyu.gsyvideoplayer.model.VideoOptionModel
;
import
com.shuyu.gsyvideoplayer.cache.ICacheManager
;
import
java.util.List
;
...
...
gsyVideoPlayer-ex_so/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536
m
#org.gradle.jvmargs=-Xmx1024
m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyVideoPlayer-java/build.gradle
浏览文件 @
d285bbf1
...
...
@@ -33,24 +33,23 @@ dependencies {
implementation
androidDependencies
.
appcompat_v7
def
viewDependencies
=
rootProject
.
ext
.
viewDependencies
def
dataDependencies
=
rootProject
.
ext
.
dataDependencies
api
viewDependencies
.
ijkplayer_java
api
viewDependencies
.
ijkplayer_exo
api
viewDependencies
.
transitionseverywhere
//api dataDependencies.videocache
//api "com.shuyu:GSYVideoPlayer-
exo2
:$gsyVideoVersion"
//api "com.shuyu:GSYVideoPlayer-
base
:$gsyVideoVersion"
api
project
(
':gsyvideoplayer-androidvideocache'
)
api
project
(
':gsy
videoplayer-exo2
'
)
api
project
(
':gsy
VideoPlayer-base
'
)
// compile fileTree(dir: 'libs', include: ['*.jar'])
// compile androidDependencies.appcompat_v7
// def viewDependencies = rootProject.ext.viewDependencies
// def dataDependencies = rootProject.ext.dataDependencies
// compile viewDependencies.ijkplayer_java
// compile viewDependencies.transitionseverywhere
// compile "com.shuyu:gsyvideoplayer-androidvideocache:$gsyVideoVersion"
// compile "com.shuyu:GSYVideoPlayer-exo2:$gsyVideoVersion"
// compile "com.shuyu:GSYVideoPlayer-base:$gsyVideoVersion"
}
apply
from:
'./bintray.gradle'
gsyVideoPlayer-java/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536
m
#org.gradle.jvmargs=-Xmx1024
m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYPreViewManager.java
已删除
100644 → 0
浏览文件 @
4516fb6a
package
com.shuyu.gsyvideoplayer
;
import
android.media.AudioManager
;
import
android.os.Handler
;
import
android.os.HandlerThread
;
import
android.os.Looper
;
import
android.os.Message
;
import
android.text.TextUtils
;
import
android.view.Surface
;
import
com.shuyu.gsyvideoplayer.model.GSYModel
;
import
java.io.IOException
;
import
java.util.Map
;
import
tv.danmaku.ijk.media.player.IMediaPlayer
;
import
tv.danmaku.ijk.media.player.IjkMediaPlayer
;
/**
* 小窗口预览管理
* Created by shuyu on 2016/12/11.
*/
@Deprecated
public
class
GSYPreViewManager
implements
IMediaPlayer
.
OnPreparedListener
,
IjkMediaPlayer
.
OnSeekCompleteListener
{
public
static
String
TAG
=
"GSYPreViewManager"
;
private
static
GSYPreViewManager
videoManager
;
private
static
final
int
HANDLER_PREPARE
=
0
;
private
static
final
int
HANDLER_SETDISPLAY
=
1
;
private
static
final
int
HANDLER_RELEASE
=
2
;
private
IjkMediaPlayer
mediaPlayer
;
private
HandlerThread
mMediaHandlerThread
;
private
MediaHandler
mMediaHandler
;
private
boolean
seekToComplete
=
true
;
public
static
synchronized
GSYPreViewManager
instance
()
{
if
(
videoManager
==
null
)
{
videoManager
=
new
GSYPreViewManager
();
}
return
videoManager
;
}
private
GSYPreViewManager
()
{
mediaPlayer
=
new
IjkMediaPlayer
();
mMediaHandlerThread
=
new
HandlerThread
(
TAG
);
mMediaHandlerThread
.
start
();
mMediaHandler
=
new
MediaHandler
((
mMediaHandlerThread
.
getLooper
()));
}
private
class
MediaHandler
extends
Handler
{
MediaHandler
(
Looper
looper
)
{
super
(
looper
);
}
@Override
public
void
handleMessage
(
Message
msg
)
{
super
.
handleMessage
(
msg
);
switch
(
msg
.
what
)
{
case
HANDLER_PREPARE:
initVideo
(
msg
);
break
;
case
HANDLER_SETDISPLAY:
showDisplay
(
msg
);
break
;
case
HANDLER_RELEASE:
if
(
mediaPlayer
!=
null
)
{
mediaPlayer
.
release
();
}
break
;
}
}
}
private
void
initVideo
(
Message
msg
)
{
try
{
mediaPlayer
.
release
();
initIJKPlayer
(
msg
);
mediaPlayer
.
setOnPreparedListener
(
GSYPreViewManager
.
this
);
mediaPlayer
.
setOnSeekCompleteListener
(
this
);
mediaPlayer
.
setVolume
(
0
,
0
);
mediaPlayer
.
prepareAsync
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
private
void
initIJKPlayer
(
Message
msg
)
{
mediaPlayer
=
new
IjkMediaPlayer
();
mediaPlayer
.
setAudioStreamType
(
AudioManager
.
STREAM_MUSIC
);
try
{
mediaPlayer
.
setDataSource
(((
GSYModel
)
msg
.
obj
).
getUrl
(),
((
GSYModel
)
msg
.
obj
).
getMapHeadData
());
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
private
void
showDisplay
(
Message
msg
)
{
if
(
msg
.
obj
==
null
&&
mediaPlayer
!=
null
)
{
mediaPlayer
.
setSurface
(
null
);
}
else
{
Surface
holder
=
(
Surface
)
msg
.
obj
;
if
(
mediaPlayer
!=
null
&&
holder
.
isValid
())
{
mediaPlayer
.
setSurface
(
holder
);
}
}
}
@Override
public
void
onPrepared
(
IMediaPlayer
mp
)
{
mp
.
pause
();
seekToComplete
=
true
;
}
@Override
public
void
onSeekComplete
(
IMediaPlayer
mp
)
{
seekToComplete
=
true
;
}
public
void
prepare
(
final
String
url
,
final
Map
<
String
,
String
>
mapHeadData
,
boolean
loop
,
float
speed
)
{
if
(
TextUtils
.
isEmpty
(
url
))
return
;
Message
msg
=
new
Message
();
msg
.
what
=
HANDLER_PREPARE
;
GSYModel
fb
=
new
GSYModel
(
url
,
mapHeadData
,
loop
,
speed
,
false
,
null
);
msg
.
obj
=
fb
;
mMediaHandler
.
sendMessage
(
msg
);
}
public
void
releaseMediaPlayer
()
{
Message
msg
=
new
Message
();
msg
.
what
=
HANDLER_RELEASE
;
mMediaHandler
.
sendMessage
(
msg
);
}
public
void
setDisplay
(
Surface
holder
)
{
Message
msg
=
new
Message
();
msg
.
what
=
HANDLER_SETDISPLAY
;
msg
.
obj
=
holder
;
mMediaHandler
.
sendMessage
(
msg
);
}
public
IjkMediaPlayer
getMediaPlayer
()
{
return
mediaPlayer
;
}
public
boolean
isSeekToComplete
()
{
return
seekToComplete
;
}
public
void
setSeekToComplete
(
boolean
seekToComplete
)
{
this
.
seekToComplete
=
seekToComplete
;
}
}
\ No newline at end of file
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoBaseManager.java
浏览文件 @
d285bbf1
...
...
@@ -111,11 +111,6 @@ public abstract class GSYVideoBaseManager implements IMediaPlayer.OnPreparedList
*/
protected
int
timeOut
=
8
*
1000
;
/**
* 播放类型,默认IJK
*/
protected
int
videoType
=
GSYVideoType
.
IJKPLAYER
;
/**
* 是否需要静音
*/
...
...
@@ -143,7 +138,7 @@ public abstract class GSYVideoBaseManager implements IMediaPlayer.OnPreparedList
if
(
cacheManager
!=
null
)
{
cacheManager
.
clearCache
(
context
,
cacheDir
,
url
);
}
else
{
getCacheManager
(
videoType
).
clearCache
(
context
,
cacheDir
,
url
);
getCacheManager
().
clearCache
(
context
,
cacheDir
,
url
);
}
}
...
...
@@ -154,12 +149,12 @@ public abstract class GSYVideoBaseManager implements IMediaPlayer.OnPreparedList
mainThreadHandler
=
new
Handler
();
}
protected
IPlayerManager
getPlayManager
(
int
videoType
)
{
return
PlayerFactory
.
getPlayManager
(
videoType
);
protected
IPlayerManager
getPlayManager
()
{
return
PlayerFactory
.
getPlayManager
();
}
protected
ICacheManager
getCacheManager
(
int
videoType
)
{
return
CacheFactory
.
getCacheManager
(
videoType
);
protected
ICacheManager
getCacheManager
()
{
return
CacheFactory
.
getCacheManager
();
}
@Override
...
...
@@ -408,7 +403,7 @@ public abstract class GSYVideoBaseManager implements IMediaPlayer.OnPreparedList
*/
@Override
public
boolean
cachePreview
(
Context
context
,
File
cacheDir
,
String
url
)
{
return
getCacheManager
(
videoType
).
cachePreview
(
context
,
cacheDir
,
url
);
return
getCacheManager
().
cachePreview
(
context
,
cacheDir
,
url
);
}
@Override
...
...
@@ -589,8 +584,8 @@ public abstract class GSYVideoBaseManager implements IMediaPlayer.OnPreparedList
if
(
playerManager
!=
null
)
{
playerManager
.
release
();
}
playerManager
=
getPlayManager
(
videoType
);
cacheManager
=
getCacheManager
(
videoType
);
playerManager
=
getPlayManager
();
cacheManager
=
getCacheManager
();
if
(
cacheManager
!=
null
)
{
cacheManager
.
setCacheAvailableListener
(
this
);
}
...
...
@@ -662,21 +657,6 @@ public abstract class GSYVideoBaseManager implements IMediaPlayer.OnPreparedList
}
}
public
int
getVideoType
()
{
return
videoType
;
}
/**
* 设置了视频的播放类型
* IJKPLAYER = 0; 默认IJK
* IJKEXOPLAYER2 = 2;EXOPlayer2
* SYSTEMPLAYER = 4;系统播放器
*/
public
void
setVideoType
(
Context
context
,
int
videoType
)
{
this
.
context
=
context
.
getApplicationContext
();
this
.
videoType
=
videoType
;
}
public
void
initContext
(
Context
context
)
{
this
.
context
=
context
.
getApplicationContext
();
}
...
...
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/GSYVideoManager.java
浏览文件 @
d285bbf1
...
...
@@ -60,7 +60,6 @@ public class GSYVideoManager extends GSYVideoBaseManager {
gsyVideoManager
.
lastState
=
videoManager
.
lastState
;
gsyVideoManager
.
playPosition
=
videoManager
.
playPosition
;
gsyVideoManager
.
timeOut
=
videoManager
.
timeOut
;
gsyVideoManager
.
videoType
=
videoManager
.
videoType
;
gsyVideoManager
.
needMute
=
videoManager
.
needMute
;
gsyVideoManager
.
needTimeOutOther
=
videoManager
.
needTimeOutOther
;
gsyVideoManager
.
setListener
(
listener
);
...
...
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/cache/CacheFactory.java
浏览文件 @
d285bbf1
package
com.shuyu.gsyvideoplayer.cache
;
import
com.shuyu.gsyvideoplayer.utils.GSYVideoType
;
/**
* 缓存到本地服务工厂
* Created by guoshuyu on 2018/5/21.
*/
public
class
CacheFactory
{
/**
* 不使用cache服务
*/
public
final
static
int
CACHE_NULL
=
-
1
;
/**
* 默认缓存服务,EXO使用Source缓存,其他使用proxy缓存
*/
public
final
static
int
EXO_DEFAULT
=
0
;
/**
* ExoPlayer使用Proxy服务缓存,只对EXO播放内核生效
*/
public
final
static
int
EXO_CACHE_PROXY
=
1
;
private
static
int
sCacheMode
=
EXO_DEFAULT
;
private
static
ICacheManager
sICacheManager
;
public
static
ICacheManager
getCacheManager
(
int
videoType
)
{
if
(
sCacheMode
==
CACHE_NULL
)
{
return
null
;
}
switch
(
videoType
)
{
case
GSYVideoType
.
IJKEXOPLAYER2
:
if
(
sCacheMode
==
EXO_DEFAULT
)
{
//针对exoPlayer的source cache处理
return
new
ExoPlayerCacheManager
();
}
case
GSYVideoType
.
SYSTEMPLAYER
:
case
GSYVideoType
.
IJKPLAYER
:
default
:
return
new
ProxyCacheManager
();
}
public
static
void
setCacheManager
(
ICacheManager
cacheManager
)
{
sICacheManager
=
cacheManager
;
}
/**
* 设置缓存模式, 默认EXO使用Source缓存,其他使用proxy缓存
*
* @param mode CACHE_NULL、EXO_CACHE_PROXY、EXO_DEFAULT
*/
public
static
void
setCacheMode
(
int
mode
)
{
sCacheMode
=
mode
;
public
static
ICacheManager
getCacheManager
()
{
if
(
sICacheManager
==
null
)
{
sICacheManager
=
new
ProxyCacheManager
();
}
return
sICacheManager
;
}
}
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/player/PlayerFactory.java
浏览文件 @
d285bbf1
package
com.shuyu.gsyvideoplayer.player
;
import
com.shuyu.gsyvideoplayer.utils.GSYVideoType
;
/**
* 播放内核工厂
* Created by guoshuyu on 2018/5/21.
*/
public
class
PlayerFactory
{
p
ublic
static
IPlayerManager
getPlayManager
(
int
videoType
)
{
switch
(
videoType
)
{
case
GSYVideoType
.
IJKEXOPLAYER2
:
return
new
Exo2PlayerManager
()
;
case
GSYVideoType
.
SYSTEMPLAYER
:
return
new
SystemPlayerManager
();
case
GSYVideoType
.
IJKPLAYER
:
default
:
return
new
IjkPlayerManager
();
p
rivate
static
IPlayerManager
sPlayerManager
;
public
static
void
setPlayManager
(
IPlayerManager
playManager
)
{
sPlayerManager
=
playManager
;
}
public
static
IPlayerManager
getPlayManager
()
{
if
(
sPlayerManager
==
null
)
{
sPlayerManager
=
new
IjkPlayerManager
();
}
return
sPlayerManager
;
}
}
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/utils/GSYVideoType.java
浏览文件 @
d285bbf1
...
...
@@ -22,21 +22,6 @@ public class GSYVideoType {
//全屏拉伸显示,使用这个属性时,surface_container建议使用FrameLayout
public
final
static
int
SCREEN_MATCH_FULL
=
-
4
;
//默认播放内核IJK
public
final
static
int
IJKPLAYER
=
0
;
/**
* IJKEXOPLAYER 和 IJKEXOPLAYER2 是互斥的
* IJKEXOPLAYER2 must be compile com.shuyu:gsyVideoPlayer-exo2:$gsyVideoVersion
*/
//EXO 2 播放内核
public
final
static
int
IJKEXOPLAYER2
=
2
;
//EXO 1 播放内核,弃用,现在使用的是IJKEXOPLAYER2
@Deprecated
public
final
static
int
IJKEXOPLAYER
=
IJKEXOPLAYER2
;
//系统播放器
public
final
static
int
SYSTEMPLAYER
=
4
;
/**
* GLSurfaceView 主要用于OpenGL渲染的
*/
...
...
gsyVideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/video/CustomGSYVideoPlayer.java
已删除
100644 → 0
浏览文件 @
4516fb6a
package
com.shuyu.gsyvideoplayer.video
;
import
android.content.Context
;
import
android.graphics.SurfaceTexture
;
import
android.util.AttributeSet
;
import
android.view.Surface
;
import
android.view.TextureView
;
import
android.view.ViewGroup
;
import
android.widget.RelativeLayout
;
import
android.widget.SeekBar
;
import
com.shuyu.gsyvideoplayer.GSYPreViewManager
;
import
com.shuyu.gsyvideoplayer.render.view.GSYTextureView
;
import
com.shuyu.gsyvideoplayer.R
;
import
com.shuyu.gsyvideoplayer.video.base.GSYBaseVideoPlayer
;
/**
* Created by shuyu on 2016/12/10.
* 进度图小图预览,目前对本地视频还可以,网络视频效果不好,不建议使用
*/
@Deprecated
public
class
CustomGSYVideoPlayer
extends
StandardGSYVideoPlayer
{
private
RelativeLayout
mPreviewLayout
;
private
GSYTextureView
mPreviewTexture
;
//是否因为用户点击
private
boolean
mIsFromUser
;
//是否打开滑动预览
private
boolean
mOpenPreView
;
private
int
mPreProgress
=
-
2
;
/**
* 1.5.0开始加入,如果需要不同布局区分功能,需要重载
*/
public
CustomGSYVideoPlayer
(
Context
context
,
Boolean
fullFlag
)
{
super
(
context
,
fullFlag
);
}
public
CustomGSYVideoPlayer
(
Context
context
)
{
super
(
context
);
}
public
CustomGSYVideoPlayer
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
@Override
protected
void
init
(
Context
context
)
{
super
.
init
(
context
);
initView
();
}
private
void
initView
()
{
mPreviewLayout
=
(
RelativeLayout
)
findViewById
(
R
.
id
.
preview_layout
);
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
video_layout_custom
;
}
@Override
protected
void
addTextureView
()
{
super
.
addTextureView
();
if
(
mPreviewLayout
.
getChildCount
()
>
0
)
{
mPreviewLayout
.
removeAllViews
();
}
mPreviewTexture
=
null
;
mPreviewTexture
=
new
GSYTextureView
(
getActivityContext
());
mPreviewTexture
.
setSurfaceTextureListener
(
new
TextureView
.
SurfaceTextureListener
()
{
@Override
public
void
onSurfaceTextureAvailable
(
SurfaceTexture
surface
,
int
width
,
int
height
)
{
GSYPreViewManager
.
instance
().
setDisplay
(
new
Surface
(
surface
));
}
@Override
public
void
onSurfaceTextureSizeChanged
(
SurfaceTexture
surface
,
int
width
,
int
height
)
{
}
@Override
public
boolean
onSurfaceTextureDestroyed
(
SurfaceTexture
surface
)
{
GSYPreViewManager
.
instance
().
setDisplay
(
null
);
return
true
;
}
@Override
public
void
onSurfaceTextureUpdated
(
SurfaceTexture
surface
)
{
}
});
mPreviewTexture
.
setRotation
(
mRotate
);
RelativeLayout
.
LayoutParams
layoutParams
=
new
RelativeLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
layoutParams
.
addRule
(
RelativeLayout
.
CENTER_IN_PARENT
);
mPreviewLayout
.
addView
(
mPreviewTexture
,
layoutParams
);
}
@Override
protected
void
prepareVideo
()
{
GSYPreViewManager
.
instance
().
prepare
(
mUrl
,
mMapHeadData
,
mLooping
,
mSpeed
);
super
.
prepareVideo
();
}
@Override
public
void
onProgressChanged
(
SeekBar
seekBar
,
final
int
progress
,
boolean
fromUser
)
{
super
.
onProgressChanged
(
seekBar
,
progress
,
fromUser
);
if
(
fromUser
&&
mOpenPreView
)
{
int
width
=
seekBar
.
getWidth
();
int
offset
=
(
int
)
(
width
-
(
getResources
().
getDimension
(
R
.
dimen
.
seek_bar_image
)
/
2
))
/
100
*
progress
;
RelativeLayout
.
LayoutParams
layoutParams
=
(
RelativeLayout
.
LayoutParams
)
mPreviewLayout
.
getLayoutParams
();
layoutParams
.
leftMargin
=
offset
;
//设置帧预览图的显示位置
mPreviewLayout
.
setLayoutParams
(
layoutParams
);
if
(
GSYPreViewManager
.
instance
().
getMediaPlayer
()
!=
null
&&
mHadPlay
&&
(
mOpenPreView
)
&&
GSYPreViewManager
.
instance
().
isSeekToComplete
())
{
GSYPreViewManager
.
instance
().
setSeekToComplete
(
false
);
int
time
=
progress
*
getDuration
()
/
100
;
GSYPreViewManager
.
instance
().
getMediaPlayer
().
seekTo
(
time
);
mPreProgress
=
progress
;
}
}
}
@Override
public
void
onStartTrackingTouch
(
SeekBar
seekBar
)
{
super
.
onStartTrackingTouch
(
seekBar
);
if
(
mOpenPreView
)
{
mIsFromUser
=
true
;
mPreviewLayout
.
setVisibility
(
VISIBLE
);
mPreProgress
=
-
2
;
}
}
@Override
public
void
onStopTrackingTouch
(
SeekBar
seekBar
)
{
if
(
mOpenPreView
)
{
if
(
mPreProgress
>=
0
)
{
seekBar
.
setProgress
(
mPreProgress
);
}
super
.
onStopTrackingTouch
(
seekBar
);
mIsFromUser
=
false
;
mPreviewLayout
.
setVisibility
(
GONE
);
}
else
{
super
.
onStopTrackingTouch
(
seekBar
);
}
}
@Override
protected
void
setTextAndProgress
(
int
secProgress
)
{
if
(
mIsFromUser
)
{
return
;
}
super
.
setTextAndProgress
(
secProgress
);
}
@Override
public
GSYBaseVideoPlayer
startWindowFullscreen
(
Context
context
,
boolean
actionBar
,
boolean
statusBar
)
{
GSYBaseVideoPlayer
gsyBaseVideoPlayer
=
super
.
startWindowFullscreen
(
context
,
actionBar
,
statusBar
);
CustomGSYVideoPlayer
customGSYVideoPlayer
=
(
CustomGSYVideoPlayer
)
gsyBaseVideoPlayer
;
customGSYVideoPlayer
.
mOpenPreView
=
mOpenPreView
;
return
gsyBaseVideoPlayer
;
}
public
boolean
isOpenPreView
()
{
return
mOpenPreView
;
}
/**
* 如果是需要进度条预览的设置打开,默认关闭
*/
public
void
setOpenPreView
(
boolean
localFile
)
{
this
.
mOpenPreView
=
localFile
;
}
}
gsyVideoPlayer-x86/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536
m
#org.gradle.jvmargs=-Xmx1024
m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyVideoPlayer-x86_64/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536m
#
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyVideoPlayer/build.gradle
浏览文件 @
d285bbf1
...
...
@@ -32,6 +32,7 @@ dependencies {
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
api
project
(
':gsyVideoPlayer-java'
)
api
project
(
':gsyvideoplayer-exo2'
)
//api project(':gsyVideoPlayer-armv5')
//api project(':gsyVideoPlayer-armv7a')
//api project(':gsyVideoPlayer-armv64')
...
...
@@ -56,6 +57,7 @@ dependencies {
//compile fileTree(dir: 'libs', include: ['*.jar'])
//compile "com.shuyu:gsyVideoPlayer-java:$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"
...
...
gsyVideoPlayer/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536
m
#org.gradle.jvmargs=-Xmx1024
m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyvideoplayer-androidvideocache/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536
m
#org.gradle.jvmargs=-Xmx1024
m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsyvideoplayer-exo2/build.gradle
浏览文件 @
d285bbf1
...
...
@@ -31,17 +31,20 @@ android {
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
def
viewDependencies
=
rootProject
.
ext
.
viewDependencies
implementation
viewDependencies
.
ijkplayer_java
api
viewDependencies
.
ijkplayer_java
api
viewDependencies
.
exo_player2
api
viewDependencies
.
exo_player2_rtmp
//api "com.shuyu:GSYVideoPlayer-base:$gsyVideoVersion"
api
project
(
':gsyVideoPlayer-base'
)
//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"
}
...
...
gsyvideoplayer-exo2/gradle.properties
浏览文件 @
d285bbf1
...
...
@@ -9,7 +9,7 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs
=
-Xmx1536
m
#org.gradle.jvmargs=-Xmx1024
m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
...
...
gsy
VideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/player
/Exo2PlayerManager.java
→
gsy
videoplayer-exo2/src/main/java/tv/danmaku/ijk/media/exo2
/Exo2PlayerManager.java
浏览文件 @
d285bbf1
package
com.shuyu.gsyvideoplayer.player
;
package
tv.danmaku.ijk.media.exo2
;
import
android.content.Context
;
import
android.media.AudioManager
;
...
...
@@ -10,10 +10,10 @@ import com.google.android.exoplayer2.video.DummySurface;
import
com.shuyu.gsyvideoplayer.cache.ICacheManager
;
import
com.shuyu.gsyvideoplayer.model.GSYModel
;
import
com.shuyu.gsyvideoplayer.model.VideoOptionModel
;
import
com.shuyu.gsyvideoplayer.player.IPlayerManager
;
import
java.util.List
;
import
tv.danmaku.ijk.media.exo2.IjkExo2MediaPlayer
;
import
tv.danmaku.ijk.media.player.IMediaPlayer
;
/**
...
...
gsy
VideoPlayer-java/src/main/java/com/shuyu/gsyvideoplayer/cache
/ExoPlayerCacheManager.java
→
gsy
videoplayer-exo2/src/main/java/tv/danmaku/ijk/media/exo2
/ExoPlayerCacheManager.java
浏览文件 @
d285bbf1
package
com.shuyu.gsyvideoplayer.cache
;
package
tv.danmaku.ijk.media.exo2
;
import
android.content.Context
;
import
android.net.Uri
;
import
com.shuyu.gsyvideoplayer.cache.ICacheManager
;
import
java.io.File
;
import
java.util.Map
;
import
tv.danmaku.ijk.media.exo2.ExoSourceManager
;
import
tv.danmaku.ijk.media.exo2.IjkExo2MediaPlayer
;
import
tv.danmaku.ijk.media.player.IMediaPlayer
;
/**
...
...
settings.gradle
浏览文件 @
d285bbf1
include
':app'
,
':gsyVideoPlayer'
,
':gsyVideoPlayer-java'
,
':gsyVideoPlayer-armv5'
,
':gsyVideoPlayer-armv7a'
,
':gsyVideoPlayer-armv64'
,
':gsyVideoPlayer-x86'
,
':gsyVideoPlayer-x86_64'
,
':gsyVideoPlayer-ex_so'
,
':gsyvideoplayer-androidvideocache'
,
':gsyvideoplayer-exo2'
include
':app'
,
':gsyVideoPlayer'
,
':gsyVideoPlayer-java'
,
':gsyVideoPlayer-armv5'
,
':gsyVideoPlayer-armv7a'
,
':gsyVideoPlayer-armv64'
,
':gsyVideoPlayer-x86'
,
':gsyVideoPlayer-x86_64'
,
':gsyVideoPlayer-ex_so'
,
':gsyvideoplayer-androidvideocache'
,
':gsyvideoplayer-exo2'
,
':gsyVideoPlayer-base'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录