Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2013-12-20 18:53:13 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
11cd5c640fa9c6e55f345da7e0e44469d6521f60
11cd5c64
1 parent
b5c17e23
update the srs player, set the DAR.
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
10 行增加
和
13 行删除
trunk/research/players/srs_player/release/srs_player.swf
trunk/research/players/srs_player/src/srs_player.as
trunk/research/players/srs_player/release/srs_player.swf
查看文件 @
11cd5c6
不能预览此文件类型
trunk/research/players/srs_player/src/srs_player.as
查看文件 @
11cd5c6
...
...
@@ -106,20 +106,17 @@ package
public
function
js_call_dar
(
num
:
int
,
den
:
int
)
:
int
{
if
(
this
.
video
&&
num
>
0
&&
den
>
0
&&
this
.
video
.
width
>
0
)
{
// set DAR.
if
(
num
<
den
)
{
// calc the height by DAR
var
_height
:
int
=
this
.
video
.
width
*
num
/
den
;
// calc the height by DAR
var
_height
:
int
=
this
.
w
*
num
/
den
;
if
(
_height
<=
this
.
h
)
{
this
.
video
.
width
=
this
.
w
;
this
.
video
.
height
=
_height
;
}
else
{
// height overflow, calc the width by DAR
if
(
_height
>
this
.
h
)
{
var
_width
:
int
=
this
.
video
.
height
*
den
/
num
;
this
.
video
.
width
=
_width
;
this
.
video
.
height
=
this
.
h
;
}
else
{
this
.
video
.
width
=
this
.
w
;
this
.
video
.
height
=
_height
;
}
var
_width
:
int
=
this
.
h
*
den
/
num
;
this
.
video
.
width
=
_width
;
this
.
video
.
height
=
this
.
h
;
}
// align center.
...
...
请
注册
或
登录
后发表评论