Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
05d107f0
Unverified
提交
05d107f0
authored
4月 14, 2023
作者:
Iñaki Baz Castillo
提交者:
GitHub
4月 14, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Only perform RTP inactivity checks on simulcast streams (#1061)
上级
de8d8ce4
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
26 行增加
和
16 行删除
+26
-16
CHANGELOG.md
CHANGELOG.md
+1
-0
RtpStreamRecv.hpp
worker/include/RTC/RtpStreamRecv.hpp
+3
-1
Producer.cpp
worker/src/RTC/Producer.cpp
+4
-1
RtpStreamRecv.cpp
worker/src/RTC/RtpStreamRecv.cpp
+14
-11
TestRtpStreamRecv.cpp
worker/test/src/RTC/TestRtpStreamRecv.cpp
+4
-3
没有找到文件。
CHANGELOG.md
浏览文件 @
05d107f0
...
...
@@ -3,6 +3,7 @@
### NEXT
*
`RtpStreamRecv`
: Only perform RTP inactivity check on simulcast streams (
[
PR #1061
](
https://github.com/versatica/mediasoup/pull/1061
)
).
*
`SeqManager`
: Properly remove old dropped entries (
[
PR #1054
](
https://github.com/versatica/mediasoup/pull/1054
)
).
*
libwebrtc: Upgrade trendline estimator to improve low bandwidth conditions (
[
PR #1055
](
https://github.com/versatica/mediasoup/pull/1055
)
by @ggarber).
*
libwebrtc: Fix bandwidth probation dead state (
[
PR #1031
](
https://github.com/versatica/mediasoup/pull/1031
)
by @vpalmisano).
...
...
worker/include/RTC/RtpStreamRecv.hpp
浏览文件 @
05d107f0
...
...
@@ -45,7 +45,8 @@ namespace RTC
RtpStreamRecv
(
RTC
::
RtpStreamRecv
::
Listener
*
listener
,
RTC
::
RtpStream
::
Params
&
params
,
unsigned
int
sendNackDelayMs
);
unsigned
int
sendNackDelayMs
,
bool
useRtpInactivityCheck
);
~
RtpStreamRecv
();
void
FillJsonStats
(
json
&
jsonObject
)
override
;
...
...
@@ -96,6 +97,7 @@ namespace RTC
private
:
// Passed by argument.
unsigned
int
sendNackDelayMs
{
0u
};
bool
useRtpInactivityCheck
{
false
};
// Others.
// Packets expected at last interval.
uint32_t
expectedPrior
{
0u
};
...
...
worker/src/RTC/Producer.cpp
浏览文件 @
05d107f0
...
...
@@ -1223,8 +1223,11 @@ namespace RTC
}
}
// Only perform RTP inactivity check on simulcast.
auto
useRtpInactivityCheck
=
this
->
type
==
RtpParameters
::
Type
::
SIMULCAST
;
// Create a RtpStreamRecv for receiving a media stream.
auto
*
rtpStream
=
new
RTC
::
RtpStreamRecv
(
this
,
params
,
SendNackDelay
);
auto
*
rtpStream
=
new
RTC
::
RtpStreamRecv
(
this
,
params
,
SendNackDelay
,
useRtpInactivityCheck
);
// Insert into the maps.
this
->
mapSsrcRtpStream
[
ssrc
]
=
rtpStream
;
...
...
worker/src/RTC/RtpStreamRecv.cpp
浏览文件 @
05d107f0
...
...
@@ -189,8 +189,12 @@ namespace RTC
/* Instance methods. */
RtpStreamRecv
::
RtpStreamRecv
(
RTC
::
RtpStreamRecv
::
Listener
*
listener
,
RTC
::
RtpStream
::
Params
&
params
,
unsigned
int
sendNackDelayMs
)
RTC
::
RtpStreamRecv
::
Listener
*
listener
,
RTC
::
RtpStream
::
Params
&
params
,
unsigned
int
sendNackDelayMs
,
bool
useRtpInactivityCheck
)
:
RTC
::
RtpStream
::
RtpStream
(
listener
,
params
,
10
),
sendNackDelayMs
(
sendNackDelayMs
),
useRtpInactivityCheck
(
useRtpInactivityCheck
),
transmissionCounter
(
params
.
spatialLayers
,
params
.
temporalLayers
,
this
->
params
.
useDtx
?
6000
:
2500
)
{
...
...
@@ -201,18 +205,16 @@ namespace RTC
this
->
nackGenerator
.
reset
(
new
RTC
::
NackGenerator
(
this
,
this
->
sendNackDelayMs
));
}
// Run the RTP inactivity periodic timer (use a different timeout if DTX is
// enabled).
this
->
inactivityCheckPeriodicTimer
=
new
Timer
(
this
);
this
->
inactive
=
false
;
this
->
inactive
=
false
;
if
(
!
this
->
params
.
useDtx
)
if
(
this
->
useRtpInactivityCheck
)
{
this
->
inactivityCheckPeriodicTimer
->
Start
(
InactivityCheckInterval
);
}
else
{
this
->
inactivityCheckPeriodicTimer
->
Start
(
InactivityCheckIntervalWithDtx
);
// Run the RTP inactivity periodic timer (use a different timeout if DTX is
// enabled).
this
->
inactivityCheckPeriodicTimer
=
new
Timer
(
this
);
this
->
inactivityCheckPeriodicTimer
->
Start
(
this
->
params
.
useDtx
?
InactivityCheckIntervalWithDtx
:
InactivityCheckInterval
);
}
}
...
...
@@ -222,6 +224,7 @@ namespace RTC
// Close the RTP inactivity check periodic timer.
delete
this
->
inactivityCheckPeriodicTimer
;
this
->
inactivityCheckPeriodicTimer
=
nullptr
;
}
void
RtpStreamRecv
::
FillJsonStats
(
json
&
jsonObject
)
...
...
worker/test/src/RTC/TestRtpStreamRecv.cpp
浏览文件 @
05d107f0
...
...
@@ -11,6 +11,7 @@ using namespace RTC;
// 17: 16 bit mask + the initial sequence number.
static
constexpr
size_t
MaxRequestedPackets
{
17
};
static
constexpr
unsigned
int
SendNackDelay
{
0u
};
// In ms.
static
const
bool
UseRtpInactivityCheck
{
false
};
SCENARIO
(
"receive RTP packets and trigger NACK"
,
"[rtp][rtpstream]"
)
{
...
...
@@ -141,7 +142,7 @@ SCENARIO("receive RTP packets and trigger NACK", "[rtp][rtpstream]")
SECTION
(
"NACK one packet"
)
{
RtpStreamRecvListener
listener
;
RtpStreamRecv
rtpStream
(
&
listener
,
params
,
SendNackDelay
);
RtpStreamRecv
rtpStream
(
&
listener
,
params
,
SendNackDelay
,
UseRtpInactivityCheck
);
packet
->
SetSequenceNumber
(
1
);
rtpStream
.
ReceivePacket
(
packet
);
...
...
@@ -170,7 +171,7 @@ SCENARIO("receive RTP packets and trigger NACK", "[rtp][rtpstream]")
SECTION
(
"wrapping sequence numbers"
)
{
RtpStreamRecvListener
listener
;
RtpStreamRecv
rtpStream
(
&
listener
,
params
,
SendNackDelay
);
RtpStreamRecv
rtpStream
(
&
listener
,
params
,
SendNackDelay
,
UseRtpInactivityCheck
);
packet
->
SetSequenceNumber
(
0xfffe
);
rtpStream
.
ReceivePacket
(
packet
);
...
...
@@ -190,7 +191,7 @@ SCENARIO("receive RTP packets and trigger NACK", "[rtp][rtpstream]")
SECTION
(
"require key frame"
)
{
RtpStreamRecvListener
listener
;
RtpStreamRecv
rtpStream
(
&
listener
,
params
,
SendNackDelay
);
RtpStreamRecv
rtpStream
(
&
listener
,
params
,
SendNackDelay
,
UseRtpInactivityCheck
);
packet
->
SetSequenceNumber
(
1
);
rtpStream
.
ReceivePacket
(
packet
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论