Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
e2b7df5f
提交
e2b7df5f
authored
4月 13, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MAke score callbacks/methods also provide previous score
上级
eb1ae595
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
45 行增加
和
27 行删除
+45
-27
Consumer.hpp
worker/include/RTC/Consumer.hpp
+2
-1
PipeConsumer.hpp
worker/include/RTC/PipeConsumer.hpp
+2
-2
Producer.hpp
worker/include/RTC/Producer.hpp
+2
-2
Router.hpp
worker/include/RTC/Router.hpp
+2
-1
RtpStream.hpp
worker/include/RTC/RtpStream.hpp
+1
-1
SimpleConsumer.hpp
worker/include/RTC/SimpleConsumer.hpp
+2
-2
SimulcastConsumer.hpp
worker/include/RTC/SimulcastConsumer.hpp
+2
-2
Transport.hpp
worker/include/RTC/Transport.hpp
+3
-2
PipeConsumer.cpp
worker/src/RTC/PipeConsumer.cpp
+4
-2
Producer.cpp
worker/src/RTC/Producer.cpp
+2
-2
RembClient.cpp
worker/src/RTC/RembClient.cpp
+1
-0
RemoteBitrateEstimatorAbsSendTime.cpp
.../src/RTC/RembServer/RemoteBitrateEstimatorAbsSendTime.cpp
+2
-0
Router.cpp
worker/src/RTC/Router.cpp
+6
-2
RtpStream.cpp
worker/src/RTC/RtpStream.cpp
+4
-2
SimpleConsumer.cpp
worker/src/RTC/SimpleConsumer.cpp
+4
-2
SimulcastConsumer.cpp
worker/src/RTC/SimulcastConsumer.cpp
+4
-2
Transport.cpp
worker/src/RTC/Transport.cpp
+2
-2
没有找到文件。
worker/include/RTC/Consumer.hpp
浏览文件 @
e2b7df5f
...
@@ -58,7 +58,8 @@ namespace RTC
...
@@ -58,7 +58,8 @@ namespace RTC
void
ProducerResumed
();
void
ProducerResumed
();
virtual
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
=
0
;
virtual
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
=
0
;
virtual
void
ProducerNewRtpStream
(
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
;
virtual
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
=
0
;
void
ProducerClosed
();
void
ProducerClosed
();
virtual
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
=
0
;
virtual
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
=
0
;
virtual
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
)
=
0
;
virtual
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
)
=
0
;
...
...
worker/include/RTC/PipeConsumer.hpp
浏览文件 @
e2b7df5f
...
@@ -19,7 +19,7 @@ namespace RTC
...
@@ -19,7 +19,7 @@ namespace RTC
void
HandleRequest
(
Channel
::
Request
*
request
)
override
;
void
HandleRequest
(
Channel
::
Request
*
request
)
override
;
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerNewRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerNewRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
override
;
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
override
;
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
)
override
;
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
)
override
;
void
NeedWorstRemoteFractionLost
(
uint32_t
mappedSsrc
,
uint8_t
&
worstRemoteFractionLost
)
override
;
void
NeedWorstRemoteFractionLost
(
uint32_t
mappedSsrc
,
uint8_t
&
worstRemoteFractionLost
)
override
;
...
@@ -39,7 +39,7 @@ namespace RTC
...
@@ -39,7 +39,7 @@ namespace RTC
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
public
:
public
:
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
OnRtpStreamRetransmitRtpPacket
(
RTC
::
RtpStreamSend
*
rtpStream
,
RTC
::
RtpPacket
*
packet
)
override
;
void
OnRtpStreamRetransmitRtpPacket
(
RTC
::
RtpStreamSend
*
rtpStream
,
RTC
::
RtpPacket
*
packet
)
override
;
private
:
private
:
...
...
worker/include/RTC/Producer.hpp
浏览文件 @
e2b7df5f
...
@@ -29,7 +29,7 @@ namespace RTC
...
@@ -29,7 +29,7 @@ namespace RTC
virtual
void
OnProducerNewRtpStream
(
virtual
void
OnProducerNewRtpStream
(
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
=
0
;
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
=
0
;
virtual
void
OnProducerRtpStreamScore
(
virtual
void
OnProducerRtpStreamScore
(
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
=
0
;
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
=
0
;
virtual
void
OnProducerRtpPacketReceived
(
RTC
::
Producer
*
producer
,
RTC
::
RtpPacket
*
packet
)
=
0
;
virtual
void
OnProducerRtpPacketReceived
(
RTC
::
Producer
*
producer
,
RTC
::
RtpPacket
*
packet
)
=
0
;
virtual
void
OnProducerSendRtcpPacket
(
RTC
::
Producer
*
producer
,
RTC
::
RTCP
::
Packet
*
packet
)
=
0
;
virtual
void
OnProducerSendRtcpPacket
(
RTC
::
Producer
*
producer
,
RTC
::
RTCP
::
Packet
*
packet
)
=
0
;
virtual
void
OnProducerNeedWorstRemoteFractionLost
(
virtual
void
OnProducerNeedWorstRemoteFractionLost
(
...
@@ -88,7 +88,7 @@ namespace RTC
...
@@ -88,7 +88,7 @@ namespace RTC
/* Pure virtual methods inherited from RTC::RtpStreamRecv::Listener. */
/* Pure virtual methods inherited from RTC::RtpStreamRecv::Listener. */
public
:
public
:
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
OnRtpStreamSendRtcpPacket
(
RTC
::
RtpStreamRecv
*
rtpStream
,
RTC
::
RTCP
::
Packet
*
packet
)
override
;
void
OnRtpStreamSendRtcpPacket
(
RTC
::
RtpStreamRecv
*
rtpStream
,
RTC
::
RTCP
::
Packet
*
packet
)
override
;
void
OnRtpStreamNeedWorstRemoteFractionLost
(
void
OnRtpStreamNeedWorstRemoteFractionLost
(
RTC
::
RtpStreamRecv
*
rtpStream
,
uint8_t
&
worstRemoteFractionLost
)
override
;
RTC
::
RtpStreamRecv
*
rtpStream
,
uint8_t
&
worstRemoteFractionLost
)
override
;
...
...
worker/include/RTC/Router.hpp
浏览文件 @
e2b7df5f
...
@@ -57,7 +57,8 @@ namespace RTC
...
@@ -57,7 +57,8 @@ namespace RTC
RTC
::
Transport
*
transport
,
RTC
::
Transport
*
transport
,
RTC
::
Producer
*
producer
,
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
OnTransportNewConsumer
(
void
OnTransportNewConsumer
(
RTC
::
Transport
*
transport
,
RTC
::
Consumer
*
consumer
,
std
::
string
&
producerId
)
override
;
RTC
::
Transport
*
transport
,
RTC
::
Consumer
*
consumer
,
std
::
string
&
producerId
)
override
;
void
OnTransportConsumerClosed
(
RTC
::
Transport
*
transport
,
RTC
::
Consumer
*
consumer
)
override
;
void
OnTransportConsumerClosed
(
RTC
::
Transport
*
transport
,
RTC
::
Consumer
*
consumer
)
override
;
...
...
worker/include/RTC/RtpStream.hpp
浏览文件 @
e2b7df5f
...
@@ -26,7 +26,7 @@ namespace RTC
...
@@ -26,7 +26,7 @@ namespace RTC
class
Listener
class
Listener
{
{
public
:
public
:
virtual
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
=
0
;
virtual
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
=
0
;
};
};
public
:
public
:
...
...
worker/include/RTC/SimpleConsumer.hpp
浏览文件 @
e2b7df5f
...
@@ -21,7 +21,7 @@ namespace RTC
...
@@ -21,7 +21,7 @@ namespace RTC
bool
IsActive
()
const
override
;
bool
IsActive
()
const
override
;
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerNewRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerNewRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
override
;
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
override
;
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
)
override
;
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
)
override
;
void
NeedWorstRemoteFractionLost
(
uint32_t
mappedSsrc
,
uint8_t
&
worstRemoteFractionLost
)
override
;
void
NeedWorstRemoteFractionLost
(
uint32_t
mappedSsrc
,
uint8_t
&
worstRemoteFractionLost
)
override
;
...
@@ -42,7 +42,7 @@ namespace RTC
...
@@ -42,7 +42,7 @@ namespace RTC
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
public
:
public
:
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
OnRtpStreamRetransmitRtpPacket
(
RTC
::
RtpStreamSend
*
rtpStream
,
RTC
::
RtpPacket
*
packet
)
override
;
void
OnRtpStreamRetransmitRtpPacket
(
RTC
::
RtpStreamSend
*
rtpStream
,
RTC
::
RtpPacket
*
packet
)
override
;
private
:
private
:
...
...
worker/include/RTC/SimulcastConsumer.hpp
浏览文件 @
e2b7df5f
...
@@ -22,7 +22,7 @@ namespace RTC
...
@@ -22,7 +22,7 @@ namespace RTC
bool
IsActive
()
const
override
;
bool
IsActive
()
const
override
;
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerNewRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerNewRtpStream
(
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
void
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
override
;
void
SendRtpPacket
(
RTC
::
RtpPacket
*
packet
)
override
;
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
)
override
;
void
GetRtcp
(
RTC
::
RTCP
::
CompoundPacket
*
packet
,
uint64_t
now
)
override
;
void
NeedWorstRemoteFractionLost
(
uint32_t
mappedSsrc
,
uint8_t
&
worstRemoteFractionLost
)
override
;
void
NeedWorstRemoteFractionLost
(
uint32_t
mappedSsrc
,
uint8_t
&
worstRemoteFractionLost
)
override
;
...
@@ -48,7 +48,7 @@ namespace RTC
...
@@ -48,7 +48,7 @@ namespace RTC
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
public
:
public
:
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
void
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
OnRtpStreamRetransmitRtpPacket
(
RTC
::
RtpStreamSend
*
rtpStream
,
RTC
::
RtpPacket
*
packet
)
override
;
void
OnRtpStreamRetransmitRtpPacket
(
RTC
::
RtpStreamSend
*
rtpStream
,
RTC
::
RtpPacket
*
packet
)
override
;
private
:
private
:
...
...
worker/include/RTC/Transport.hpp
浏览文件 @
e2b7df5f
...
@@ -41,7 +41,8 @@ namespace RTC
...
@@ -41,7 +41,8 @@ namespace RTC
RTC
::
Transport
*
transport
,
RTC
::
Transport
*
transport
,
RTC
::
Producer
*
producer
,
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
=
0
;
uint8_t
score
,
uint8_t
previousScore
)
=
0
;
virtual
void
OnTransportProducerRtpPacketReceived
(
virtual
void
OnTransportProducerRtpPacketReceived
(
RTC
::
Transport
*
transport
,
RTC
::
Producer
*
producer
,
RTC
::
RtpPacket
*
packet
)
=
0
;
RTC
::
Transport
*
transport
,
RTC
::
Producer
*
producer
,
RTC
::
RtpPacket
*
packet
)
=
0
;
virtual
void
OnTransportNeedWorstRemoteFractionLost
(
virtual
void
OnTransportNeedWorstRemoteFractionLost
(
...
@@ -103,7 +104,7 @@ namespace RTC
...
@@ -103,7 +104,7 @@ namespace RTC
void
OnProducerNewRtpStream
(
void
OnProducerNewRtpStream
(
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint32_t
mappedSsrc
)
override
;
void
OnProducerRtpStreamScore
(
void
OnProducerRtpStreamScore
(
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
override
;
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
override
;
void
OnProducerRtpPacketReceived
(
RTC
::
Producer
*
producer
,
RTC
::
RtpPacket
*
packet
)
override
;
void
OnProducerRtpPacketReceived
(
RTC
::
Producer
*
producer
,
RTC
::
RtpPacket
*
packet
)
override
;
void
OnProducerSendRtcpPacket
(
RTC
::
Producer
*
producer
,
RTC
::
RTCP
::
Packet
*
packet
)
override
;
void
OnProducerSendRtcpPacket
(
RTC
::
Producer
*
producer
,
RTC
::
RTCP
::
Packet
*
packet
)
override
;
void
OnProducerNeedWorstRemoteFractionLost
(
void
OnProducerNeedWorstRemoteFractionLost
(
...
...
worker/src/RTC/PipeConsumer.cpp
浏览文件 @
e2b7df5f
...
@@ -95,7 +95,8 @@ namespace RTC
...
@@ -95,7 +95,8 @@ namespace RTC
// Do nothing.
// Do nothing.
}
}
void
PipeConsumer
::
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
)
void
PipeConsumer
::
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
,
uint8_t
/*previousScore*/
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -388,7 +389,8 @@ namespace RTC
...
@@ -388,7 +389,8 @@ namespace RTC
}
}
}
}
inline
void
PipeConsumer
::
OnRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
)
inline
void
PipeConsumer
::
OnRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
,
uint8_t
/*previousScore*/
)
{
{
MS_TRACE
();
MS_TRACE
();
...
...
worker/src/RTC/Producer.cpp
浏览文件 @
e2b7df5f
...
@@ -975,12 +975,12 @@ namespace RTC
...
@@ -975,12 +975,12 @@ namespace RTC
Channel
::
Notifier
::
Emit
(
this
->
id
,
"score"
,
data
);
Channel
::
Notifier
::
Emit
(
this
->
id
,
"score"
,
data
);
}
}
inline
void
Producer
::
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
inline
void
Producer
::
OnRtpStreamScore
(
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
{
{
MS_TRACE
();
MS_TRACE
();
// Notify the listener.
// Notify the listener.
this
->
listener
->
OnProducerRtpStreamScore
(
this
,
rtpStream
,
score
);
this
->
listener
->
OnProducerRtpStreamScore
(
this
,
rtpStream
,
score
,
previousScore
);
// Emit the score event.
// Emit the score event.
EmitScore
();
EmitScore
();
...
...
worker/src/RTC/RembClient.cpp
浏览文件 @
e2b7df5f
...
@@ -37,6 +37,7 @@ namespace RTC
...
@@ -37,6 +37,7 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
// TODO: REMOVE
MS_ERROR
(
"remb:%"
PRIu64
,
remb
->
GetBitrate
());
MS_ERROR
(
"remb:%"
PRIu64
,
remb
->
GetBitrate
());
uint64_t
now
=
DepLibUV
::
GetTime
();
uint64_t
now
=
DepLibUV
::
GetTime
();
...
...
worker/src/RTC/RembServer/RemoteBitrateEstimatorAbsSendTime.cpp
浏览文件 @
e2b7df5f
...
@@ -296,6 +296,7 @@ namespace RTC
...
@@ -296,6 +296,7 @@ namespace RTC
(
!
this
->
remoteRate
.
ValidEstimate
()
||
(
!
this
->
remoteRate
.
ValidEstimate
()
||
nowMs
-
this
->
firstPacketTimeMs
<
InitialProbingIntervalMs
))
nowMs
-
this
->
firstPacketTimeMs
<
InitialProbingIntervalMs
))
{
{
#ifdef MS_LOG_DEV
// TODO(holmer): Use a map instead to get correct order?
// TODO(holmer): Use a map instead to get correct order?
if
(
this
->
totalProbesReceived
<
MaxProbePackets
)
if
(
this
->
totalProbesReceived
<
MaxProbePackets
)
{
{
...
@@ -317,6 +318,7 @@ namespace RTC
...
@@ -317,6 +318,7 @@ namespace RTC
sendDeltaMs
,
sendDeltaMs
,
recvDeltaMs
);
recvDeltaMs
);
}
}
#endif
this
->
probes
.
emplace_back
(
sendTimeMs
,
arrivalTimeMs
,
payloadSize
);
this
->
probes
.
emplace_back
(
sendTimeMs
,
arrivalTimeMs
,
payloadSize
);
++
this
->
totalProbesReceived
;
++
this
->
totalProbesReceived
;
...
...
worker/src/RTC/Router.cpp
浏览文件 @
e2b7df5f
...
@@ -562,7 +562,11 @@ namespace RTC
...
@@ -562,7 +562,11 @@ namespace RTC
}
}
inline
void
Router
::
OnTransportProducerRtpStreamScore
(
inline
void
Router
::
OnTransportProducerRtpStreamScore
(
RTC
::
Transport
*
/*transport*/
,
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
RTC
::
Transport
*
/*transport*/
,
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -570,7 +574,7 @@ namespace RTC
...
@@ -570,7 +574,7 @@ namespace RTC
for
(
auto
*
consumer
:
consumers
)
for
(
auto
*
consumer
:
consumers
)
{
{
consumer
->
ProducerRtpStreamScore
(
rtpStream
,
score
);
consumer
->
ProducerRtpStreamScore
(
rtpStream
,
score
,
previousScore
);
}
}
}
}
...
...
worker/src/RTC/RtpStream.cpp
浏览文件 @
e2b7df5f
...
@@ -122,11 +122,13 @@ namespace RTC
...
@@ -122,11 +122,13 @@ namespace RTC
if
(
this
->
score
!=
score
)
if
(
this
->
score
!=
score
)
{
{
auto
previousScore
=
this
->
score
;
this
->
score
=
score
;
this
->
score
=
score
;
// Notify the listener.
// Notify the listener.
if
(
notify
)
if
(
notify
)
this
->
listener
->
OnRtpStreamScore
(
this
,
score
);
this
->
listener
->
OnRtpStreamScore
(
this
,
score
,
previousScore
);
}
}
}
}
...
@@ -250,7 +252,7 @@ namespace RTC
...
@@ -250,7 +252,7 @@ namespace RTC
previousScore
,
previousScore
,
this
->
score
);
this
->
score
);
this
->
listener
->
OnRtpStreamScore
(
this
,
this
->
score
);
this
->
listener
->
OnRtpStreamScore
(
this
,
this
->
score
,
previousScore
);
}
}
else
else
{
{
...
...
worker/src/RTC/SimpleConsumer.cpp
浏览文件 @
e2b7df5f
...
@@ -120,7 +120,8 @@ namespace RTC
...
@@ -120,7 +120,8 @@ namespace RTC
EmitScore
();
EmitScore
();
}
}
void
SimpleConsumer
::
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
)
void
SimpleConsumer
::
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
,
uint8_t
/*previousScore*/
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -470,7 +471,8 @@ namespace RTC
...
@@ -470,7 +471,8 @@ namespace RTC
Channel
::
Notifier
::
Emit
(
this
->
id
,
"score"
,
data
);
Channel
::
Notifier
::
Emit
(
this
->
id
,
"score"
,
data
);
}
}
inline
void
SimpleConsumer
::
OnRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
)
inline
void
SimpleConsumer
::
OnRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
,
uint8_t
/*previousScore*/
)
{
{
MS_TRACE
();
MS_TRACE
();
...
...
worker/src/RTC/SimulcastConsumer.cpp
浏览文件 @
e2b7df5f
...
@@ -279,7 +279,8 @@ namespace RTC
...
@@ -279,7 +279,8 @@ namespace RTC
EmitScore
();
EmitScore
();
}
}
void
SimulcastConsumer
::
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
)
void
SimulcastConsumer
::
ProducerRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
,
uint8_t
/*previousScore*/
)
{
{
MS_TRACE
();
MS_TRACE
();
...
@@ -881,7 +882,8 @@ namespace RTC
...
@@ -881,7 +882,8 @@ namespace RTC
return
this
->
producerRtpStreams
.
at
(
this
->
targetSpatialLayer
);
return
this
->
producerRtpStreams
.
at
(
this
->
targetSpatialLayer
);
}
}
inline
void
SimulcastConsumer
::
OnRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
)
inline
void
SimulcastConsumer
::
OnRtpStreamScore
(
RTC
::
RtpStream
*
/*rtpStream*/
,
uint8_t
/*score*/
,
uint8_t
/*previousScore*/
)
{
{
MS_TRACE
();
MS_TRACE
();
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
e2b7df5f
...
@@ -830,11 +830,11 @@ namespace RTC
...
@@ -830,11 +830,11 @@ namespace RTC
}
}
inline
void
Transport
::
OnProducerRtpStreamScore
(
inline
void
Transport
::
OnProducerRtpStreamScore
(
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
)
RTC
::
Producer
*
producer
,
RTC
::
RtpStream
*
rtpStream
,
uint8_t
score
,
uint8_t
previousScore
)
{
{
MS_TRACE
();
MS_TRACE
();
this
->
listener
->
OnTransportProducerRtpStreamScore
(
this
,
producer
,
rtpStream
,
score
);
this
->
listener
->
OnTransportProducerRtpStreamScore
(
this
,
producer
,
rtpStream
,
score
,
previousScore
);
}
}
inline
void
Transport
::
OnProducerRtpPacketReceived
(
RTC
::
Producer
*
producer
,
RTC
::
RtpPacket
*
packet
)
inline
void
Transport
::
OnProducerRtpPacketReceived
(
RTC
::
Producer
*
producer
,
RTC
::
RtpPacket
*
packet
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论