Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
ce7751e2
提交
ce7751e2
authored
3月 21, 2023
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename RetransmissionBuffer to RtpRetransmissionBuffer
上级
626d3d90
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
43 行增加
和
42 行删除
+43
-42
RtpRetransmissionBuffer.hpp
worker/include/RTC/RtpRetransmissionBuffer.hpp
+3
-3
RtpStreamSend.hpp
worker/include/RTC/RtpStreamSend.hpp
+2
-2
meson.build
worker/meson.build
+2
-2
RtpRetransmissionBuffer.cpp
worker/src/RTC/RtpRetransmissionBuffer.cpp
+21
-20
RtpStreamSend.cpp
worker/src/RTC/RtpStreamSend.cpp
+2
-2
TestRtpRetransmissionBuffer.cpp
worker/test/src/RTC/TestRtpRetransmissionBuffer.cpp
+13
-13
没有找到文件。
worker/include/RTC/RetransmissionBuffer.hpp
→
worker/include/RTC/R
tpR
etransmissionBuffer.hpp
浏览文件 @
ce7751e2
...
@@ -11,7 +11,7 @@ namespace RTC
...
@@ -11,7 +11,7 @@ namespace RTC
// sequence number, while only taking as little memory as necessary to store
// sequence number, while only taking as little memory as necessary to store
// the range covering a maximum of `MaxRetransmissionDelayForVideoMs` or
// the range covering a maximum of `MaxRetransmissionDelayForVideoMs` or
// `MaxRetransmissionDelayForAudioMs` ms.
// `MaxRetransmissionDelayForAudioMs` ms.
class
RetransmissionBuffer
class
R
tpR
etransmissionBuffer
{
{
public
:
public
:
struct
Item
struct
Item
...
@@ -33,8 +33,8 @@ namespace RTC
...
@@ -33,8 +33,8 @@ namespace RTC
};
};
public
:
public
:
RetransmissionBuffer
(
uint16_t
maxItems
,
uint32_t
maxRetransmissionDelayMs
,
uint32_t
clockRate
);
R
tpR
etransmissionBuffer
(
uint16_t
maxItems
,
uint32_t
maxRetransmissionDelayMs
,
uint32_t
clockRate
);
~
RetransmissionBuffer
();
~
R
tpR
etransmissionBuffer
();
Item
*
Get
(
uint16_t
seq
)
const
;
Item
*
Get
(
uint16_t
seq
)
const
;
void
Insert
(
RTC
::
RtpPacket
*
packet
,
std
::
shared_ptr
<
RTC
::
RtpPacket
>&
sharedPacket
);
void
Insert
(
RTC
::
RtpPacket
*
packet
,
std
::
shared_ptr
<
RTC
::
RtpPacket
>&
sharedPacket
);
...
...
worker/include/RTC/RtpStreamSend.hpp
浏览文件 @
ce7751e2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#define MS_RTC_RTP_STREAM_SEND_HPP
#define MS_RTC_RTP_STREAM_SEND_HPP
#include "RTC/RateCalculator.hpp"
#include "RTC/RateCalculator.hpp"
#include "RTC/RetransmissionBuffer.hpp"
#include "RTC/R
tpR
etransmissionBuffer.hpp"
#include "RTC/RtpStream.hpp"
#include "RTC/RtpStream.hpp"
namespace
RTC
namespace
RTC
...
@@ -61,7 +61,7 @@ namespace RTC
...
@@ -61,7 +61,7 @@ namespace RTC
std
::
string
mid
;
std
::
string
mid
;
uint16_t
rtxSeq
{
0u
};
uint16_t
rtxSeq
{
0u
};
RTC
::
RtpDataCounter
transmissionCounter
;
RTC
::
RtpDataCounter
transmissionCounter
;
RTC
::
RetransmissionBuffer
*
retransmissionBuffer
{
nullptr
};
RTC
::
R
tpR
etransmissionBuffer
*
retransmissionBuffer
{
nullptr
};
// The middle 32 bits out of 64 in the NTP timestamp received in the most
// The middle 32 bits out of 64 in the NTP timestamp received in the most
// recent receiver reference timestamp.
// recent receiver reference timestamp.
uint32_t
lastRrTimestamp
{
0u
};
uint32_t
lastRrTimestamp
{
0u
};
...
...
worker/meson.build
浏览文件 @
ce7751e2
...
@@ -84,12 +84,12 @@ common_sources = [
...
@@ -84,12 +84,12 @@ common_sources = [
'src/RTC/PortManager.cpp',
'src/RTC/PortManager.cpp',
'src/RTC/Producer.cpp',
'src/RTC/Producer.cpp',
'src/RTC/RateCalculator.cpp',
'src/RTC/RateCalculator.cpp',
'src/RTC/RetransmissionBuffer.cpp',
'src/RTC/Router.cpp',
'src/RTC/Router.cpp',
'src/RTC/RtpListener.cpp',
'src/RTC/RtpListener.cpp',
'src/RTC/RtpObserver.cpp',
'src/RTC/RtpObserver.cpp',
'src/RTC/RtpPacket.cpp',
'src/RTC/RtpPacket.cpp',
'src/RTC/RtpProbationGenerator.cpp',
'src/RTC/RtpProbationGenerator.cpp',
'src/RTC/RtpRetransmissionBuffer.cpp',
'src/RTC/RtpStream.cpp',
'src/RTC/RtpStream.cpp',
'src/RTC/RtpStreamRecv.cpp',
'src/RTC/RtpStreamRecv.cpp',
'src/RTC/RtpStreamSend.cpp',
'src/RTC/RtpStreamSend.cpp',
...
@@ -288,9 +288,9 @@ mediasoup_worker_test = executable(
...
@@ -288,9 +288,9 @@ mediasoup_worker_test = executable(
'test/src/RTC/TestKeyFrameRequestManager.cpp',
'test/src/RTC/TestKeyFrameRequestManager.cpp',
'test/src/RTC/TestNackGenerator.cpp',
'test/src/RTC/TestNackGenerator.cpp',
'test/src/RTC/TestRateCalculator.cpp',
'test/src/RTC/TestRateCalculator.cpp',
'test/src/RTC/TestRetransmissionBuffer.cpp',
'test/src/RTC/TestRtpPacket.cpp',
'test/src/RTC/TestRtpPacket.cpp',
'test/src/RTC/TestRtpPacketH264Svc.cpp',
'test/src/RTC/TestRtpPacketH264Svc.cpp',
'test/src/RTC/TestRtpRetransmissionBuffer.cpp',
'test/src/RTC/TestRtpStreamSend.cpp',
'test/src/RTC/TestRtpStreamSend.cpp',
'test/src/RTC/TestRtpStreamRecv.cpp',
'test/src/RTC/TestRtpStreamRecv.cpp',
'test/src/RTC/TestSeqManager.cpp',
'test/src/RTC/TestSeqManager.cpp',
...
...
worker/src/RTC/RetransmissionBuffer.cpp
→
worker/src/RTC/R
tpR
etransmissionBuffer.cpp
浏览文件 @
ce7751e2
#define MS_CLASS "RTC::RetransmissionBuffer"
#define MS_CLASS "RTC::R
tpR
etransmissionBuffer"
// #define MS_LOG_DEV_LEVEL 3
// #define MS_LOG_DEV_LEVEL 3
#include "RTC/RetransmissionBuffer.hpp"
#include "RTC/R
tpR
etransmissionBuffer.hpp"
#include "Logger.hpp"
#include "Logger.hpp"
#include "RTC/SeqManager.hpp"
#include "RTC/SeqManager.hpp"
...
@@ -9,7 +9,7 @@ namespace RTC
...
@@ -9,7 +9,7 @@ namespace RTC
{
{
/* Instance methods. */
/* Instance methods. */
R
etransmissionBuffer
::
RetransmissionBuffer
(
R
tpRetransmissionBuffer
::
Rtp
RetransmissionBuffer
(
uint16_t
maxItems
,
uint32_t
maxRetransmissionDelayMs
,
uint32_t
clockRate
)
uint16_t
maxItems
,
uint32_t
maxRetransmissionDelayMs
,
uint32_t
clockRate
)
:
maxItems
(
maxItems
),
maxRetransmissionDelayMs
(
maxRetransmissionDelayMs
),
clockRate
(
clockRate
)
:
maxItems
(
maxItems
),
maxRetransmissionDelayMs
(
maxRetransmissionDelayMs
),
clockRate
(
clockRate
)
{
{
...
@@ -18,14 +18,14 @@ namespace RTC
...
@@ -18,14 +18,14 @@ namespace RTC
MS_ASSERT
(
maxItems
>
0u
,
"maxItems must be greater than 0"
);
MS_ASSERT
(
maxItems
>
0u
,
"maxItems must be greater than 0"
);
}
}
R
etransmissionBuffer
::~
RetransmissionBuffer
()
R
tpRetransmissionBuffer
::~
Rtp
RetransmissionBuffer
()
{
{
MS_TRACE
();
MS_TRACE
();
Clear
();
Clear
();
}
}
R
etransmissionBuffer
::
Item
*
RetransmissionBuffer
::
Get
(
uint16_t
seq
)
const
R
tpRetransmissionBuffer
::
Item
*
Rtp
RetransmissionBuffer
::
Get
(
uint16_t
seq
)
const
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -56,7 +56,8 @@ namespace RTC
...
@@ -56,7 +56,8 @@ namespace RTC
* not properly fit (by ensuring that elements in the buffer are not only
* not properly fit (by ensuring that elements in the buffer are not only
* ordered by increasing seq but also that their timestamp are incremental).
* ordered by increasing seq but also that their timestamp are incremental).
*/
*/
void
RetransmissionBuffer
::
Insert
(
RTC
::
RtpPacket
*
packet
,
std
::
shared_ptr
<
RTC
::
RtpPacket
>&
sharedPacket
)
void
RtpRetransmissionBuffer
::
Insert
(
RTC
::
RtpPacket
*
packet
,
std
::
shared_ptr
<
RTC
::
RtpPacket
>&
sharedPacket
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -331,7 +332,7 @@ namespace RTC
...
@@ -331,7 +332,7 @@ namespace RTC
this
->
maxItems
);
this
->
maxItems
);
}
}
void
RetransmissionBuffer
::
Clear
()
void
R
tpR
etransmissionBuffer
::
Clear
()
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -352,11 +353,11 @@ namespace RTC
...
@@ -352,11 +353,11 @@ namespace RTC
this
->
startSeq
=
0u
;
this
->
startSeq
=
0u
;
}
}
void
RetransmissionBuffer
::
Dump
()
const
void
R
tpR
etransmissionBuffer
::
Dump
()
const
{
{
MS_TRACE
();
MS_TRACE
();
MS_DUMP
(
"<RetransmissionBuffer>"
);
MS_DUMP
(
"<R
tpR
etransmissionBuffer>"
);
MS_DUMP
(
" buffer [size:%zu, maxSize:%"
PRIu16
"]"
,
this
->
buffer
.
size
(),
this
->
maxItems
);
MS_DUMP
(
" buffer [size:%zu, maxSize:%"
PRIu16
"]"
,
this
->
buffer
.
size
(),
this
->
maxItems
);
if
(
this
->
buffer
.
size
()
>
0
)
if
(
this
->
buffer
.
size
()
>
0
)
{
{
...
@@ -376,24 +377,24 @@ namespace RTC
...
@@ -376,24 +377,24 @@ namespace RTC
static_cast
<
uint32_t
>
(
newestItem
->
timestamp
*
1000
/
this
->
clockRate
)
-
static_cast
<
uint32_t
>
(
newestItem
->
timestamp
*
1000
/
this
->
clockRate
)
-
static_cast
<
uint32_t
>
(
oldestItem
->
timestamp
*
1000
/
this
->
clockRate
));
static_cast
<
uint32_t
>
(
oldestItem
->
timestamp
*
1000
/
this
->
clockRate
));
}
}
MS_DUMP
(
"</RetransmissionBuffer>"
);
MS_DUMP
(
"</R
tpR
etransmissionBuffer>"
);
}
}
R
etransmissionBuffer
::
Item
*
RetransmissionBuffer
::
GetOldest
()
const
R
tpRetransmissionBuffer
::
Item
*
Rtp
RetransmissionBuffer
::
GetOldest
()
const
{
{
MS_TRACE
();
MS_TRACE
();
return
this
->
Get
(
this
->
startSeq
);
return
this
->
Get
(
this
->
startSeq
);
}
}
R
etransmissionBuffer
::
Item
*
RetransmissionBuffer
::
GetNewest
()
const
R
tpRetransmissionBuffer
::
Item
*
Rtp
RetransmissionBuffer
::
GetNewest
()
const
{
{
MS_TRACE
();
MS_TRACE
();
return
this
->
Get
(
this
->
startSeq
+
this
->
buffer
.
size
()
-
1
);
return
this
->
Get
(
this
->
startSeq
+
this
->
buffer
.
size
()
-
1
);
}
}
void
RetransmissionBuffer
::
RemoveOldest
()
void
R
tpR
etransmissionBuffer
::
RemoveOldest
()
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -438,7 +439,7 @@ namespace RTC
...
@@ -438,7 +439,7 @@ namespace RTC
}
}
}
}
void
RetransmissionBuffer
::
RemoveOldest
(
uint16_t
numItems
)
void
R
tpR
etransmissionBuffer
::
RemoveOldest
(
uint16_t
numItems
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -457,7 +458,7 @@ namespace RTC
...
@@ -457,7 +458,7 @@ namespace RTC
}
}
}
}
void
RetransmissionBuffer
::
ClearTooOld
()
void
R
tpR
etransmissionBuffer
::
ClearTooOld
()
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -468,7 +469,7 @@ namespace RTC
...
@@ -468,7 +469,7 @@ namespace RTC
return
;
return
;
}
}
RetransmissionBuffer
::
Item
*
oldestItem
{
nullptr
};
R
tpR
etransmissionBuffer
::
Item
*
oldestItem
{
nullptr
};
// Go through all buffer items starting with the first and free all items
// Go through all buffer items starting with the first and free all items
// that contain too old packets.
// that contain too old packets.
...
@@ -487,7 +488,7 @@ namespace RTC
...
@@ -487,7 +488,7 @@ namespace RTC
}
}
}
}
bool
RetransmissionBuffer
::
IsTooOld
(
uint32_t
timestamp
,
uint32_t
newestTimestamp
)
const
bool
R
tpR
etransmissionBuffer
::
IsTooOld
(
uint32_t
timestamp
,
uint32_t
newestTimestamp
)
const
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -501,8 +502,8 @@ namespace RTC
...
@@ -501,8 +502,8 @@ namespace RTC
return
static_cast
<
uint32_t
>
(
diffTs
*
1000
/
this
->
clockRate
)
>
this
->
maxRetransmissionDelayMs
;
return
static_cast
<
uint32_t
>
(
diffTs
*
1000
/
this
->
clockRate
)
>
this
->
maxRetransmissionDelayMs
;
}
}
R
etransmissionBuffer
::
Item
*
RetransmissionBuffer
::
FillItem
(
R
tpRetransmissionBuffer
::
Item
*
Rtp
RetransmissionBuffer
::
FillItem
(
RetransmissionBuffer
::
Item
*
item
,
R
tpR
etransmissionBuffer
::
Item
*
item
,
RTC
::
RtpPacket
*
packet
,
RTC
::
RtpPacket
*
packet
,
std
::
shared_ptr
<
RTC
::
RtpPacket
>&
sharedPacket
)
const
std
::
shared_ptr
<
RTC
::
RtpPacket
>&
sharedPacket
)
const
{
{
...
@@ -530,7 +531,7 @@ namespace RTC
...
@@ -530,7 +531,7 @@ namespace RTC
return
item
;
return
item
;
}
}
void
RetransmissionBuffer
::
Item
::
Reset
()
void
R
tpR
etransmissionBuffer
::
Item
::
Reset
()
{
{
MS_TRACE
();
MS_TRACE
();
...
...
worker/src/RTC/RtpStreamSend.cpp
浏览文件 @
ce7751e2
...
@@ -15,7 +15,7 @@ namespace RTC
...
@@ -15,7 +15,7 @@ namespace RTC
static
constexpr
size_t
RetransmissionBufferMaxItems
{
2500u
};
static
constexpr
size_t
RetransmissionBufferMaxItems
{
2500u
};
// 17: 16 bit mask + the initial sequence number.
// 17: 16 bit mask + the initial sequence number.
static
constexpr
size_t
MaxRequestedPackets
{
17u
};
static
constexpr
size_t
MaxRequestedPackets
{
17u
};
thread_local
static
std
::
vector
<
RTC
::
RetransmissionBuffer
::
Item
*>
RetransmissionContainer
(
thread_local
static
std
::
vector
<
RTC
::
R
tpR
etransmissionBuffer
::
Item
*>
RetransmissionContainer
(
MaxRequestedPackets
+
1
);
MaxRequestedPackets
+
1
);
static
constexpr
uint32_t
DefaultRtt
{
100u
};
static
constexpr
uint32_t
DefaultRtt
{
100u
};
...
@@ -58,7 +58,7 @@ namespace RTC
...
@@ -58,7 +58,7 @@ namespace RTC
}
}
}
}
this
->
retransmissionBuffer
=
new
RTC
::
RetransmissionBuffer
(
this
->
retransmissionBuffer
=
new
RTC
::
R
tpR
etransmissionBuffer
(
RetransmissionBufferMaxItems
,
maxRetransmissionDelayMs
,
params
.
clockRate
);
RetransmissionBufferMaxItems
,
maxRetransmissionDelayMs
,
params
.
clockRate
);
}
}
}
}
...
...
worker/test/src/RTC/TestRetransmissionBuffer.cpp
→
worker/test/src/RTC/TestR
tpR
etransmissionBuffer.cpp
浏览文件 @
ce7751e2
#include "common.hpp"
#include "common.hpp"
#include "RTC/RetransmissionBuffer.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpRetransmissionBuffer.hpp"
#include <catch2/catch.hpp>
#include <catch2/catch.hpp>
#include <vector>
#include <vector>
using
namespace
RTC
;
using
namespace
RTC
;
// Class inheriting from RetransmissionBuffer so we can access its protected
// Class inheriting from R
tpR
etransmissionBuffer so we can access its protected
// buffer member.
// buffer member.
class
MyRetransmissionBuffer
:
public
RetransmissionBuffer
class
RtpMyRetransmissionBuffer
:
public
Rtp
RetransmissionBuffer
{
{
public
:
public
:
struct
VerificationItem
struct
VerificationItem
...
@@ -19,8 +19,8 @@ public:
...
@@ -19,8 +19,8 @@ public:
};
};
public
:
public
:
MyRetransmissionBuffer
(
uint16_t
maxItems
,
uint32_t
maxRetransmissionDelayMs
,
uint32_t
clockRate
)
Rtp
MyRetransmissionBuffer
(
uint16_t
maxItems
,
uint32_t
maxRetransmissionDelayMs
,
uint32_t
clockRate
)
:
RetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
)
:
R
tpR
etransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
)
{
{
}
}
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
std
::
shared_ptr
<
RtpPacket
>
sharedPacket
;
std
::
shared_ptr
<
RtpPacket
>
sharedPacket
;
RetransmissionBuffer
::
Insert
(
packet
,
sharedPacket
);
R
tpR
etransmissionBuffer
::
Insert
(
packet
,
sharedPacket
);
}
}
void
AssertBuffer
(
std
::
vector
<
VerificationItem
>
verificationBuffer
)
void
AssertBuffer
(
std
::
vector
<
VerificationItem
>
verificationBuffer
)
...
@@ -66,7 +66,7 @@ public:
...
@@ -66,7 +66,7 @@ public:
}
}
};
};
SCENARIO
(
"RetransmissionBuffer"
,
"[rtp][rtx]"
)
SCENARIO
(
"R
tpR
etransmissionBuffer"
,
"[rtp][rtx]"
)
{
{
SECTION
(
"proper packets received in order"
)
SECTION
(
"proper packets received in order"
)
{
{
...
@@ -74,7 +74,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
...
@@ -74,7 +74,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
clockRate
{
90000
};
uint32_t
clockRate
{
90000
};
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
Rtp
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
myRetransmissionBuffer
.
Insert
(
10001
,
1000000000
);
myRetransmissionBuffer
.
Insert
(
10001
,
1000000000
);
myRetransmissionBuffer
.
Insert
(
10002
,
1000000000
);
myRetransmissionBuffer
.
Insert
(
10002
,
1000000000
);
...
@@ -99,7 +99,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
...
@@ -99,7 +99,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
clockRate
{
90000
};
uint32_t
clockRate
{
90000
};
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
Rtp
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
myRetransmissionBuffer
.
Insert
(
20004
,
2000000200
);
myRetransmissionBuffer
.
Insert
(
20004
,
2000000200
);
myRetransmissionBuffer
.
Insert
(
20001
,
2000000000
);
myRetransmissionBuffer
.
Insert
(
20001
,
2000000000
);
...
@@ -124,7 +124,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
...
@@ -124,7 +124,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
clockRate
{
90000
};
uint32_t
clockRate
{
90000
};
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
Rtp
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
myRetransmissionBuffer
.
Insert
(
30001
,
3000000000
);
myRetransmissionBuffer
.
Insert
(
30001
,
3000000000
);
myRetransmissionBuffer
.
Insert
(
30002
,
3000000000
);
myRetransmissionBuffer
.
Insert
(
30002
,
3000000000
);
...
@@ -146,7 +146,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
...
@@ -146,7 +146,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
clockRate
{
90000
};
uint32_t
clockRate
{
90000
};
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
Rtp
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
myRetransmissionBuffer
.
Insert
(
40002
,
4000000002
);
myRetransmissionBuffer
.
Insert
(
40002
,
4000000002
);
// Packet must be discarded since its timestamp is lower than in seq 40002.
// Packet must be discarded since its timestamp is lower than in seq 40002.
...
@@ -184,7 +184,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
...
@@ -184,7 +184,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
clockRate
{
90000
};
uint32_t
clockRate
{
90000
};
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
Rtp
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
myRetransmissionBuffer
.
Insert
(
10001
,
1000000001
);
myRetransmissionBuffer
.
Insert
(
10001
,
1000000001
);
myRetransmissionBuffer
.
Insert
(
10002
,
1000000002
);
myRetransmissionBuffer
.
Insert
(
10002
,
1000000002
);
...
@@ -209,7 +209,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
...
@@ -209,7 +209,7 @@ SCENARIO("RetransmissionBuffer", "[rtp][rtx]")
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
maxRetransmissionDelayMs
{
2000u
};
uint32_t
clockRate
{
90000
};
uint32_t
clockRate
{
90000
};
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
Rtp
MyRetransmissionBuffer
myRetransmissionBuffer
(
maxItems
,
maxRetransmissionDelayMs
,
clockRate
);
auto
maxDiffTs
=
static_cast
<
uint32_t
>
(
maxRetransmissionDelayMs
*
clockRate
/
1000
);
auto
maxDiffTs
=
static_cast
<
uint32_t
>
(
maxRetransmissionDelayMs
*
clockRate
/
1000
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论