Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
64152f2e
提交
64152f2e
authored
9月 03, 2017
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- Router: use auto*
- Consumer: check IsEnabled() in methods
上级
2c0b4268
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
30 行增加
和
15 行删除
+30
-15
Consumer.cpp
worker/src/RTC/Consumer.cpp
+12
-0
Router.cpp
worker/src/RTC/Router.cpp
+10
-10
Transport.cpp
worker/src/RTC/Transport.cpp
+8
-5
没有找到文件。
worker/src/RTC/Consumer.cpp
浏览文件 @
64152f2e
...
...
@@ -191,6 +191,9 @@ namespace RTC
{
MS_TRACE
();
if
(
!
IsEnabled
())
return
;
// If paused don't forward RTP.
if
(
IsPaused
())
return
;
...
...
@@ -260,6 +263,9 @@ namespace RTC
{
MS_TRACE
();
if
(
!
IsEnabled
())
return
;
for
(
auto
it
=
nackPacket
->
Begin
();
it
!=
nackPacket
->
End
();
++
it
)
{
RTC
::
RTCP
::
FeedbackRtpNackItem
*
item
=
*
it
;
...
...
@@ -284,6 +290,9 @@ namespace RTC
{
MS_TRACE
();
if
(
!
IsEnabled
())
return
;
this
->
rtpStream
->
ReceiveRtcpReceiverReport
(
report
);
}
...
...
@@ -291,6 +300,9 @@ namespace RTC
{
MS_TRACE
();
if
(
!
IsEnabled
())
return
;
if
(
this
->
kind
==
RTC
::
Media
::
Kind
::
AUDIO
)
return
;
...
...
worker/src/RTC/Router.cpp
浏览文件 @
64152f2e
...
...
@@ -127,11 +127,11 @@ namespace RTC
// Add mapProducerConsumers.
for
(
auto
&
kv
:
this
->
mapProducerConsumers
)
{
auto
producer
=
kv
.
first
;
auto
*
producer
=
kv
.
first
;
auto
&
consumers
=
kv
.
second
;
Json
::
Value
jsonProducers
(
Json
::
arrayValue
);
for
(
auto
&
consumer
:
consumers
)
for
(
auto
*
consumer
:
consumers
)
{
jsonProducers
.
append
(
std
::
to_string
(
consumer
->
consumerId
));
}
...
...
@@ -143,8 +143,8 @@ namespace RTC
// Add mapConsumerProducer.
for
(
auto
&
kv
:
this
->
mapConsumerProducer
)
{
auto
consumer
=
kv
.
first
;
auto
producer
=
kv
.
second
;
auto
*
consumer
=
kv
.
first
;
auto
*
producer
=
kv
.
second
;
jsonMapConsumerProducer
[
std
::
to_string
(
consumer
->
consumerId
)]
=
std
::
to_string
(
producer
->
producerId
);
...
...
@@ -653,7 +653,6 @@ namespace RTC
break
;
}
case
Channel
:
:
Request
::
MethodId
::
CONSUMER_DUMP
:
case
Channel
:
:
Request
::
MethodId
::
CONSUMER_ENABLE
:
{
static
const
Json
::
StaticString
JsonStringRtpParameters
{
"rtpParameters"
};
...
...
@@ -728,6 +727,7 @@ namespace RTC
break
;
}
case
Channel
:
:
Request
::
MethodId
::
CONSUMER_DUMP
:
case
Channel
:
:
Request
::
MethodId
::
CONSUMER_PAUSE
:
case
Channel
:
:
Request
::
MethodId
::
CONSUMER_RESUME
:
{
...
...
@@ -890,7 +890,7 @@ namespace RTC
auto
&
consumers
=
this
->
mapProducerConsumers
[
producer
];
for
(
auto
&
consumer
:
consumers
)
for
(
auto
*
consumer
:
consumers
)
{
consumer
->
SetSourcePaused
();
}
...
...
@@ -906,7 +906,7 @@ namespace RTC
auto
&
consumers
=
this
->
mapProducerConsumers
[
producer
];
for
(
auto
&
consumer
:
consumers
)
for
(
auto
*
consumer
:
consumers
)
{
consumer
->
SetSourceResumed
();
}
...
...
@@ -924,7 +924,7 @@ namespace RTC
// Send the RtpPacket to all the Consumers associated to the Producer
// from which it was received.
for
(
auto
&
consumer
:
consumers
)
for
(
auto
*
consumer
:
consumers
)
{
if
(
consumer
->
IsEnabled
())
consumer
->
SendRtpPacket
(
packet
);
...
...
@@ -972,7 +972,7 @@ namespace RTC
this
->
mapConsumerProducer
.
find
(
consumer
)
!=
this
->
mapConsumerProducer
.
end
(),
"Consumer not present in mapConsumerProducer"
);
auto
&
producer
=
this
->
mapConsumerProducer
[
consumer
];
auto
*
producer
=
this
->
mapConsumerProducer
[
consumer
];
producer
->
RequestFullFrame
();
}
...
...
@@ -992,7 +992,7 @@ namespace RTC
for
(
auto
&
kv
:
this
->
mapProducerAudioLevelContainer
)
{
auto
producer
=
kv
.
first
;
auto
*
producer
=
kv
.
first
;
auto
&
audioLevelContainer
=
kv
.
second
;
auto
numdBovs
=
audioLevelContainer
.
numdBovs
;
auto
sumdBovs
=
audioLevelContainer
.
sumdBovs
;
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
64152f2e
...
...
@@ -249,7 +249,7 @@ namespace RTC
}
// Disable all the handled Consumers.
for
(
auto
&
consumer
:
this
->
consumers
)
for
(
auto
*
consumer
:
this
->
consumers
)
{
consumer
->
Disable
();
...
...
@@ -798,7 +798,7 @@ namespace RTC
{
MS_TRACE
();
for
(
auto
consumer
:
this
->
consumers
)
for
(
auto
*
consumer
:
this
->
consumers
)
{
// Ignore if not enabled.
if
(
!
consumer
->
IsEnabled
())
...
...
@@ -1254,7 +1254,7 @@ namespace RTC
this
->
notifier
->
Emit
(
this
->
transportId
,
"dtlsstatechange"
,
eventData
);
// Iterate all the Consumers and request full frame.
for
(
auto
&
consumer
:
this
->
consumers
)
for
(
auto
*
consumer
:
this
->
consumers
)
{
consumer
->
RequestFullFrame
();
}
...
...
@@ -1369,8 +1369,11 @@ namespace RTC
{
MS_WARN_TAG
(
rbe
,
"uplink effective max bitrate abruptly decrease, requesting full frames"
);
// TODO: No. Iterate producers and call RequestFullFrame() on them.
// this->listener->OnTransportFullFrameRequired(this);
// Request full frame for all the Producers.
for
(
auto
*
producer
:
this
->
producers
)
{
producer
->
RequestFullFrame
();
}
}
this
->
lastEffectiveMaxBitrateAt
=
now
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论