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-10-23 21:37:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b40d0467a8a74ff734807611789ffe53aad6ac51
b40d0467
1 parent
e31e3d60
time jitter detect and correct, very simple algorithm
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
8 行增加
和
5 行删除
trunk/src/core/srs_core_source.cpp
trunk/src/core/srs_core_source.cpp
查看文件 @
b40d046
...
...
@@ -68,11 +68,14 @@ int SrsConsumer::enqueue(SrsSharedPtrMessage* msg)
int
ret
=
ERROR_SUCCESS
;
/**
* we use a very simple time jitter detect/correct algorithm,
* if the delta of time is nagative or greater than CONST_MAX_JITTER_MS,
* we enforce the delta to DEFAULT_FRAME_TIME_MS,
* and update the last_pkt_time which used to detect next jitter.
* the last_pkt_correct_time is enforce the time monotonically.
* we use a very simple time jitter detect/correct algorithm:
* 1. delta: ensure the delta is positive and valid,
* we set the delta to DEFAULT_FRAME_TIME_MS,
* if the delta of time is nagative or greater than CONST_MAX_JITTER_MS.
* 2. last_pkt_time: specifies the original packet time,
* is used to detect next jitter.
* 3. last_pkt_correct_time: simply add the positive delta,
* and enforce the time monotonically.
*/
int32_t
time
=
msg
->
header
.
timestamp
;
int32_t
delta
=
time
-
last_pkt_time
;
...
...
请
注册
或
登录
后发表评论