Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
0d23c80c
提交
0d23c80c
authored
9月 12, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- RtpStream: remove probation stuff (not in use anyhow)
- NackGenerator: be less aggressive
上级
64f12fdd
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
20 行增加
和
53 行删除
+20
-53
Producer.hpp
worker/include/RTC/Producer.hpp
+1
-1
RtpStream.hpp
worker/include/RTC/RtpStream.hpp
+0
-1
Consumer.cpp
worker/src/RTC/Consumer.cpp
+1
-1
NackGenerator.cpp
worker/src/RTC/NackGenerator.cpp
+4
-4
Producer.cpp
worker/src/RTC/Producer.cpp
+4
-2
RtpParameters.cpp
worker/src/RTC/RtpDictionaries/RtpParameters.cpp
+2
-2
RtpStream.cpp
worker/src/RTC/RtpStream.cpp
+8
-42
没有找到文件。
worker/include/RTC/Producer.hpp
浏览文件 @
0d23c80c
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
#include "handles/Timer.hpp"
#include "handles/Timer.hpp"
#include <json/json.h>
#include <json/json.h>
#include <map>
#include <map>
#include <set>
#include <string>
#include <string>
#include <unordered_set>
#include <unordered_set>
#include <set>
#include <vector>
#include <vector>
namespace
RTC
namespace
RTC
...
...
worker/include/RTC/RtpStream.hpp
浏览文件 @
0d23c80c
...
@@ -66,7 +66,6 @@ namespace RTC
...
@@ -66,7 +66,6 @@ namespace RTC
uint32_t
cycles
{
0
};
// Shifted count of seq. number cycles.
uint32_t
cycles
{
0
};
// Shifted count of seq. number cycles.
uint32_t
baseSeq
{
0
};
// Base seq number.
uint32_t
baseSeq
{
0
};
// Base seq number.
uint32_t
badSeq
{
0
};
// Last 'bad' seq number + 1.
uint32_t
badSeq
{
0
};
// Last 'bad' seq number + 1.
uint32_t
probation
{
0
};
// Seq. packets till source is valid.
uint32_t
received
{
0
};
// Packets received.
uint32_t
received
{
0
};
// Packets received.
uint32_t
expectedPrior
{
0
};
// Packet expected at last interval.
uint32_t
expectedPrior
{
0
};
// Packet expected at last interval.
uint32_t
receivedPrior
{
0
};
// Packet received at last interval.
uint32_t
receivedPrior
{
0
};
// Packet received at last interval.
...
...
worker/src/RTC/Consumer.cpp
浏览文件 @
0d23c80c
...
@@ -359,7 +359,7 @@ namespace RTC
...
@@ -359,7 +359,7 @@ namespace RTC
if
(
packet
->
GetExtendedSequenceNumber
()
>
this
->
maxRecvExtendedSeqNum
)
if
(
packet
->
GetExtendedSequenceNumber
()
>
this
->
maxRecvExtendedSeqNum
)
{
{
this
->
maxRecvExtendedSeqNum
=
packet
->
GetExtendedSequenceNumber
();
this
->
maxRecvExtendedSeqNum
=
packet
->
GetExtendedSequenceNumber
();
this
->
maxRecvSeqNum
=
this
->
lastRecvSeqNum
;
this
->
maxRecvSeqNum
=
this
->
lastRecvSeqNum
;
}
}
// Rewrite packet SSRC.
// Rewrite packet SSRC.
...
...
worker/src/RTC/NackGenerator.cpp
浏览文件 @
0d23c80c
...
@@ -9,11 +9,11 @@ namespace RTC
...
@@ -9,11 +9,11 @@ namespace RTC
{
{
/* Static. */
/* Static. */
constexpr
uint32_t
MaxPacketAge
{
100
00
};
constexpr
uint32_t
MaxPacketAge
{
25
00
};
constexpr
size_t
MaxNackPackets
{
5
00
};
constexpr
size_t
MaxNackPackets
{
3
00
};
constexpr
uint32_t
DefaultRtt
{
100
};
constexpr
uint32_t
DefaultRtt
{
100
};
constexpr
uint8_t
MaxNackRetries
{
8
};
constexpr
uint8_t
MaxNackRetries
{
3
};
constexpr
uint64_t
TimerInterval
{
25
};
constexpr
uint64_t
TimerInterval
{
50
};
/* Instance methods. */
/* Instance methods. */
...
...
worker/src/RTC/Producer.cpp
浏览文件 @
0d23c80c
...
@@ -593,7 +593,7 @@ namespace RTC
...
@@ -593,7 +593,7 @@ namespace RTC
for
(
auto
&
kv
:
this
->
mapRtxStreams
)
for
(
auto
&
kv
:
this
->
mapRtxStreams
)
{
{
auto
rtxSsrc
=
kv
.
first
;
auto
rtxSsrc
=
kv
.
first
;
auto
*
mediaStream
=
kv
.
second
;
auto
*
mediaStream
=
kv
.
second
;
if
(
mediaStream
==
rtpStream
)
if
(
mediaStream
==
rtpStream
)
...
@@ -763,7 +763,9 @@ namespace RTC
...
@@ -763,7 +763,9 @@ namespace RTC
auto
rtpStreamRecv
=
static_cast
<
RtpStreamRecv
*>
(
rtpStream
);
auto
rtpStreamRecv
=
static_cast
<
RtpStreamRecv
*>
(
rtpStream
);
MS_ASSERT
(
this
->
profiles
.
find
(
rtpStreamRecv
)
!=
this
->
profiles
.
end
(),
"stream not present in profiles map"
);
MS_ASSERT
(
this
->
profiles
.
find
(
rtpStreamRecv
)
!=
this
->
profiles
.
end
(),
"stream not present in profiles map"
);
auto
&
profiles
=
this
->
profiles
[
rtpStreamRecv
];
auto
&
profiles
=
this
->
profiles
[
rtpStreamRecv
];
...
...
worker/src/RTC/RtpDictionaries/RtpParameters.cpp
浏览文件 @
0d23c80c
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
#include "Logger.hpp"
#include "Logger.hpp"
#include "MediaSoupError.hpp"
#include "MediaSoupError.hpp"
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpDictionaries.hpp"
#include <unordered_set>
#include <set>
#include <set>
#include <unordered_set>
namespace
RTC
namespace
RTC
{
{
...
@@ -305,7 +305,7 @@ namespace RTC
...
@@ -305,7 +305,7 @@ namespace RTC
for
(
auto
&
encoding
:
this
->
encodings
)
for
(
auto
&
encoding
:
this
->
encodings
)
{
{
auto
profile
=
encoding
.
profile
;
auto
profile
=
encoding
.
profile
;
auto
pair
=
profiles
.
insert
(
profile
);
auto
pair
=
profiles
.
insert
(
profile
);
if
(
!
pair
.
second
)
if
(
!
pair
.
second
)
MS_THROW_ERROR
(
"duplicated encoding.profile"
);
MS_THROW_ERROR
(
"duplicated encoding.profile"
);
...
...
worker/src/RTC/RtpStream.cpp
浏览文件 @
0d23c80c
...
@@ -10,9 +10,8 @@ namespace RTC
...
@@ -10,9 +10,8 @@ namespace RTC
{
{
/* Static. */
/* Static. */
static
constexpr
uint32_t
MinSequential
{
0
};
static
constexpr
uint16_t
MaxDropout
{
3000
};
static
constexpr
uint16_t
MaxDropout
{
3000
};
static
constexpr
uint16_t
MaxMisorder
{
1
00
};
static
constexpr
uint16_t
MaxMisorder
{
3
00
};
static
constexpr
uint32_t
RtpSeqMod
{
1
<<
16
};
static
constexpr
uint32_t
RtpSeqMod
{
1
<<
16
};
static
constexpr
uint16_t
HealthCheckPeriod
{
1000
};
static
constexpr
uint16_t
HealthCheckPeriod
{
1000
};
...
@@ -48,22 +47,18 @@ namespace RTC
...
@@ -48,22 +47,18 @@ namespace RTC
{
{
InitSeq
(
seq
);
InitSeq
(
seq
);
this
->
started
=
true
;
this
->
started
=
true
;
this
->
maxSeq
=
seq
-
1
;
this
->
maxSeq
=
seq
-
1
;
this
->
probation
=
MinSequential
;
}
}
// If not a valid packet ignore it.
// If not a valid packet ignore it.
if
(
!
UpdateSeq
(
packet
))
if
(
!
UpdateSeq
(
packet
))
{
{
if
(
this
->
probation
==
0u
)
MS_WARN_TAG
(
{
rtp
,
MS_WARN_TAG
(
"invalid packet [ssrc:%"
PRIu32
", seq:%"
PRIu16
"]"
,
rtp
,
packet
->
GetSsrc
(),
"invalid packet [ssrc:%"
PRIu32
", seq:%"
PRIu16
"]"
,
packet
->
GetSequenceNumber
());
packet
->
GetSsrc
(),
packet
->
GetSequenceNumber
());
}
return
false
;
return
false
;
}
}
...
@@ -103,35 +98,6 @@ namespace RTC
...
@@ -103,35 +98,6 @@ namespace RTC
uint16_t
seq
=
packet
->
GetSequenceNumber
();
uint16_t
seq
=
packet
->
GetSequenceNumber
();
uint16_t
udelta
=
seq
-
this
->
maxSeq
;
uint16_t
udelta
=
seq
-
this
->
maxSeq
;
/*
* Source is not valid until MinSequential packets with
* sequential sequence numbers have been received.
*/
if
(
this
->
probation
!=
0u
)
{
// Packet is in sequence.
if
(
seq
==
this
->
maxSeq
+
1
)
{
this
->
probation
--
;
this
->
maxSeq
=
seq
;
if
(
this
->
probation
==
0
)
{
InitSeq
(
seq
);
this
->
received
++
;
return
true
;
}
}
else
{
this
->
probation
=
MinSequential
-
1
;
this
->
maxSeq
=
seq
;
}
return
false
;
}
if
(
udelta
<
MaxDropout
)
if
(
udelta
<
MaxDropout
)
{
{
// In order, with permissible gap.
// In order, with permissible gap.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论