Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
8802f5a4
提交
8802f5a4
authored
4月 04, 2019
作者:
José Luis Millán
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RtpStream: redo counters
上级
cec8d495
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
23 行增加
和
11 行删除
+23
-11
Consumer.hpp
worker/include/RTC/Consumer.hpp
+1
-0
RtpStream.hpp
worker/include/RTC/RtpStream.hpp
+2
-2
RtpStreamSend.hpp
worker/include/RTC/RtpStreamSend.hpp
+1
-0
RtpStream.cpp
worker/src/RTC/RtpStream.cpp
+2
-5
RtpStreamRecv.cpp
worker/src/RTC/RtpStreamRecv.cpp
+15
-4
RtpStreamSend.cpp
worker/src/RTC/RtpStreamSend.cpp
+2
-0
没有找到文件。
worker/include/RTC/Consumer.hpp
浏览文件 @
8802f5a4
...
...
@@ -55,6 +55,7 @@ namespace RTC
virtual
uint32_t
UseBandwidth
(
uint32_t
availableBandwidth
)
=
0
;
void
ProducerPaused
();
void
ProducerResumed
();
// TODO: Update signature to RTC::RtpStreamRecv.
virtual
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
=
0
;
virtual
void
ProducerNewRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
=
0
;
virtual
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
=
0
;
...
...
worker/include/RTC/RtpStream.hpp
浏览文件 @
8802f5a4
...
...
@@ -104,6 +104,7 @@ namespace RTC
uint8_t
fractionLost
{
0
};
size_t
packetsDiscarded
{
0
};
size_t
packetsRepaired
{
0
};
size_t
packetsRetransmitted
{
0
};
size_t
nackCount
{
0
};
size_t
nackRtpPacketCount
{
0
};
size_t
pliCount
{
0
};
...
...
@@ -111,7 +112,6 @@ namespace RTC
size_t
repairedPrior
{
0
};
// Packets repaired at last interval.
uint32_t
expectedPrior
{
0
};
// Packets expected at last interval.
RTC
::
RtpDataCounter
transmissionCounter
;
RTC
::
RtpDataCounter
retransmissionCounter
;
private
:
// Score related.
...
...
@@ -185,7 +185,7 @@ namespace RTC
inline
uint32_t
RtpStream
::
GetRate
(
uint64_t
now
)
{
return
this
->
transmissionCounter
.
GetRate
(
now
)
+
this
->
retransmissionCounter
.
GetRate
(
now
)
;
return
this
->
transmissionCounter
.
GetRate
(
now
);
}
inline
uint8_t
RtpStream
::
GetFractionLost
()
const
...
...
worker/include/RTC/RtpStreamSend.hpp
浏览文件 @
8802f5a4
...
...
@@ -32,6 +32,7 @@ namespace RTC
uint64_t
resentAtTime
{
0
};
RTC
::
RtpPacket
*
packet
{
nullptr
};
bool
rtxEncoded
{
false
};
// Whether the packet has already been RTX encoded.
size_t
sentTimes
{
0
};
};
public
:
...
...
worker/src/RTC/RtpStream.cpp
浏览文件 @
8802f5a4
...
...
@@ -105,9 +105,6 @@ namespace RTC
return
false
;
}
// Increase counters.
this
->
transmissionCounter
.
Update
(
packet
);
// Update highest seen RTP timestamp.
if
(
RTC
::
SeqManager
<
uint32_t
>::
IsSeqHigherThan
(
packet
->
GetTimestamp
(),
this
->
maxPacketTs
))
{
...
...
@@ -274,11 +271,11 @@ namespace RTC
}
}
void
RtpStream
::
PacketRetransmitted
(
RTC
::
RtpPacket
*
packet
)
void
RtpStream
::
PacketRetransmitted
(
RTC
::
RtpPacket
*
/*packet*/
)
{
MS_TRACE
();
this
->
retransmissionCounter
.
Update
(
packet
)
;
this
->
packetsRetransmitted
++
;
}
void
RtpStream
::
PacketRepaired
(
RTC
::
RtpPacket
*
/*packet*/
)
...
...
worker/src/RTC/RtpStreamRecv.cpp
浏览文件 @
8802f5a4
...
...
@@ -71,8 +71,12 @@ namespace RTC
RTC
::
Codecs
::
ProcessRtpPacket
(
packet
,
GetMimeType
());
// Pass the packet to the NackGenerator.
if
(
this
->
params
.
useNack
)
this
->
nackGenerator
->
ReceivePacket
(
packet
);
if
(
this
->
params
.
useNack
&&
this
->
nackGenerator
->
ReceivePacket
(
packet
))
{
// Mark the packet as retransmitted and repaired.
RTC
::
RtpStream
::
PacketRepaired
(
packet
);
RTC
::
RtpStream
::
PacketRetransmitted
(
packet
);
}
// Ensure the inactivityCheckPeriodicTimer runs (unless DTX is enabled).
if
(
!
this
->
params
.
useDtx
&&
!
this
->
inactivityCheckPeriodicTimer
->
IsActive
())
...
...
@@ -81,6 +85,8 @@ namespace RTC
this
->
inactivityCheckPeriodicTimer
->
Restart
();
}
this
->
transmissionCounter
.
Update
(
packet
);
return
true
;
}
...
...
@@ -152,14 +158,19 @@ namespace RTC
if
(
packet
->
GetPayloadType
()
==
GetPayloadType
())
RTC
::
Codecs
::
ProcessRtpPacket
(
packet
,
GetMimeType
());
// Mark the packet as retransmitted.
RTC
::
RtpStream
::
PacketRetransmitted
(
packet
);
// Pass the packet to the NackGenerator and return true just if this was a
// NACKed packet.
if
(
this
->
nackGenerator
->
ReceivePacket
(
packet
))
{
// Mark the packet as retransmitted and repaired.
RTC
::
RtpStream
::
PacketRetransmitted
(
packet
);
// Mark the packet as repaired.
RTC
::
RtpStream
::
PacketRepaired
(
packet
);
// Increase transmission counter.
this
->
transmissionCounter
.
Update
(
packet
);
return
true
;
}
...
...
worker/src/RTC/RtpStreamSend.cpp
浏览文件 @
8802f5a4
...
...
@@ -99,6 +99,7 @@ namespace RTC
RTC
::
RtpStream
::
PacketRetransmitted
(
packet
);
// Mark the packet as repaired.
// TODO: Only if this is the first retransmission.
RTC
::
RtpStream
::
PacketRepaired
(
packet
);
}
}
...
...
@@ -442,6 +443,7 @@ namespace RTC
// Save when this packet was resent.
(
*
bufferIt
).
resentAtTime
=
now
;
(
*
bufferIt
).
sentTimes
++
;
sent
=
true
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论