Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_25606643
ijkplayer
提交
a711f27f
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 搜索 >>
提交
a711f27f
编写于
6月 30, 2015
作者:
Z
Zhang Rui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ios/VideoToolbox: drop too late frames
上级
d4efdfad
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
0 deletion
+43
-0
ijkmedia/ijkplayer/ff_ffplay.c
ijkmedia/ijkplayer/ff_ffplay.c
+10
-0
ijkmedia/ijkplayer/ff_ffplay.h
ijkmedia/ijkplayer/ff_ffplay.h
+3
-0
ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBox.m
...aPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBox.m
+30
-0
未找到文件。
ijkmedia/ijkplayer/ff_ffplay.c
浏览文件 @
a711f27f
...
...
@@ -3357,6 +3357,16 @@ void ffp_frame_queue_push(FrameQueue *f)
return
frame_queue_push
(
f
);
}
int
ffp_get_master_sync_type
(
VideoState
*
is
)
{
return
get_master_sync_type
(
is
);
}
double
ffp_get_master_clock
(
VideoState
*
is
)
{
return
get_master_clock
(
is
);
}
void
ffp_toggle_buffering_l
(
FFPlayer
*
ffp
,
int
buffering_on
)
{
VideoState
*
is
=
ffp
->
is
;
...
...
ijkmedia/ijkplayer/ff_ffplay.h
浏览文件 @
a711f27f
...
...
@@ -80,6 +80,9 @@ bool ffp_is_flush_packet(AVPacket *pkt);
Frame
*
ffp_frame_queue_peek_writable
(
FrameQueue
*
f
);
void
ffp_frame_queue_push
(
FrameQueue
*
f
);
int
ffp_get_master_sync_type
(
VideoState
*
is
);
double
ffp_get_master_clock
(
VideoState
*
is
);
void
ffp_toggle_buffering_l
(
FFPlayer
*
ffp
,
int
start_buffering
);
void
ffp_toggle_buffering
(
FFPlayer
*
ffp
,
int
start_buffering
);
void
ffp_check_buffering_l
(
FFPlayer
*
ffp
);
...
...
ios/IJKMediaPlayer/IJKMediaPlayer/ijkmedia/ijkplayer/ios/pipeline/IJKVideoToolBox.m
浏览文件 @
a711f27f
...
...
@@ -340,6 +340,9 @@ void VTDecoderCallback(void *decompressionOutputRefCon,
return
;
}
FFPlayer
*
ffp
=
ctx
->
ffp
;
VideoState
*
is
=
ffp
->
is
;
sort_queue
*
newFrame
=
(
sort_queue
*
)
mallocz
(
sizeof
(
sort_queue
));
{
...
...
@@ -386,6 +389,33 @@ void VTDecoderCallback(void *decompressionOutputRefCon,
goto
failed
;
}
// FIXME: duplicated code
{
double
dpts
=
NAN
;
if
(
newFrame
->
pts
!=
AV_NOPTS_VALUE
)
dpts
=
av_q2d
(
is
->
video_st
->
time_base
)
*
newFrame
->
pts
;
if
(
ffp
->
framedrop
>
0
||
(
ffp
->
framedrop
&&
ffp_get_master_sync_type
(
is
)
!=
AV_SYNC_VIDEO_MASTER
))
{
if
(
newFrame
->
pts
!=
AV_NOPTS_VALUE
)
{
double
diff
=
dpts
-
ffp_get_master_clock
(
is
);
if
(
!
isnan
(
diff
)
&&
fabs
(
diff
)
<
AV_NOSYNC_THRESHOLD
&&
diff
-
is
->
frame_last_filter_delay
<
0
&&
is
->
viddec
.
pkt_serial
==
is
->
vidclk
.
serial
&&
is
->
videoq
.
nb_packets
)
{
is
->
frame_drops_early
++
;
is
->
continuous_frame_drops_early
++
;
if
(
is
->
continuous_frame_drops_early
>
ffp
->
framedrop
)
{
is
->
continuous_frame_drops_early
=
0
;
}
else
{
// drop too late frame
goto
failed
;
}
}
}
}
}
if
(
ctx
->
new_seg_flag
)
{
ALOGI
(
"new seg process!!!!"
);
while
(
ctx
->
m_queue_depth
>
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录