Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
2260ee57
提交
2260ee57
authored
10月 10, 2017
作者:
José Luis Millán
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Producer: rename activeprofiles by mapActiveProfiles
上级
27f060bf
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
14 行增加
和
14 行删除
+14
-14
Producer.hpp
worker/include/RTC/Producer.hpp
+2
-2
Producer.cpp
worker/src/RTC/Producer.cpp
+12
-12
没有找到文件。
worker/include/RTC/Producer.hpp
浏览文件 @
2260ee57
...
@@ -113,7 +113,7 @@ namespace RTC
...
@@ -113,7 +113,7 @@ namespace RTC
std
::
map
<
uint32_t
,
RTC
::
RtpStreamRecv
*>
rtpStreams
;
std
::
map
<
uint32_t
,
RTC
::
RtpStreamRecv
*>
rtpStreams
;
std
::
map
<
uint32_t
,
RTC
::
RtpStreamRecv
*>
mapRtxStreams
;
std
::
map
<
uint32_t
,
RTC
::
RtpStreamRecv
*>
mapRtxStreams
;
std
::
map
<
RTC
::
RtpStreamRecv
*
,
std
::
set
<
RTC
::
RtpEncodingParameters
::
Profile
>>
mapRtpStreamProfiles
;
std
::
map
<
RTC
::
RtpStreamRecv
*
,
std
::
set
<
RTC
::
RtpEncodingParameters
::
Profile
>>
mapRtpStreamProfiles
;
std
::
map
<
RTC
::
RtpEncodingParameters
::
Profile
,
const
RTC
::
RtpStream
*>
a
ctiveProfiles
;
std
::
map
<
RTC
::
RtpEncodingParameters
::
Profile
,
const
RTC
::
RtpStream
*>
mapA
ctiveProfiles
;
Timer
*
keyFrameRequestBlockTimer
{
nullptr
};
Timer
*
keyFrameRequestBlockTimer
{
nullptr
};
// Others.
// Others.
std
::
vector
<
RtpEncodingParameters
>
outputEncodings
;
std
::
vector
<
RtpEncodingParameters
>
outputEncodings
;
...
@@ -180,7 +180,7 @@ namespace RTC
...
@@ -180,7 +180,7 @@ namespace RTC
inline
const
std
::
map
<
RTC
::
RtpEncodingParameters
::
Profile
,
const
RTC
::
RtpStream
*>&
Producer
::
inline
const
std
::
map
<
RTC
::
RtpEncodingParameters
::
Profile
,
const
RTC
::
RtpStream
*>&
Producer
::
GetActiveProfiles
()
const
GetActiveProfiles
()
const
{
{
return
this
->
a
ctiveProfiles
;
return
this
->
mapA
ctiveProfiles
;
}
}
}
// namespace RTC
}
// namespace RTC
...
...
worker/src/RTC/Producer.cpp
浏览文件 @
2260ee57
...
@@ -543,7 +543,7 @@ namespace RTC
...
@@ -543,7 +543,7 @@ namespace RTC
// Add the stream to the profiles map.
// Add the stream to the profiles map.
this
->
mapRtpStreamProfiles
[
rtpStream
].
insert
(
profile
);
this
->
mapRtpStreamProfiles
[
rtpStream
].
insert
(
profile
);
// Add new profile/s into active
Profiles
and notify the listener.
// Add new profile/s into active
profiles map
and notify the listener.
AddActiveProfiles
(
rtpStream
);
AddActiveProfiles
(
rtpStream
);
// Request a key frame since we may have lost the first packets of this stream.
// Request a key frame since we may have lost the first packets of this stream.
...
@@ -554,7 +554,7 @@ namespace RTC
...
@@ -554,7 +554,7 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
// Remove the profiles related to this stream from active
Profiles
and notify the listener.
// Remove the profiles related to this stream from active
profiles map
and notify the listener.
RemoveActiveProfiles
(
rtpStream
);
RemoveActiveProfiles
(
rtpStream
);
this
->
rtpStreams
.
erase
(
rtpStream
->
GetSsrc
());
this
->
rtpStreams
.
erase
(
rtpStream
->
GetSsrc
());
...
@@ -609,7 +609,7 @@ namespace RTC
...
@@ -609,7 +609,7 @@ namespace RTC
this
->
rtpStreams
.
clear
();
this
->
rtpStreams
.
clear
();
this
->
mapRtxStreams
.
clear
();
this
->
mapRtxStreams
.
clear
();
this
->
mapRtpStreamProfiles
.
clear
();
this
->
mapRtpStreamProfiles
.
clear
();
this
->
a
ctiveProfiles
.
clear
();
this
->
mapA
ctiveProfiles
.
clear
();
}
}
void
Producer
::
ApplyRtpMapping
(
RTC
::
RtpPacket
*
packet
)
const
void
Producer
::
ApplyRtpMapping
(
RTC
::
RtpPacket
*
packet
)
const
...
@@ -670,11 +670,11 @@ namespace RTC
...
@@ -670,11 +670,11 @@ namespace RTC
for
(
auto
&
profile
:
profiles
)
for
(
auto
&
profile
:
profiles
)
{
{
MS_ASSERT
(
MS_ASSERT
(
this
->
activeProfiles
.
find
(
profile
)
==
this
->
a
ctiveProfiles
.
end
(),
this
->
mapActiveProfiles
.
find
(
profile
)
==
this
->
mapA
ctiveProfiles
.
end
(),
"profile already in headltyProfiles set"
);
"profile already in headltyProfiles set"
);
// Add the profile to the active profiles map.
// Add the profile to the active profiles map.
this
->
a
ctiveProfiles
[
profile
]
=
rtpStream
;
this
->
mapA
ctiveProfiles
[
profile
]
=
rtpStream
;
for
(
auto
&
listener
:
this
->
listeners
)
for
(
auto
&
listener
:
this
->
listeners
)
{
{
...
@@ -691,11 +691,11 @@ namespace RTC
...
@@ -691,11 +691,11 @@ namespace RTC
for
(
auto
&
profile
:
profiles
)
for
(
auto
&
profile
:
profiles
)
{
{
MS_ASSERT
(
MS_ASSERT
(
this
->
activeProfiles
.
find
(
profile
)
!=
this
->
a
ctiveProfiles
.
end
(),
this
->
mapActiveProfiles
.
find
(
profile
)
!=
this
->
mapA
ctiveProfiles
.
end
(),
"profile not in headltyProfiles"
);
"profile not in headltyProfiles"
);
// Remove the profile from the active profiles map.
// Remove the profile from the active profiles map.
this
->
a
ctiveProfiles
.
erase
(
profile
);
this
->
mapA
ctiveProfiles
.
erase
(
profile
);
for
(
auto
&
listener
:
this
->
listeners
)
for
(
auto
&
listener
:
this
->
listeners
)
{
{
...
@@ -783,14 +783,14 @@ namespace RTC
...
@@ -783,14 +783,14 @@ namespace RTC
"stream not present in mapRtpStreamProfiles"
);
"stream not present in mapRtpStreamProfiles"
);
// Single active profile present. Ignore.
// Single active profile present. Ignore.
if
(
this
->
a
ctiveProfiles
.
size
()
==
1
)
if
(
this
->
mapA
ctiveProfiles
.
size
()
==
1
)
return
;
return
;
// Simulcast. Check whether any RTP is being received at all.
// Simulcast. Check whether any RTP is being received at all.
uint32_t
totalBitrate
=
0
;
uint32_t
totalBitrate
=
0
;
uint64_t
now
=
DepLibUV
::
GetTime
();
uint64_t
now
=
DepLibUV
::
GetTime
();
for
(
auto
it
:
this
->
a
ctiveProfiles
)
for
(
auto
it
:
this
->
mapA
ctiveProfiles
)
{
{
auto
activeRtpStream
=
it
.
second
;
auto
activeRtpStream
=
it
.
second
;
auto
ssrc
=
activeRtpStream
->
GetSsrc
();
auto
ssrc
=
activeRtpStream
->
GetSsrc
();
...
@@ -808,7 +808,7 @@ namespace RTC
...
@@ -808,7 +808,7 @@ namespace RTC
RemoveActiveProfiles
(
rtpStreamRecv
);
RemoveActiveProfiles
(
rtpStreamRecv
);
// Reset stream check timer on every active stream.
// Reset stream check timer on every active stream.
for
(
auto
it
:
this
->
a
ctiveProfiles
)
for
(
auto
it
:
this
->
mapA
ctiveProfiles
)
{
{
auto
activeRtpStream
=
it
.
second
;
auto
activeRtpStream
=
it
.
second
;
auto
ssrc
=
activeRtpStream
->
GetSsrc
();
auto
ssrc
=
activeRtpStream
->
GetSsrc
();
...
@@ -832,7 +832,7 @@ namespace RTC
...
@@ -832,7 +832,7 @@ namespace RTC
// Check whether the stream is active.
// Check whether the stream is active.
const
RtpStream
*
activeRtpStream
=
nullptr
;
const
RtpStream
*
activeRtpStream
=
nullptr
;
for
(
auto
it
:
this
->
a
ctiveProfiles
)
for
(
auto
it
:
this
->
mapA
ctiveProfiles
)
{
{
activeRtpStream
=
it
.
second
;
activeRtpStream
=
it
.
second
;
...
@@ -840,7 +840,7 @@ namespace RTC
...
@@ -840,7 +840,7 @@ namespace RTC
break
;
break
;
}
}
// Add the profiles related to this stream into active
Profiles
and notify the listener.
// Add the profiles related to this stream into active
profiles map
and notify the listener.
if
(
!
activeRtpStream
)
if
(
!
activeRtpStream
)
AddActiveProfiles
(
rtpStreamRecv
);
AddActiveProfiles
(
rtpStreamRecv
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论