Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
e176a2b3
提交
e176a2b3
authored
10月 01, 2017
作者:
José Luis Millán
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tests: gulp format
上级
0b447b04
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
68 行增加
和
47 行删除
+68
-47
test-bitrate.cpp
worker/test/test-bitrate.cpp
+1
-1
test-nack-generator.cpp
worker/test/test-nack-generator.cpp
+33
-13
test-nack.cpp
worker/test/test-nack.cpp
+2
-2
test-rtcp.cpp
worker/test/test-rtcp.cpp
+14
-15
test-rtp.cpp
worker/test/test-rtp.cpp
+5
-4
test-rtpstreamrecv.cpp
worker/test/test-rtpstreamrecv.cpp
+4
-4
test-seqmanager.cpp
worker/test/test-seqmanager.cpp
+5
-4
tests.cpp
worker/test/tests.cpp
+4
-4
没有找到文件。
worker/test/test-bitrate.cpp
浏览文件 @
e176a2b3
#include "include/catch.hpp"
#include "common.hpp"
#include "common.hpp"
#include "DepLibUV.hpp"
#include "DepLibUV.hpp"
#include "include/catch.hpp"
#include "RTC/RtpDataCounter.hpp"
#include "RTC/RtpDataCounter.hpp"
#include <vector>
#include <vector>
...
...
worker/test/test-nack-generator.cpp
浏览文件 @
e176a2b3
#include "include/catch.hpp"
#include "common.hpp"
#include "common.hpp"
#include "
RTC/NackGenerator
.hpp"
#include "
include/catch
.hpp"
#include "RTC/Codecs/PayloadDescriptorHandler.hpp"
#include "RTC/Codecs/PayloadDescriptorHandler.hpp"
#include "RTC/NackGenerator.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpPacket.hpp"
#include <vector>
#include <vector>
...
@@ -10,9 +10,17 @@ using namespace RTC;
...
@@ -10,9 +10,17 @@ using namespace RTC;
struct
TestNackGeneratorInput
struct
TestNackGeneratorInput
{
{
TestNackGeneratorInput
()
=
default
;
TestNackGeneratorInput
()
=
default
;
TestNackGeneratorInput
(
uint16_t
seq
,
bool
isKeyFrame
,
uint16_t
firstNacked
,
size_t
numNacked
,
bool
keyFrameRequired
=
false
,
size_t
nackListSize
=
0
)
TestNackGeneratorInput
(
:
seq
(
seq
),
isKeyFrame
(
isKeyFrame
),
firstNacked
(
firstNacked
),
numNacked
(
numNacked
),
keyFrameRequired
(
keyFrameRequired
),
nackListSize
(
nackListSize
)
uint16_t
seq
,
{}
bool
isKeyFrame
,
uint16_t
firstNacked
,
size_t
numNacked
,
bool
keyFrameRequired
=
false
,
size_t
nackListSize
=
0
)
:
seq
(
seq
),
isKeyFrame
(
isKeyFrame
),
firstNacked
(
firstNacked
),
numNacked
(
numNacked
),
keyFrameRequired
(
keyFrameRequired
),
nackListSize
(
nackListSize
)
{
}
uint16_t
seq
{
0
};
uint16_t
seq
{
0
};
bool
isKeyFrame
{
false
};
bool
isKeyFrame
{
false
};
...
@@ -24,16 +32,28 @@ struct TestNackGeneratorInput
...
@@ -24,16 +32,28 @@ struct TestNackGeneratorInput
class
TestPayloadDescriptorHandler
:
public
RTC
::
Codecs
::
PayloadDescriptorHandler
class
TestPayloadDescriptorHandler
:
public
RTC
::
Codecs
::
PayloadDescriptorHandler
{
{
public
:
public
:
TestPayloadDescriptorHandler
(
bool
isKeyFrame
)
:
isKeyFrame
(
isKeyFrame
)
{};
TestPayloadDescriptorHandler
(
bool
isKeyFrame
)
:
isKeyFrame
(
isKeyFrame
)
{};
~
TestPayloadDescriptorHandler
()
=
default
;
~
TestPayloadDescriptorHandler
()
=
default
;
void
Dump
()
const
{
return
;
};
void
Dump
()
const
void
Encode
(
RTC
::
Codecs
::
EncodingContext
*
/*context*/
,
uint8_t
*
/*data*/
)
{
return
;
};
{
void
Restore
(
uint8_t
*
/*data*/
)
{
return
;
};
return
;
bool
IsKeyFrame
()
const
{
return
this
->
isKeyFrame
;
};
};
void
Encode
(
RTC
::
Codecs
::
EncodingContext
*
/*context*/
,
uint8_t
*
/*data*/
)
{
return
;
};
void
Restore
(
uint8_t
*
/*data*/
)
{
return
;
};
bool
IsKeyFrame
()
const
{
return
this
->
isKeyFrame
;
};
private
:
private
:
bool
isKeyFrame
{
false
};
bool
isKeyFrame
{
false
};
};
};
class
TestNackGeneratorListener
:
public
NackGenerator
::
Listener
class
TestNackGeneratorListener
:
public
NackGenerator
::
Listener
...
...
worker/test/test-nack.cpp
浏览文件 @
e176a2b3
#include "include/catch.hpp"
#include "common.hpp"
#include "common.hpp"
#include "
RTC/RtpPacket
.hpp"
#include "
include/catch
.hpp"
#include "RTC/RTCP/FeedbackRtpNack.hpp"
#include "RTC/RTCP/FeedbackRtpNack.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpStream.hpp"
#include "RTC/RtpStream.hpp"
#include "RTC/RtpStreamSend.hpp"
#include "RTC/RtpStreamSend.hpp"
#include <vector>
#include <vector>
...
...
worker/test/test-rtcp.cpp
浏览文件 @
e176a2b3
#include "common.hpp"
#include "include/catch.hpp"
#include "include/catch.hpp"
#include "include/helpers.hpp"
#include "include/helpers.hpp"
#include "common.hpp"
#include "RTC/RTCP/Packet.hpp"
#include "RTC/RTCP/Sdes.hpp"
#include "RTC/RTCP/SenderReport.hpp"
#include "RTC/RTCP/ReceiverReport.hpp"
#include "RTC/RTCP/Bye.hpp"
#include "RTC/RTCP/Bye.hpp"
#include "RTC/RTCP/FeedbackRtpNack.hpp"
#include "RTC/RTCP/FeedbackPsAfb.hpp"
#include "RTC/RTCP/FeedbackRtpTmmb.hpp"
#include "RTC/RTCP/FeedbackRtpTllei.hpp"
#include "RTC/RTCP/FeedbackRtpEcn.hpp"
#include "RTC/RTCP/FeedbackPsSli.hpp"
#include "RTC/RTCP/FeedbackPsRpsi.hpp"
#include "RTC/RTCP/FeedbackPsFir.hpp"
#include "RTC/RTCP/FeedbackPsFir.hpp"
#include "RTC/RTCP/FeedbackPsTst.hpp"
#include "RTC/RTCP/FeedbackPsVbcm.hpp"
#include "RTC/RTCP/FeedbackPsLei.hpp"
#include "RTC/RTCP/FeedbackPsLei.hpp"
#include "RTC/RTCP/FeedbackPsAfb.hpp"
#include "RTC/RTCP/FeedbackPsRemb.hpp"
#include "RTC/RTCP/FeedbackPsRemb.hpp"
#include "RTC/RTCP/FeedbackPsRpsi.hpp"
#include "RTC/RTCP/FeedbackPsSli.hpp"
#include "RTC/RTCP/FeedbackPsTst.hpp"
#include "RTC/RTCP/FeedbackPsVbcm.hpp"
#include "RTC/RTCP/FeedbackRtpEcn.hpp"
#include "RTC/RTCP/FeedbackRtpNack.hpp"
#include "RTC/RTCP/FeedbackRtpTllei.hpp"
#include "RTC/RTCP/FeedbackRtpTmmb.hpp"
#include "RTC/RTCP/Packet.hpp"
#include "RTC/RTCP/ReceiverReport.hpp"
#include "RTC/RTCP/Sdes.hpp"
#include "RTC/RTCP/SenderReport.hpp"
#include <string>
#include <string>
using
namespace
RTC
::
RTCP
;
using
namespace
RTC
::
RTCP
;
...
@@ -342,7 +342,6 @@ SCENARIO("parse RTCP packets", "[parser][rtcp]")
...
@@ -342,7 +342,6 @@ SCENARIO("parse RTCP packets", "[parser][rtcp]")
auto
rIt
=
rr
->
Begin
();
auto
rIt
=
rr
->
Begin
();
auto
rReport
=
*
rIt
;
auto
rReport
=
*
rIt
;
ssrc
=
0x01932db4
;
ssrc
=
0x01932db4
;
auto
fractionLost
=
0
;
auto
fractionLost
=
0
;
auto
totalLost
=
1
;
auto
totalLost
=
1
;
...
...
worker/test/test-rtp.cpp
浏览文件 @
e176a2b3
#include "common.hpp"
#include "include/catch.hpp"
#include "include/catch.hpp"
#include "include/helpers.hpp"
#include "include/helpers.hpp"
#include "common.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpDictionaries.hpp"
#include
<map>
#include
"RTC/RtpPacket.hpp"
#include <cstring> // std::memcmp()
#include <cstring> // std::memcmp()
#include <map>
using
namespace
RTC
;
using
namespace
RTC
;
...
@@ -182,7 +182,8 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
...
@@ -182,7 +182,8 @@ SCENARIO("parse RTP packets", "[parser][rtp]")
REQUIRE
(
clonedPacket
->
ReadAbsSendTime
(
&
absSendTime
)
==
true
);
REQUIRE
(
clonedPacket
->
ReadAbsSendTime
(
&
absSendTime
)
==
true
);
REQUIRE
(
absSendTime
==
0x65341e
);
REQUIRE
(
absSendTime
==
0x65341e
);
REQUIRE
(
std
::
memcmp
(
clonedPacket
->
GetPayload
(),
packet
->
GetPayload
(),
packet
->
GetPayloadLength
())
==
0
);
REQUIRE
(
std
::
memcmp
(
clonedPacket
->
GetPayload
(),
packet
->
GetPayload
(),
packet
->
GetPayloadLength
())
==
0
);
delete
clonedPacket
;
delete
clonedPacket
;
}
}
...
...
worker/test/test-rtpstreamrecv.cpp
浏览文件 @
e176a2b3
#include "common.hpp"
#include "include/catch.hpp"
#include "include/catch.hpp"
#include "include/helpers.hpp"
#include "include/helpers.hpp"
#include "common.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpStream.hpp"
#include "RTC/RtpStream.hpp"
#include "RTC/RtpStreamRecv.hpp"
#include "RTC/RtpStreamRecv.hpp"
...
@@ -10,8 +10,7 @@ using namespace RTC;
...
@@ -10,8 +10,7 @@ using namespace RTC;
SCENARIO
(
"receive RTP packets and trigger NACK"
,
"[rtp][rtpstream]"
)
SCENARIO
(
"receive RTP packets and trigger NACK"
,
"[rtp][rtpstream]"
)
{
{
class
RtpStreamRecvListener
:
class
RtpStreamRecvListener
:
public
RtpStreamRecv
::
Listener
public
RtpStreamRecv
::
Listener
{
{
public
:
public
:
virtual
void
OnRtpStreamDied
(
RTC
::
RtpStream
*
rtpStream
)
override
virtual
void
OnRtpStreamDied
(
RTC
::
RtpStream
*
rtpStream
)
override
...
@@ -26,7 +25,8 @@ SCENARIO("receive RTP packets and trigger NACK", "[rtp][rtpstream]")
...
@@ -26,7 +25,8 @@ SCENARIO("receive RTP packets and trigger NACK", "[rtp][rtpstream]")
{
{
}
}
virtual
void
OnRtpStreamRecvNackRequired
(
RTC
::
RtpStreamRecv
*
rtpStream
,
const
std
::
vector
<
uint16_t
>&
seqNumbers
)
override
virtual
void
OnRtpStreamRecvNackRequired
(
RTC
::
RtpStreamRecv
*
rtpStream
,
const
std
::
vector
<
uint16_t
>&
seqNumbers
)
override
{
{
INFO
(
"NACK required"
);
INFO
(
"NACK required"
);
...
...
worker/test/test-seqmanager.cpp
浏览文件 @
e176a2b3
#include "include/catch.hpp"
#include "common.hpp"
#include "common.hpp"
#include
<vector>
#include
"include/catch.hpp"
#include "RTC/SeqManager.hpp"
#include "RTC/SeqManager.hpp"
#include <vector>
using
namespace
RTC
;
using
namespace
RTC
;
struct
TestSeqManagerInput
struct
TestSeqManagerInput
{
{
TestSeqManagerInput
(
uint16_t
input
,
uint16_t
output
,
bool
sync
=
false
,
bool
drop
=
false
)
TestSeqManagerInput
(
uint16_t
input
,
uint16_t
output
,
bool
sync
=
false
,
bool
drop
=
false
)
:
input
(
input
),
output
(
output
),
sync
(
sync
),
drop
(
drop
)
:
input
(
input
),
output
(
output
),
sync
(
sync
),
drop
(
drop
)
{}
{
}
uint16_t
input
{
0
};
uint16_t
input
{
0
};
uint16_t
output
{
0
};
uint16_t
output
{
0
};
...
...
worker/test/tests.cpp
浏览文件 @
e176a2b3
#define CATCH_CONFIG_RUNNER
#define CATCH_CONFIG_RUNNER
#include "include/catch.hpp"
#include "Settings.hpp"
#include "LogLevel.hpp"
#include "Logger.hpp"
#include "DepLibUV.hpp"
#include "DepLibUV.hpp"
#include "DepOpenSSL.hpp"
#include "DepOpenSSL.hpp"
#include "LogLevel.hpp"
#include "Logger.hpp"
#include "Settings.hpp"
#include "Utils.hpp"
#include "Utils.hpp"
#include "include/catch.hpp"
#include <string>
#include <string>
static
void
init
();
static
void
init
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论