Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
752883bc
提交
752883bc
authored
3月 30, 2023
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RtpRetransmissionBuffer: improve methods' name and logs
上级
4b0d5be9
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
13 行删除
+15
-13
RtpRetransmissionBuffer.hpp
worker/include/RTC/RtpRetransmissionBuffer.hpp
+2
-2
RtpRetransmissionBuffer.cpp
worker/src/RTC/RtpRetransmissionBuffer.cpp
+13
-11
没有找到文件。
worker/include/RTC/RtpRetransmissionBuffer.hpp
浏览文件 @
752883bc
...
@@ -46,8 +46,8 @@ namespace RTC
...
@@ -46,8 +46,8 @@ namespace RTC
Item
*
GetNewest
()
const
;
Item
*
GetNewest
()
const
;
void
RemoveOldest
();
void
RemoveOldest
();
void
RemoveOldest
(
uint16_t
numItems
);
void
RemoveOldest
(
uint16_t
numItems
);
bool
ClearTooOld
(
uint32_t
newestTimestamp
);
bool
ClearTooOld
ByTimestamp
(
uint32_t
newestTimestamp
);
bool
IsTooOld
(
uint32_t
timestamp
,
uint32_t
newestTimestamp
)
const
;
bool
IsTooOld
Timestamp
(
uint32_t
timestamp
,
uint32_t
newestTimestamp
)
const
;
Item
*
FillItem
(
Item
*
FillItem
(
Item
*
item
,
RTC
::
RtpPacket
*
packet
,
std
::
shared_ptr
<
RTC
::
RtpPacket
>&
sharedPacket
)
const
;
Item
*
item
,
RTC
::
RtpPacket
*
packet
,
std
::
shared_ptr
<
RTC
::
RtpPacket
>&
sharedPacket
)
const
;
...
...
worker/src/RTC/RtpRetransmissionBuffer.cpp
浏览文件 @
752883bc
...
@@ -94,9 +94,9 @@ namespace RTC
...
@@ -94,9 +94,9 @@ namespace RTC
?
timestamp
?
timestamp
:
newestItem
->
timestamp
;
:
newestItem
->
timestamp
;
// ClearTooOld
() returns true if at least one packet has been removed from
// ClearTooOld
ByTimestamp() returns true if at least one packet has been
// the front.
//
removed from
the front.
if
(
ClearTooOld
(
newestTimestamp
))
if
(
ClearTooOld
ByTimestamp
(
newestTimestamp
))
{
{
// Buffer content has been modified so we must check it again.
// Buffer content has been modified so we must check it again.
if
(
this
->
buffer
.
empty
())
if
(
this
->
buffer
.
empty
())
...
@@ -132,7 +132,7 @@ namespace RTC
...
@@ -132,7 +132,7 @@ namespace RTC
{
{
MS_WARN_TAG
(
MS_WARN_TAG
(
rtp
,
rtp
,
"packet has higher seq but l
ess
timestamp than newest packet in the buffer, discarding it [ssrc:%"
PRIu32
"packet has higher seq but l
ower
timestamp than newest packet in the buffer, discarding it [ssrc:%"
PRIu32
", seq:%"
PRIu16
", timestamp:%"
PRIu32
"]"
,
", seq:%"
PRIu16
", timestamp:%"
PRIu32
"]"
,
ssrc
,
ssrc
,
seq
,
seq
,
...
@@ -204,10 +204,12 @@ namespace RTC
...
@@ -204,10 +204,12 @@ namespace RTC
timestamp
);
timestamp
);
// Ensure that packet is not too old to be stored.
// Ensure that packet is not too old to be stored.
if
(
IsTooOld
(
timestamp
,
newestItem
->
timestamp
))
if
(
IsTooOld
Timestamp
(
timestamp
,
newestItem
->
timestamp
))
{
{
MS_WARN_DEV
(
MS_WARN_DEV
(
"packet too old, discarding it [seq:%"
PRIu16
", timestamp:%"
PRIu32
"]"
,
seq
,
timestamp
);
"packet's timestamp too old, discarding it [seq:%"
PRIu16
", timestamp:%"
PRIu32
"]"
,
seq
,
timestamp
);
return
;
return
;
}
}
...
@@ -218,7 +220,7 @@ namespace RTC
...
@@ -218,7 +220,7 @@ namespace RTC
{
{
MS_WARN_TAG
(
MS_WARN_TAG
(
rtp
,
rtp
,
"packet has l
ess
seq but higher timestamp than oldest packet in the buffer, discarding it [ssrc:%"
PRIu32
"packet has l
ower
seq but higher timestamp than oldest packet in the buffer, discarding it [ssrc:%"
PRIu32
", seq:%"
PRIu16
", timestamp:%"
PRIu32
"]"
,
", seq:%"
PRIu16
", timestamp:%"
PRIu32
"]"
,
ssrc
,
ssrc
,
seq
,
seq
,
...
@@ -305,7 +307,7 @@ namespace RTC
...
@@ -305,7 +307,7 @@ namespace RTC
{
{
MS_WARN_TAG
(
MS_WARN_TAG
(
rtp
,
rtp
,
"packet timestamp is l
ess
than timestamp of immediate older packet in the buffer, discarding it [ssrc:%"
PRIu32
"packet timestamp is l
ower
than timestamp of immediate older packet in the buffer, discarding it [ssrc:%"
PRIu32
", seq:%"
PRIu16
", timestamp:%"
PRIu32
"]"
,
", seq:%"
PRIu16
", timestamp:%"
PRIu32
"]"
,
ssrc
,
ssrc
,
seq
,
seq
,
...
@@ -486,7 +488,7 @@ namespace RTC
...
@@ -486,7 +488,7 @@ namespace RTC
}
}
}
}
bool
RtpRetransmissionBuffer
::
ClearTooOld
(
uint32_t
newestTimestamp
)
bool
RtpRetransmissionBuffer
::
ClearTooOld
ByTimestamp
(
uint32_t
newestTimestamp
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -497,7 +499,7 @@ namespace RTC
...
@@ -497,7 +499,7 @@ namespace RTC
// that contain too old packets.
// that contain too old packets.
while
((
oldestItem
=
GetOldest
()))
while
((
oldestItem
=
GetOldest
()))
{
{
if
(
IsTooOld
(
oldestItem
->
timestamp
,
newestTimestamp
))
if
(
IsTooOld
Timestamp
(
oldestItem
->
timestamp
,
newestTimestamp
))
{
{
RemoveOldest
();
RemoveOldest
();
...
@@ -514,7 +516,7 @@ namespace RTC
...
@@ -514,7 +516,7 @@ namespace RTC
return
itemsRemoved
;
return
itemsRemoved
;
}
}
bool
RtpRetransmissionBuffer
::
IsTooOld
(
uint32_t
timestamp
,
uint32_t
newestTimestamp
)
const
bool
RtpRetransmissionBuffer
::
IsTooOld
Timestamp
(
uint32_t
timestamp
,
uint32_t
newestTimestamp
)
const
{
{
MS_TRACE
();
MS_TRACE
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论