Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
4c380e1a
提交
4c380e1a
authored
3月 19, 2019
作者:
José Luis Millán
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Score: store necessary information for next score update
上级
5afbbd54
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
26 行增加
和
16 行删除
+26
-16
RtpStreamRecv.hpp
worker/include/RTC/RtpStreamRecv.hpp
+1
-0
RtpStreamRecv.cpp
worker/src/RTC/RtpStreamRecv.cpp
+17
-8
RtpStreamSend.cpp
worker/src/RTC/RtpStreamSend.cpp
+8
-8
没有找到文件。
worker/include/RTC/RtpStreamRecv.hpp
浏览文件 @
4c380e1a
...
...
@@ -59,6 +59,7 @@ namespace RTC
uint32_t
jitter
{
0
};
uint8_t
firSeqNumber
{
0
};
uint32_t
reportedPacketLost
{
0
};
bool
inactive
{
false
};
// Stream is inactive.
std
::
unique_ptr
<
RTC
::
NackGenerator
>
nackGenerator
;
Timer
*
inactivityCheckPeriodicTimer
{
nullptr
};
};
...
...
worker/src/RTC/RtpStreamRecv.cpp
浏览文件 @
4c380e1a
...
...
@@ -71,7 +71,10 @@ namespace RTC
// Ensure the inactivityCheckPeriodicTimer runs.
if
(
!
this
->
inactivityCheckPeriodicTimer
->
IsActive
())
{
this
->
inactive
=
false
;
this
->
inactivityCheckPeriodicTimer
->
Restart
();
}
return
true
;
}
...
...
@@ -304,6 +307,7 @@ namespace RTC
{
MS_TRACE
();
this
->
inactive
=
true
;
this
->
inactivityCheckPeriodicTimer
->
Stop
();
}
...
...
@@ -311,6 +315,7 @@ namespace RTC
{
MS_TRACE
();
this
->
inactive
=
false
;
this
->
inactivityCheckPeriodicTimer
->
Restart
();
}
...
...
@@ -341,14 +346,6 @@ namespace RTC
auto
totalExpected
=
GetExpectedPackets
();
uint32_t
expected
=
totalExpected
-
this
->
expectedPrior
;
// We didn't expect more packets to come.
if
(
expected
==
0
)
{
ResetScore
();
return
;
}
this
->
expectedPrior
=
totalExpected
;
// Calculate number of packets received in this interval.
...
...
@@ -371,6 +368,17 @@ namespace RTC
this
->
repairedPrior
=
totalRepaired
;
if
(
this
->
inactive
)
return
;
// We didn't expect more packets to come.
if
(
expected
==
0
)
{
RtpStream
::
UpdateScore
(
10
);
return
;
}
if
(
repaired
>=
lost
)
lost
=
0
;
else
...
...
@@ -420,6 +428,7 @@ namespace RTC
// If no RTP is being received reset the score.
if
(
this
->
transmissionCounter
.
GetRate
(
now
)
==
0
)
{
this
->
inactive
=
true
;
this
->
inactivityCheckPeriodicTimer
->
Stop
();
if
(
GetScore
()
!=
0
)
...
...
worker/src/RTC/RtpStreamSend.cpp
浏览文件 @
4c380e1a
...
...
@@ -533,14 +533,6 @@ namespace RTC
auto
totalSent
=
this
->
transmissionCounter
.
GetPacketCount
();
auto
sent
=
totalSent
-
this
->
sentPrior
;
// We didn't send any packet.
if
(
sent
==
0
)
{
ResetScore
();
return
;
}
this
->
sentPrior
=
totalSent
;
// Calculate number of packets lost in this interval.
...
...
@@ -560,6 +552,14 @@ namespace RTC
this
->
repairedPrior
=
totalRepaired
;
// We didn't send any packet.
if
(
sent
==
0
)
{
RtpStream
::
UpdateScore
(
10
);
return
;
}
if
(
repaired
>=
lost
)
lost
=
0
;
else
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论