Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
4c517583
提交
4c517583
authored
4月 04, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RtpStream: rewordings
上级
d0e6c9fe
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
35 行增加
和
28 行删除
+35
-28
RtpStream.hpp
worker/include/RTC/RtpStream.hpp
+4
-4
RtpStreamRecv.hpp
worker/include/RTC/RtpStreamRecv.hpp
+1
-0
PipeConsumer.cpp
worker/src/RTC/PipeConsumer.cpp
+1
-1
RtpStream.cpp
worker/src/RTC/RtpStream.cpp
+17
-16
RtpStreamRecv.cpp
worker/src/RTC/RtpStreamRecv.cpp
+6
-4
RtpStreamSend.cpp
worker/src/RTC/RtpStreamSend.cpp
+4
-1
SimpleConsumer.cpp
worker/src/RTC/SimpleConsumer.cpp
+1
-1
SimulcastConsumer.cpp
worker/src/RTC/SimulcastConsumer.cpp
+1
-1
没有找到文件。
worker/include/RTC/RtpStream.hpp
浏览文件 @
4c517583
...
...
@@ -72,7 +72,7 @@ namespace RTC
virtual
void
Pause
()
=
0
;
virtual
void
Resume
()
=
0
;
void
ResetScore
(
uint8_t
score
,
bool
notify
);
uint32_t
Get
R
ate
(
uint64_t
now
);
uint32_t
Get
Bitr
ate
(
uint64_t
now
);
uint8_t
GetFractionLost
()
const
;
float
GetLossPercentage
()
const
;
uint64_t
GetMaxPacketMs
()
const
;
...
...
@@ -103,10 +103,10 @@ namespace RTC
uint32_t
packetsLost
{
0
};
uint8_t
fractionLost
{
0
};
size_t
packetsDiscarded
{
0
};
size_t
packetsRepaired
{
0
};
size_t
packetsRetransmitted
{
0
};
size_t
packetsRepaired
{
0
};
size_t
nackCount
{
0
};
size_t
nack
Rtp
PacketCount
{
0
};
size_t
nackPacketCount
{
0
};
size_t
pliCount
{
0
};
size_t
firCount
{
0
};
size_t
repairedPrior
{
0
};
// Packets repaired at last interval.
...
...
@@ -183,7 +183,7 @@ namespace RTC
return
this
->
params
.
temporalLayers
;
}
inline
uint32_t
RtpStream
::
Get
R
ate
(
uint64_t
now
)
inline
uint32_t
RtpStream
::
Get
Bitr
ate
(
uint64_t
now
)
{
return
this
->
transmissionCounter
.
GetRate
(
now
);
}
...
...
worker/include/RTC/RtpStreamRecv.hpp
浏览文件 @
4c517583
...
...
@@ -29,6 +29,7 @@ namespace RTC
void
FillJsonStats
(
json
&
jsonObject
)
override
;
bool
ReceivePacket
(
RTC
::
RtpPacket
*
packet
)
override
;
bool
ReceiveRtxPacket
(
RTC
::
RtpPacket
*
packet
);
uint32_t
GetRate
(
uint64_t
now
);
RTC
::
RTCP
::
ReceiverReport
*
GetRtcpReceiverReport
();
void
ReceiveRtcpSenderReport
(
RTC
::
RTCP
::
SenderReport
*
report
);
void
RequestKeyFrame
();
...
...
worker/src/RTC/PipeConsumer.cpp
浏览文件 @
4c517583
...
...
@@ -222,7 +222,7 @@ namespace RTC
{
auto
&
rtpStream
=
kv
.
second
;
rate
+=
rtpStream
->
Get
R
ate
(
now
);
rate
+=
rtpStream
->
Get
Bitr
ate
(
now
);
}
return
rate
;
...
...
worker/src/RTC/RtpStream.cpp
浏览文件 @
4c517583
...
...
@@ -52,22 +52,23 @@ namespace RTC
uint64_t
now
=
DepLibUV
::
GetTime
();
jsonObject
[
"timestamp"
]
=
now
;
jsonObject
[
"ssrc"
]
=
this
->
params
.
ssrc
;
jsonObject
[
"kind"
]
=
RtpCodecMimeType
::
type2String
[
this
->
params
.
mimeType
.
type
];
jsonObject
[
"mimeType"
]
=
this
->
params
.
mimeType
.
ToString
();
jsonObject
[
"packetCount"
]
=
this
->
transmissionCounter
.
GetPacketCount
();
jsonObject
[
"byteCount"
]
=
this
->
transmissionCounter
.
GetBytes
();
jsonObject
[
"bitrate"
]
=
this
->
transmissionCounter
.
GetRate
(
now
);
jsonObject
[
"packetsLost"
]
=
this
->
packetsLost
;
jsonObject
[
"fractionLost"
]
=
this
->
fractionLost
;
jsonObject
[
"packetsDiscarded"
]
=
this
->
packetsDiscarded
;
jsonObject
[
"packetsRepaired"
]
=
this
->
packetsRepaired
;
jsonObject
[
"nackCount"
]
=
this
->
nackCount
;
jsonObject
[
"nackRtpPacketCount"
]
=
this
->
nackRtpPacketCount
;
jsonObject
[
"pliCount"
]
=
this
->
pliCount
;
jsonObject
[
"firCount"
]
=
this
->
firCount
;
jsonObject
[
"score"
]
=
this
->
score
;
jsonObject
[
"timestamp"
]
=
now
;
jsonObject
[
"ssrc"
]
=
this
->
params
.
ssrc
;
jsonObject
[
"kind"
]
=
RtpCodecMimeType
::
type2String
[
this
->
params
.
mimeType
.
type
];
jsonObject
[
"mimeType"
]
=
this
->
params
.
mimeType
.
ToString
();
jsonObject
[
"packetCount"
]
=
this
->
transmissionCounter
.
GetPacketCount
();
jsonObject
[
"byteCount"
]
=
this
->
transmissionCounter
.
GetBytes
();
jsonObject
[
"bitrate"
]
=
this
->
transmissionCounter
.
GetRate
(
now
);
jsonObject
[
"packetsLost"
]
=
this
->
packetsLost
;
jsonObject
[
"fractionLost"
]
=
this
->
fractionLost
;
jsonObject
[
"packetsDiscarded"
]
=
this
->
packetsDiscarded
;
jsonObject
[
"packetsRetransmitted"
]
=
this
->
packetsRetransmitted
;
jsonObject
[
"packetsRepaired"
]
=
this
->
packetsRepaired
;
jsonObject
[
"nackCount"
]
=
this
->
nackCount
;
jsonObject
[
"nackPacketCount"
]
=
this
->
nackPacketCount
;
jsonObject
[
"pliCount"
]
=
this
->
pliCount
;
jsonObject
[
"firCount"
]
=
this
->
firCount
;
jsonObject
[
"score"
]
=
this
->
score
;
if
(
!
this
->
params
.
rid
.
empty
())
jsonObject
[
"rid"
]
=
this
->
params
.
rid
;
...
...
worker/src/RTC/RtpStreamRecv.cpp
浏览文件 @
4c517583
...
...
@@ -70,12 +70,13 @@ namespace RTC
if
(
packet
->
GetPayloadType
()
==
GetPayloadType
())
RTC
::
Codecs
::
ProcessRtpPacket
(
packet
,
GetMimeType
());
// Pass the packet to the NackGenerator.
if
(
this
->
params
.
useNack
&&
this
->
nackGenerator
->
ReceivePacket
(
packet
))
// Pass the packet to the NackGenerator if there is no RTX, so if the
// NackGenerator returns true it means that it was a NACKed packet.
if
(
this
->
params
.
useNack
&&
!
HasRtx
()
&&
this
->
nackGenerator
->
ReceivePacket
(
packet
))
{
// Mark the packet as retransmitted and repaired.
RTC
::
RtpStream
::
PacketRepaired
(
packet
);
RTC
::
RtpStream
::
PacketRetransmitted
(
packet
);
RTC
::
RtpStream
::
PacketRepaired
(
packet
);
}
// Ensure the inactivityCheckPeriodicTimer runs (unless DTX is enabled).
...
...
@@ -85,6 +86,7 @@ namespace RTC
this
->
inactivityCheckPeriodicTimer
->
Restart
();
}
// Increase transmission counter.
this
->
transmissionCounter
.
Update
(
packet
);
return
true
;
...
...
@@ -513,7 +515,7 @@ namespace RTC
}
this
->
nackCount
++
;
this
->
nack
Rtp
PacketCount
+=
numPacketsRequested
;
this
->
nackPacketCount
+=
numPacketsRequested
;
packet
.
Serialize
(
RTC
::
RTCP
::
Buffer
);
...
...
worker/src/RTC/RtpStreamSend.cpp
浏览文件 @
4c517583
...
...
@@ -63,6 +63,9 @@ namespace RTC
if
(
!
this
->
storage
.
empty
())
StorePacket
(
packet
);
// Increase transmission counter.
this
->
transmissionCounter
.
Update
(
packet
);
return
true
;
}
...
...
@@ -76,7 +79,7 @@ namespace RTC
{
RTC
::
RTCP
::
FeedbackRtpNackItem
*
item
=
*
it
;
this
->
nack
Rtp
PacketCount
+=
item
->
CountRequestedPackets
();
this
->
nackPacketCount
+=
item
->
CountRequestedPackets
();
FillRetransmissionContainer
(
item
->
GetPacketId
(),
item
->
GetLostPacketBitmask
());
...
...
worker/src/RTC/SimpleConsumer.cpp
浏览文件 @
4c517583
...
...
@@ -318,7 +318,7 @@ namespace RTC
if
(
!
IsActive
())
return
0u
;
return
this
->
rtpStream
->
Get
R
ate
(
now
);
return
this
->
rtpStream
->
Get
Bitr
ate
(
now
);
}
float
SimpleConsumer
::
GetLossPercentage
()
const
...
...
worker/src/RTC/SimulcastConsumer.cpp
浏览文件 @
4c517583
...
...
@@ -490,7 +490,7 @@ namespace RTC
if
(
!
IsActive
())
return
0u
;
return
this
->
rtpStream
->
Get
R
ate
(
now
);
return
this
->
rtpStream
->
Get
Bitr
ate
(
now
);
}
float
SimulcastConsumer
::
GetLossPercentage
()
const
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论