Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
dc69b20c
提交
dc69b20c
authored
10月 24, 2017
作者:
José Luis Millán
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RTCP compound: Properly check if a Sender Report is present
上级
5be7578a
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
13 行增加
和
7 行删除
+13
-7
CompoundPacket.hpp
worker/include/RTC/RTCP/CompoundPacket.hpp
+7
-1
CompoundPacket.cpp
worker/src/RTC/RTCP/CompoundPacket.cpp
+5
-5
Transport.cpp
worker/src/RTC/Transport.cpp
+1
-1
没有找到文件。
worker/include/RTC/RTCP/CompoundPacket.hpp
浏览文件 @
dc69b20c
...
...
@@ -21,10 +21,11 @@ namespace RTC
size_t
GetSize
()
const
;
size_t
GetSenderReportCount
()
const
;
size_t
GetReceiverReportCount
()
const
;
void
Dump
()
const
;
void
Dump
();
void
AddSenderReport
(
SenderReport
*
report
);
void
AddReceiverReport
(
ReceiverReport
*
report
);
void
AddSdesChunk
(
SdesChunk
*
chunk
);
bool
HasSenderReport
();
void
Serialize
(
uint8_t
*
data
);
private
:
...
...
@@ -66,6 +67,11 @@ namespace RTC
{
this
->
sdesPacket
.
AddChunk
(
chunk
);
}
inline
bool
CompoundPacket
::
HasSenderReport
()
{
return
this
->
senderReportPacket
.
Begin
()
!=
this
->
senderReportPacket
.
End
();
}
}
// namespace RTCP
}
// namespace RTC
...
...
worker/src/RTC/RTCP/CompoundPacket.cpp
浏览文件 @
dc69b20c
...
...
@@ -17,7 +17,7 @@ namespace RTC
this
->
header
=
data
;
// Calculate the total required size for the entire message.
if
(
this
->
senderReportPacket
.
GetCount
()
!=
0u
)
if
(
HasSenderReport
()
)
{
this
->
size
=
this
->
senderReportPacket
.
GetSize
();
...
...
@@ -39,7 +39,7 @@ namespace RTC
// Fill it.
size_t
offset
{
0
};
if
(
this
->
senderReportPacket
.
GetCount
()
!=
0u
)
if
(
HasSenderReport
()
)
{
this
->
senderReportPacket
.
Serialize
(
this
->
header
);
offset
=
this
->
senderReportPacket
.
GetSize
();
...
...
@@ -81,13 +81,13 @@ namespace RTC
this
->
sdesPacket
.
Serialize
(
this
->
header
+
offset
);
}
void
CompoundPacket
::
Dump
()
const
void
CompoundPacket
::
Dump
()
{
MS_TRACE
();
MS_DUMP
(
"<CompoundPacket>"
);
if
(
this
->
senderReportPacket
.
GetCount
()
!=
0u
)
if
(
HasSenderReport
()
)
{
this
->
senderReportPacket
.
Dump
();
...
...
@@ -105,7 +105,7 @@ namespace RTC
void
CompoundPacket
::
AddSenderReport
(
SenderReport
*
report
)
{
MS_ASSERT
(
this
->
senderReportPacket
.
GetCount
()
==
0
,
"a sender report is already present"
);
MS_ASSERT
(
!
HasSenderReport
()
,
"a sender report is already present"
);
this
->
senderReportPacket
.
AddReport
(
report
);
}
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
dc69b20c
...
...
@@ -442,7 +442,7 @@ namespace RTC
consumer
->
GetRtcp
(
packet
.
get
(),
now
);
// Send the RTCP compound packet if there is a sender report.
if
(
packet
->
GetSenderReportCount
()
!=
0u
)
if
(
packet
->
HasSenderReport
()
)
{
// Ensure that the RTCP packet fits into the RTCP buffer.
if
(
packet
->
GetSize
()
>
RTC
::
RTCP
::
BufferSize
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论