Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
NotesChapter
GSYVideoPlayer
提交
f17de4d9
G
GSYVideoPlayer
项目概览
NotesChapter
/
GSYVideoPlayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
8
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,体验更适合开发者的 AI 搜索 >>
提交
f17de4d9
编写于
6月 16, 2017
作者:
S
shuyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加了拉伸填充的配置 (2017-06-16)
上级
1d1e5351
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
40 addition
and
4 deletion
+40
-4
UPDATE_VERSION.md
UPDATE_VERSION.md
+6
-1
app/src/main/java/com/example/gsyvideoplayer/GSYApplication.java
.../main/java/com/example/gsyvideoplayer/GSYApplication.java
+2
-0
app/src/main/res/layout/sample_video_land.xml
app/src/main/res/layout/sample_video_land.xml
+2
-3
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYImageCover.java
...src/main/java/com/shuyu/gsyvideoplayer/GSYImageCover.java
+12
-0
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYTextureView.java
...rc/main/java/com/shuyu/gsyvideoplayer/GSYTextureView.java
+15
-0
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/utils/GSYVideoType.java
...ain/java/com/shuyu/gsyvideoplayer/utils/GSYVideoType.java
+3
-0
未找到文件。
UPDATE_VERSION.md
浏览文件 @
f17de4d9
...
...
@@ -20,7 +20,12 @@ public void setDismissControlTime(int dismissControlTime)
*/
public void setSeekRatio(float seekRatio)
```
*
增加了拉伸填充的配置
```
GSYVideoType.java
//全屏拉伸显示,使用这个属性时,surface_container建议使用FrameLayout
public final static int SCREEN_MATCH_FULL = -4;
```
### 1.6.6(2017-05-24)
*
update ijkplayer to 0.8.0
...
...
app/src/main/java/com/example/gsyvideoplayer/GSYApplication.java
浏览文件 @
f17de4d9
...
...
@@ -24,5 +24,7 @@ public class GSYApplication extends Application {
//LeakCanary.install(this);
//GSYVideoType.enableMediaCodec();
//GSYVideoManager.instance().setVideoType(this, GSYVideoType.IJKEXOPLAYER);
//GSYVideoType.setShowType(GSYVideoType.SCREEN_MATCH_FULL);
//GSYVideoType.setShowType(GSYVideoType.SCREEN_TYPE_FULL);
}
}
app/src/main/res/layout/sample_video_land.xml
浏览文件 @
f17de4d9
...
...
@@ -4,13 +4,12 @@
android:layout_height=
"match_parent"
android:background=
"@android:color/black"
>
<
Relativ
eLayout
<
Fram
eLayout
android:id=
"@+id/surface_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
>
</RelativeLayout>
</FrameLayout>
<com.shuyu.gsyvideoplayer.GSYImageCover
android:id=
"@+id/cover"
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYImageCover.java
浏览文件 @
f17de4d9
...
...
@@ -44,6 +44,18 @@ public class GSYImageCover extends ImageView {
int
widthS
=
getDefaultSize
(
videoWidth
,
widthMeasureSpec
);
int
heightS
=
getDefaultSize
(
videoHeight
,
heightMeasureSpec
);
if
(
GSYVideoType
.
getShowType
()
==
GSYVideoType
.
SCREEN_MATCH_FULL
)
{
boolean
rotate
=
(
getRotation
()
!=
0
&&
getRotation
()
%
90
==
0
&&
Math
.
abs
(
getRotation
())
!=
180
);
if
(
rotate
)
{
setMeasuredDimension
(
heightMeasureSpec
,
widthMeasureSpec
);
}
else
{
setMeasuredDimension
(
widthMeasureSpec
,
heightMeasureSpec
);
}
return
;
}
if
(
originW
==
0
||
originH
==
0
)
{
originW
=
widthS
;
originH
=
heightS
;
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/GSYTextureView.java
浏览文件 @
f17de4d9
...
...
@@ -42,6 +42,21 @@ public class GSYTextureView extends TextureView {
int
widthS
=
getDefaultSize
(
videoWidth
,
widthMeasureSpec
);
int
heightS
=
getDefaultSize
(
videoHeight
,
heightMeasureSpec
);
if
(
GSYVideoType
.
getShowType
()
==
GSYVideoType
.
SCREEN_MATCH_FULL
)
{
boolean
rotate
=
(
getRotation
()
!=
0
&&
getRotation
()
%
90
==
0
&&
Math
.
abs
(
getRotation
())
!=
180
);
if
(
rotate
)
{
sizeW
=
heightMeasureSpec
;
sizeH
=
widthMeasureSpec
;
setMeasuredDimension
(
heightMeasureSpec
,
widthMeasureSpec
);
}
else
{
sizeW
=
widthMeasureSpec
;
sizeH
=
heightMeasureSpec
;
setMeasuredDimension
(
widthMeasureSpec
,
heightMeasureSpec
);
}
return
;
}
if
(
originW
==
0
||
originH
==
0
)
{
originW
=
widthS
;
originH
=
heightS
;
...
...
gsyVideoPlayer/src/main/java/com/shuyu/gsyvideoplayer/utils/GSYVideoType.java
浏览文件 @
f17de4d9
...
...
@@ -18,6 +18,9 @@ public class GSYVideoType {
//全屏裁减显示
public
final
static
int
SCREEN_TYPE_FULL
=
4
;
//全屏拉伸显示,使用这个属性时,surface_container建议使用FrameLayout
public
final
static
int
SCREEN_MATCH_FULL
=
-
4
;
public
final
static
int
IJKPLAYER
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录