Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
b9a26d80
提交
b9a26d80
authored
9月 14, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NackGenerator: upon key frame receipt remove older items in the NACK list.
上级
0fdd6356
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
40 行增加
和
7 行删除
+40
-7
Codecs.hpp
worker/include/RTC/Codecs/Codecs.hpp
+1
-1
VP8.hpp
worker/include/RTC/Codecs/VP8.hpp
+1
-1
ConsumerListener.hpp
worker/include/RTC/ConsumerListener.hpp
+0
-0
NackGenerator.hpp
worker/include/RTC/NackGenerator.hpp
+1
-0
RtpPacket.hpp
worker/include/RTC/RtpPacket.hpp
+0
-0
RtpStream.hpp
worker/include/RTC/RtpStream.hpp
+6
-0
Codecs.cpp
worker/src/RTC/Codecs/Codecs.cpp
+1
-2
Consumer.cpp
worker/src/RTC/Consumer.cpp
+0
-0
NackGenerator.cpp
worker/src/RTC/NackGenerator.cpp
+22
-0
Producer.cpp
worker/src/RTC/Producer.cpp
+8
-3
没有找到文件。
worker/include/RTC/Codecs/Codecs.hpp
浏览文件 @
b9a26d80
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
#include "common.hpp"
#include "common.hpp"
#include "RTC/Codecs/VP8.hpp"
#include "RTC/Codecs/VP8.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpPacket.hpp"
namespace
RTC
namespace
RTC
{
{
...
...
worker/include/RTC/Codecs/VP8.hpp
浏览文件 @
b9a26d80
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
#define MS_RTC_CODECS_VP8_HPP
#define MS_RTC_CODECS_VP8_HPP
#include "common.hpp"
#include "common.hpp"
#include "RTC/RtpPacket.hpp"
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpDictionaries.hpp"
#include "RTC/RtpPacket.hpp"
namespace
RTC
namespace
RTC
{
{
...
...
worker/include/RTC/ConsumerListener.hpp
浏览文件 @
b9a26d80
worker/include/RTC/NackGenerator.hpp
浏览文件 @
b9a26d80
...
@@ -45,6 +45,7 @@ namespace RTC
...
@@ -45,6 +45,7 @@ namespace RTC
private
:
private
:
void
AddPacketsToNackList
(
uint32_t
seq32Start
,
uint32_t
seq32End
);
void
AddPacketsToNackList
(
uint32_t
seq32Start
,
uint32_t
seq32End
);
void
RemoveFromNackListOlderThan
(
uint32_t
seq32
);
std
::
vector
<
uint16_t
>
GetNackBatch
(
NackFilter
filter
);
std
::
vector
<
uint16_t
>
GetNackBatch
(
NackFilter
filter
);
void
MayRunTimer
()
const
;
void
MayRunTimer
()
const
;
...
...
worker/include/RTC/RtpPacket.hpp
浏览文件 @
b9a26d80
worker/include/RTC/RtpStream.hpp
浏览文件 @
b9a26d80
...
@@ -38,6 +38,7 @@ namespace RTC
...
@@ -38,6 +38,7 @@ namespace RTC
virtual
Json
::
Value
ToJson
()
=
0
;
virtual
Json
::
Value
ToJson
()
=
0
;
virtual
bool
ReceivePacket
(
RTC
::
RtpPacket
*
packet
);
virtual
bool
ReceivePacket
(
RTC
::
RtpPacket
*
packet
);
uint32_t
GetSsrc
();
uint32_t
GetSsrc
();
uint8_t
GetPayloadType
();
const
RTC
::
RtpCodecMimeType
&
GetMimeType
()
const
;
const
RTC
::
RtpCodecMimeType
&
GetMimeType
()
const
;
bool
IsHealthy
();
bool
IsHealthy
();
...
@@ -83,6 +84,11 @@ namespace RTC
...
@@ -83,6 +84,11 @@ namespace RTC
return
this
->
params
.
ssrc
;
return
this
->
params
.
ssrc
;
}
}
inline
uint8_t
RtpStream
::
GetPayloadType
()
{
return
this
->
params
.
payloadType
;
}
inline
const
RTC
::
RtpCodecMimeType
&
RtpStream
::
GetMimeType
()
const
inline
const
RTC
::
RtpCodecMimeType
&
RtpStream
::
GetMimeType
()
const
{
{
return
this
->
params
.
mime
;
return
this
->
params
.
mime
;
...
...
worker/src/RTC/Codecs/Codecs.cpp
浏览文件 @
b9a26d80
...
@@ -22,8 +22,7 @@ namespace RTC
...
@@ -22,8 +22,7 @@ namespace RTC
break
;
break
;
}
}
default
:
default
:
;
;
}
}
}
}
}
// namespace Codecs
}
// namespace Codecs
...
...
worker/src/RTC/Consumer.cpp
浏览文件 @
b9a26d80
worker/src/RTC/NackGenerator.cpp
浏览文件 @
b9a26d80
...
@@ -47,6 +47,10 @@ namespace RTC
...
@@ -47,6 +47,10 @@ namespace RTC
return
;
return
;
}
}
// If a key frame remove all the items in the nack list older than this seq.
if
(
packet
->
IsKeyFrame
())
RemoveFromNackListOlderThan
(
seq32
);
// Obviously never nacked, so ignore.
// Obviously never nacked, so ignore.
if
(
seq32
==
this
->
lastSeq32
)
if
(
seq32
==
this
->
lastSeq32
)
{
{
...
@@ -141,8 +145,26 @@ namespace RTC
...
@@ -141,8 +145,26 @@ namespace RTC
}
}
}
}
void
NackGenerator
::
RemoveFromNackListOlderThan
(
uint32_t
seq32
)
{
MS_TRACE
();
// Delete all the entries in the NACK list whose key (seq32) is older than
// the given one.
MS_ERROR
(
"---- PRE, nackList.size:%zu"
,
this
->
nackList
.
size
());
auto
it
=
this
->
nackList
.
lower_bound
(
seq32
);
this
->
nackList
.
erase
(
this
->
nackList
.
begin
(),
it
);
MS_ERROR
(
"---- POST, nackList.size:%zu"
,
this
->
nackList
.
size
());
}
std
::
vector
<
uint16_t
>
NackGenerator
::
GetNackBatch
(
NackFilter
filter
)
std
::
vector
<
uint16_t
>
NackGenerator
::
GetNackBatch
(
NackFilter
filter
)
{
{
MS_TRACE
();
uint64_t
now
=
DepLibUV
::
GetTime
();
uint64_t
now
=
DepLibUV
::
GetTime
();
std
::
vector
<
uint16_t
>
nackBatch
;
std
::
vector
<
uint16_t
>
nackBatch
;
auto
it
=
this
->
nackList
.
begin
();
auto
it
=
this
->
nackList
.
begin
();
...
...
worker/src/RTC/Producer.cpp
浏览文件 @
b9a26d80
...
@@ -270,6 +270,10 @@ namespace RTC
...
@@ -270,6 +270,10 @@ namespace RTC
{
{
rtpStream
=
this
->
rtpStreams
[
ssrc
];
rtpStream
=
this
->
rtpStreams
[
ssrc
];
// Process the packet at codec level.
if
(
packet
->
GetPayloadType
()
==
rtpStream
->
GetPayloadType
())
Codecs
::
ProcessRtpPacket
(
packet
,
rtpStream
->
GetMimeType
());
// Process the packet.
// Process the packet.
if
(
!
rtpStream
->
ReceivePacket
(
packet
))
if
(
!
rtpStream
->
ReceivePacket
(
packet
))
return
;
return
;
...
@@ -278,6 +282,10 @@ namespace RTC
...
@@ -278,6 +282,10 @@ namespace RTC
{
{
rtpStream
=
this
->
mapRtxStreams
[
ssrc
];
rtpStream
=
this
->
mapRtxStreams
[
ssrc
];
// Process the packet at codec level.
if
(
packet
->
GetPayloadType
()
==
rtpStream
->
GetPayloadType
())
Codecs
::
ProcessRtpPacket
(
packet
,
rtpStream
->
GetMimeType
());
// Process the packet.
// Process the packet.
if
(
!
rtpStream
->
ReceiveRtxPacket
(
packet
))
if
(
!
rtpStream
->
ReceiveRtxPacket
(
packet
))
return
;
return
;
...
@@ -300,9 +308,6 @@ namespace RTC
...
@@ -300,9 +308,6 @@ namespace RTC
return
;
return
;
}
}
// Process the packet at codec level.
Codecs
::
ProcessRtpPacket
(
packet
,
rtpStream
->
GetMimeType
());
if
(
packet
->
IsKeyFrame
())
if
(
packet
->
IsKeyFrame
())
{
{
MS_DEBUG_TAG
(
MS_DEBUG_TAG
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论