Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
b9f7a216
提交
b9f7a216
authored
5月 03, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RtpStreamSend: Testing new buffer design
上级
14dad1a1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
19 行增加
和
5 行删除
+19
-5
RtpStreamSend.hpp
worker/include/RTC/RtpStreamSend.hpp
+15
-3
RtpStreamSend.cpp
worker/src/RTC/RtpStreamSend.cpp
+0
-0
TestRtpStreamSend.cpp
worker/test/src/RTC/TestRtpStreamSend.cpp
+4
-2
没有找到文件。
worker/include/RTC/RtpStreamSend.hpp
浏览文件 @
b9f7a216
...
...
@@ -4,7 +4,6 @@
#include "Utils.hpp"
#include "RTC/RtpDataCounter.hpp"
#include "RTC/RtpStream.hpp"
#include <list>
#include <vector>
namespace
RTC
...
...
@@ -22,7 +21,6 @@ namespace RTC
public
:
struct
BufferItem
{
uint16_t
seq
{
0
};
// RTP seq.
RTC
::
RtpPacket
*
packet
{
nullptr
};
uint64_t
resentAtTime
{
0
};
// Last time this packet was resent.
uint8_t
sentTimes
{
0
};
// Number of times this packet was resent.
...
...
@@ -57,6 +55,8 @@ namespace RTC
private
:
void
StorePacket
(
RTC
::
RtpPacket
*
packet
);
void
ResetBufferItem
(
BufferItem
&
bufferItem
);
void
UpdateBufferStartIdx
();
void
ClearRetransmissionBuffer
();
void
FillRetransmissionContainer
(
uint16_t
seq
,
uint16_t
bitmask
);
void
UpdateScore
(
RTC
::
RTCP
::
ReceiverReport
*
report
);
...
...
@@ -64,8 +64,10 @@ namespace RTC
private
:
uint32_t
lostPrior
{
0
};
// Packets lost at last interval.
uint32_t
sentPrior
{
0
};
// Packets sent at last interval.
std
::
vector
<
BufferItem
>
buffer
;
uint16_t
bufferStartIdx
{
0
};
size_t
bufferSize
{
0
};
std
::
vector
<
StorageItem
>
storage
;
std
::
list
<
BufferItem
>
buffer
;
float
rtt
{
0
};
uint16_t
rtxSeq
{
0
};
RTC
::
RtpDataCounter
transmissionCounter
;
...
...
@@ -84,6 +86,16 @@ namespace RTC
{
return
this
->
transmissionCounter
.
GetBitrate
(
now
);
}
inline
void
RtpStreamSend
::
ResetBufferItem
(
BufferItem
&
bufferItem
)
{
delete
bufferItem
.
packet
;
bufferItem
.
packet
=
nullptr
;
bufferItem
.
resentAtTime
=
0
;
bufferItem
.
sentTimes
=
0
;
bufferItem
.
rtxEncoded
=
false
;
}
}
// namespace RTC
#endif
worker/src/RTC/RtpStreamSend.cpp
浏览文件 @
b9f7a216
差异被折叠。
点击展开。
worker/test/src/RTC/TestRtpStreamSend.cpp
浏览文件 @
b9f7a216
...
...
@@ -94,13 +94,15 @@ SCENARIO("NACK and RTP packets retransmission", "[rtp][rtcp]")
params
.
useNack
=
true
;
// Create a RtpStreamSend.
RtpStreamSend
*
stream
=
new
RtpStreamSend
(
&
testRtpStreamListener
,
params
,
200
);
RtpStreamSend
*
stream
=
new
RtpStreamSend
(
&
testRtpStreamListener
,
params
,
3
);
// Receive all the packets
in order into the stream
.
// Receive all the packets
(some of them not in order and/or duplicated)
.
stream
->
ReceivePacket
(
packet1
);
stream
->
ReceivePacket
(
packet3
);
stream
->
ReceivePacket
(
packet2
);
stream
->
ReceivePacket
(
packet3
);
stream
->
ReceivePacket
(
packet4
);
stream
->
ReceivePacket
(
packet4
);
stream
->
ReceivePacket
(
packet5
);
// Create a NACK item that request for all the packets.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论