Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
66b6c647
提交
66b6c647
authored
6月 26, 2019
作者:
José Luis Millán
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RTCP XR: cosmetic
上级
02ff3e80
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
19 行增加
和
22 行删除
+19
-22
XR.hpp
worker/include/RTC/RTCP/XR.hpp
+3
-3
XrDelaySinceLastRr.hpp
worker/include/RTC/RTCP/XrDelaySinceLastRr.hpp
+1
-2
XrReceiverReferenceTime.hpp
worker/include/RTC/RTCP/XrReceiverReferenceTime.hpp
+1
-1
XrReceiverReferenceTime.cpp
worker/src/RTC/RTCP/XrReceiverReferenceTime.cpp
+2
-3
Transport.cpp
worker/src/RTC/Transport.cpp
+2
-0
TestXr.cpp
worker/test/src/RTC/RTCP/TestXr.cpp
+10
-13
没有找到文件。
worker/include/RTC/RTCP/XR.hpp
浏览文件 @
66b6c647
...
@@ -64,7 +64,7 @@ namespace RTC
...
@@ -64,7 +64,7 @@ namespace RTC
CommonHeader
*
header
{
nullptr
};
CommonHeader
*
header
{
nullptr
};
private
:
private
:
uint8_t
raw
[
sizeof
(
CommonHeader
)]
{
0
}
;
uint8_t
raw
[
sizeof
(
CommonHeader
)];
};
};
class
ExtendedReportPacket
:
public
Packet
class
ExtendedReportPacket
:
public
Packet
...
@@ -82,7 +82,6 @@ namespace RTC
...
@@ -82,7 +82,6 @@ namespace RTC
void
AddReport
(
ExtendedReportBlock
*
report
);
void
AddReport
(
ExtendedReportBlock
*
report
);
uint32_t
GetSsrc
()
const
;
uint32_t
GetSsrc
()
const
;
void
SetSsrc
(
uint32_t
ssrc
);
void
SetSsrc
(
uint32_t
ssrc
);
Iterator
Begin
();
Iterator
Begin
();
Iterator
End
();
Iterator
End
();
...
@@ -103,7 +102,6 @@ namespace RTC
...
@@ -103,7 +102,6 @@ namespace RTC
inline
ExtendedReportBlock
::
ExtendedReportBlock
(
Type
type
)
:
type
(
type
)
inline
ExtendedReportBlock
::
ExtendedReportBlock
(
Type
type
)
:
type
(
type
)
{
{
this
->
header
=
reinterpret_cast
<
CommonHeader
*>
(
this
->
raw
);
this
->
header
=
reinterpret_cast
<
CommonHeader
*>
(
this
->
raw
);
;
this
->
header
->
reserved
=
0
;
this
->
header
->
reserved
=
0
;
}
}
...
@@ -154,7 +152,9 @@ namespace RTC
...
@@ -154,7 +152,9 @@ namespace RTC
size_t
size
=
sizeof
(
Packet
::
CommonHeader
)
+
sizeof
(
this
->
ssrc
);
size_t
size
=
sizeof
(
Packet
::
CommonHeader
)
+
sizeof
(
this
->
ssrc
);
for
(
auto
*
report
:
this
->
reports
)
for
(
auto
*
report
:
this
->
reports
)
{
size
+=
report
->
GetSize
();
size
+=
report
->
GetSize
();
}
return
size
;
return
size
;
}
}
...
...
worker/include/RTC/RTCP/XrDelaySinceLastRr.hpp
浏览文件 @
66b6c647
...
@@ -53,7 +53,6 @@ namespace RTC
...
@@ -53,7 +53,6 @@ namespace RTC
void
Dump
()
const
;
void
Dump
()
const
;
size_t
Serialize
(
uint8_t
*
buffer
);
size_t
Serialize
(
uint8_t
*
buffer
);
size_t
GetSize
()
const
;
size_t
GetSize
()
const
;
uint32_t
GetSsrc
()
const
;
uint32_t
GetSsrc
()
const
;
void
SetSsrc
(
uint32_t
ssrc
);
void
SetSsrc
(
uint32_t
ssrc
);
uint32_t
GetLastReceiverReport
()
const
;
uint32_t
GetLastReceiverReport
()
const
;
...
@@ -63,7 +62,7 @@ namespace RTC
...
@@ -63,7 +62,7 @@ namespace RTC
private
:
private
:
Body
*
body
{
nullptr
};
Body
*
body
{
nullptr
};
uint8_t
raw
[
sizeof
(
Body
)]
{
0
}
;
uint8_t
raw
[
sizeof
(
Body
)];
};
};
public
:
public
:
...
...
worker/include/RTC/RTCP/XrReceiverReferenceTime.hpp
浏览文件 @
66b6c647
...
@@ -53,7 +53,7 @@ namespace RTC
...
@@ -53,7 +53,7 @@ namespace RTC
private
:
private
:
Body
*
body
{
nullptr
};
Body
*
body
{
nullptr
};
uint8_t
raw
[
sizeof
(
Body
)]
{
0
}
;
uint8_t
raw
[
sizeof
(
Body
)];
};
};
/* Inline instance methods. */
/* Inline instance methods. */
...
...
worker/src/RTC/RTCP/XrReceiverReferenceTime.cpp
浏览文件 @
66b6c647
...
@@ -39,9 +39,8 @@ namespace RTC
...
@@ -39,9 +39,8 @@ namespace RTC
MS_DUMP
(
" block type : %"
PRIu8
,
this
->
type
);
MS_DUMP
(
" block type : %"
PRIu8
,
this
->
type
);
MS_DUMP
(
" reserved : 0"
);
MS_DUMP
(
" reserved : 0"
);
MS_DUMP
(
" length : 2"
);
MS_DUMP
(
" length : 2"
);
MS_DUMP
(
" ntp sec : %"
PRIu32
,
GetNtpSec
());
MS_DUMP
(
" ntp sec : %"
PRIu32
,
GetNtpSec
());
MS_DUMP
(
" ntp frac : %"
PRIu32
,
GetNtpFrac
());
MS_DUMP
(
" ntp frac : %"
PRIu32
,
GetNtpFrac
());
MS_DUMP
(
"</ReceiverReferenceTime>"
);
MS_DUMP
(
"</ReceiverReferenceTime>"
);
}
}
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
66b6c647
...
@@ -1100,7 +1100,9 @@ namespace RTC
...
@@ -1100,7 +1100,9 @@ namespace RTC
}
}
default
:
default
:
{
break
;
break
;
}
}
}
}
}
...
...
worker/test/src/RTC/RTCP/TestXr.cpp
浏览文件 @
66b6c647
...
@@ -29,7 +29,6 @@ SCENARIO("RTCP XrDelaySinceLastRt parsing", "[parser][rtcp][xr-dlrr]")
...
@@ -29,7 +29,6 @@ SCENARIO("RTCP XrDelaySinceLastRt parsing", "[parser][rtcp][xr-dlrr]")
auto
report2
=
ReceiverReferenceTime
::
Parse
(
bufferReport1
,
report1
->
GetSize
());
auto
report2
=
ReceiverReferenceTime
::
Parse
(
bufferReport1
,
report1
->
GetSize
());
REQUIRE
(
report1
->
GetType
()
==
report2
->
GetType
());
REQUIRE
(
report1
->
GetType
()
==
report2
->
GetType
());
REQUIRE
(
report1
->
GetNtpSec
()
==
report2
->
GetNtpSec
());
REQUIRE
(
report1
->
GetNtpSec
()
==
report2
->
GetNtpSec
());
REQUIRE
(
report1
->
GetNtpFrac
()
==
report2
->
GetNtpFrac
());
REQUIRE
(
report1
->
GetNtpFrac
()
==
report2
->
GetNtpFrac
());
...
@@ -44,12 +43,11 @@ SCENARIO("RTCP XrDelaySinceLastRt parsing", "[parser][rtcp][xr-dlrr]")
...
@@ -44,12 +43,11 @@ SCENARIO("RTCP XrDelaySinceLastRt parsing", "[parser][rtcp][xr-dlrr]")
REQUIRE
(
packet1
->
GetCount
()
==
0
);
REQUIRE
(
packet1
->
GetCount
()
==
0
);
REQUIRE
(
packet1
->
GetSsrc
()
==
2222
);
REQUIRE
(
packet1
->
GetSsrc
()
==
2222
);
/* Total size:
// Total size:
* - RTCP common header
// - RTCP common header
* - SSRC
// - SSRC
* - block 1
// - block 1
* - block 2
// - block 2
*/
REQUIRE
(
packet1
->
GetSize
()
==
4
+
4
+
12
+
12
);
REQUIRE
(
packet1
->
GetSize
()
==
4
+
4
+
12
+
12
);
// Serialize the packet into an external buffer.
// Serialize the packet into an external buffer.
...
@@ -118,12 +116,11 @@ SCENARIO("RTCP XrDelaySinceLastRt parsing", "[parser][rtcp][xr-dlrr]")
...
@@ -118,12 +116,11 @@ SCENARIO("RTCP XrDelaySinceLastRt parsing", "[parser][rtcp][xr-dlrr]")
REQUIRE
(
packet1
->
GetCount
()
==
0
);
REQUIRE
(
packet1
->
GetCount
()
==
0
);
REQUIRE
(
packet1
->
GetSsrc
()
==
2222
);
REQUIRE
(
packet1
->
GetSsrc
()
==
2222
);
/* Total size:
// Total size:
* - RTCP common header
// - RTCP common header
* - SSRC
// - SSRC
* - block 1
// - block 1
* - block 2
// - block 2
*/
REQUIRE
(
packet1
->
GetSize
()
==
4
+
4
+
16
+
16
);
REQUIRE
(
packet1
->
GetSize
()
==
4
+
4
+
16
+
16
);
// Serialize the packet into an external buffer.
// Serialize the packet into an external buffer.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论