Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_25606643
ijkplayer
提交
d3c4c892
I
ijkplayer
项目概览
qq_25606643
/
ijkplayer
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
ijkplayer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d3c4c892
编写于
1月 10, 2017
作者:
X
Xinzheng Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ios/hudview: add cache statistic and make hud info adjust font size automatically
上级
fc2d8e89
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
6 deletion
+14
-6
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
...JKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
+9
-3
ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m
...er/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m
+4
-2
ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m
...MediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m
+1
-1
未找到文件。
ios/IJKMediaPlayer/IJKMediaPlayer/IJKFFMoviePlayerController.m
浏览文件 @
d3c4c892
...
...
@@ -183,7 +183,7 @@ void IJKFFIOStatCompleteRegister(void (*cb)(const char *url,
_scalingMode
=
IJKMPMovieScalingModeAspectFit
;
_shouldAutoplay
=
YES
;
memset
(
&
_asyncStat
,
0
,
sizeof
(
_asyncStat
));
memset
(
&
_cacheStat
,
0
,
sizeof
(
_cacheStat
));
_monitor
=
[[
IJKFFMonitor
alloc
]
init
];
// init media resource
...
...
@@ -671,8 +671,8 @@ inline static NSString *formatedDurationBytesAndBitrate(int64_t bytes, int64_t b
}
inline
static
NSString
*
formatedSize
(
int64_t
bytes
)
{
if
(
bytes
>=
100
*
10
00
)
{
return
[
NSString
stringWithFormat
:
@"%.2f MB"
,
((
float
)
bytes
)
/
1000
/
10
00
];
if
(
bytes
>=
100
*
10
24
)
{
return
[
NSString
stringWithFormat
:
@"%.2f MB"
,
((
float
)
bytes
)
/
1000
/
10
24
];
}
else
if
(
bytes
>=
100
)
{
return
[
NSString
stringWithFormat
:
@"%.1f KB"
,
((
float
)
bytes
)
/
1000
];
}
else
{
...
...
@@ -748,6 +748,12 @@ inline static NSString *formatedSpeed(int64_t bytes, int64_t elapsed_milli) {
[
_glView
setHudValue
:[
NSString
stringWithFormat
:
@"%.3f %.3f"
,
avdelay
,
-
avdiff
]
forKey
:
@"delay"
];
int64_t
bitRate
=
ijkmp_get_property_int64
(
_mediaPlayer
,
FFP_PROP_INT64_BIT_RATE
,
0
);
[
_glView
setHudValue
:[
NSString
stringWithFormat
:
@"-%@, %@"
,
formatedSize
(
_cacheStat
.
cache_buf_forwards
),
formatedDurationBytesAndBitrate
(
_cacheStat
.
cache_buf_forwards
,
bitRate
)]
forKey
:
@"cache-forwards"
];
[
_glView
setHudValue
:
formatedSize
(
_cacheStat
.
cache_physical_pos
)
forKey
:
@"cache-physical-pos"
];
[
_glView
setHudValue
:
formatedSize
(
_cacheStat
.
cache_file_pos
)
forKey
:
@"cache-file-pos"
];
[
_glView
setHudValue
:
formatedSize
(
_cacheStat
.
cache_count_bytes
)
forKey
:
@"cache-bytes"
];
[
_glView
setHudValue
:[
NSString
stringWithFormat
:
@"-%@, %@"
,
formatedSize
(
_asyncStat
.
buf_backwards
),
formatedDurationBytesAndBitrate
(
_asyncStat
.
buf_backwards
,
bitRate
)]
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewCell.m
浏览文件 @
d3c4c892
...
...
@@ -31,7 +31,9 @@
_column
[
i
]
=
[[
UILabel
alloc
]
init
];
_column
[
i
].
textColor
=
[
UIColor
whiteColor
];
_column
[
i
].
font
=
[
UIFont
fontWithName
:
@"Menlo"
size
:
9
];
_column
[
i
].
adjustsFontSizeToFitWidth
=
YES
;
_column
[
i
].
numberOfLines
=
1
;
_column
[
i
].
minimumScaleFactor
=
0
.
5
;
[
self
.
contentView
addSubview
:
_column
[
i
]];
}
}
...
...
@@ -53,7 +55,7 @@
CGFloat
nextX
=
CELL_MARGIN
;
newFrame
.
origin
.
x
=
nextX
;
newFrame
.
size
.
width
=
parentFrame
.
size
.
width
*
0
.
2
;
newFrame
.
size
.
width
=
parentFrame
.
size
.
width
*
0
.
3
;
_column
[
0
].
frame
=
newFrame
;
nextX
=
newFrame
.
origin
.
x
+
newFrame
.
size
.
width
+
CELL_MARGIN
;
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijksdl/ios/IJKSDLHudViewController.m
浏览文件 @
d3c4c892
...
...
@@ -87,7 +87,7 @@
-
(
CGFloat
)
tableView
:(
UITableView
*
)
tableView
heightForRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
return
20
.
f
;
return
16
.
f
;
}
@end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录