Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
1d24755c
提交
1d24755c
authored
11月 17, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Changes in Consumer classes
上级
46bd7687
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
28 行增加
和
41 行删除
+28
-41
SimpleConsumer.hpp
worker/include/RTC/SimpleConsumer.hpp
+7
-1
SvcConsumer.hpp
worker/include/RTC/SvcConsumer.hpp
+7
-1
SimpleConsumer.cpp
worker/src/RTC/SimpleConsumer.cpp
+2
-13
SimulcastConsumer.cpp
worker/src/RTC/SimulcastConsumer.cpp
+3
-3
SvcConsumer.cpp
worker/src/RTC/SvcConsumer.cpp
+3
-8
Transport.cpp
worker/src/RTC/Transport.cpp
+6
-15
没有找到文件。
worker/include/RTC/SimpleConsumer.hpp
浏览文件 @
1d24755c
...
@@ -66,7 +66,13 @@ namespace RTC
...
@@ -66,7 +66,13 @@ namespace RTC
inline
bool
SimpleConsumer
::
IsActive
()
const
inline
bool
SimpleConsumer
::
IsActive
()
const
{
{
return
(
RTC
::
Consumer
::
IsActive
()
&&
this
->
producerRtpStream
);
// clang-format off
return
(
RTC
::
Consumer
::
IsActive
()
&&
this
->
producerRtpStream
&&
this
->
producerRtpStream
->
GetScore
()
>
0u
);
// clang-format on
}
}
inline
std
::
vector
<
RTC
::
RtpStreamSend
*>
SimpleConsumer
::
GetRtpStreams
()
inline
std
::
vector
<
RTC
::
RtpStreamSend
*>
SimpleConsumer
::
GetRtpStreams
()
...
...
worker/include/RTC/SvcConsumer.hpp
浏览文件 @
1d24755c
...
@@ -77,7 +77,13 @@ namespace RTC
...
@@ -77,7 +77,13 @@ namespace RTC
inline
bool
SvcConsumer
::
IsActive
()
const
inline
bool
SvcConsumer
::
IsActive
()
const
{
{
return
(
RTC
::
Consumer
::
IsActive
()
&&
this
->
producerRtpStream
);
// clang-format off
return
(
RTC
::
Consumer
::
IsActive
()
&&
this
->
producerRtpStream
&&
this
->
producerRtpStream
->
GetScore
()
>
0u
);
// clang-format on
}
}
inline
std
::
vector
<
RTC
::
RtpStreamSend
*>
SvcConsumer
::
GetRtpStreams
()
inline
std
::
vector
<
RTC
::
RtpStreamSend
*>
SvcConsumer
::
GetRtpStreams
()
...
...
worker/src/RTC/SimpleConsumer.cpp
浏览文件 @
1d24755c
...
@@ -140,19 +140,8 @@ namespace RTC
...
@@ -140,19 +140,8 @@ namespace RTC
{
{
MS_TRACE
();
MS_TRACE
();
// Audio SimpleConsumer does not play the BWE game.
// SimpleConsumer does not play the BWE game.
if
(
this
->
kind
!=
RTC
::
Media
::
Kind
::
VIDEO
)
return
0u
;
return
0u
;
// TODO: Yes?
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
if
(
!
IsActive
())
return
0u
;
// TODO: Use app given priority.
return
1u
;
}
}
uint32_t
SimpleConsumer
::
IncreaseLayer
(
uint32_t
/*bitrate*/
,
bool
/*considerLoss*/
)
uint32_t
SimpleConsumer
::
IncreaseLayer
(
uint32_t
/*bitrate*/
,
bool
/*considerLoss*/
)
...
...
worker/src/RTC/SimulcastConsumer.cpp
浏览文件 @
1d24755c
...
@@ -530,7 +530,7 @@ namespace RTC
...
@@ -530,7 +530,7 @@ namespace RTC
MS_TRACE
();
MS_TRACE
();
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
MS_ASSERT
(
RTC
::
Consumer
::
IsActive
(),
"should be active (Consumer::IsActive())
"
);
MS_ASSERT
(
IsActive
(),
"should be active
"
);
auto
provisionalTargetSpatialLayer
=
this
->
provisionalTargetSpatialLayer
;
auto
provisionalTargetSpatialLayer
=
this
->
provisionalTargetSpatialLayer
;
auto
provisionalTargetTemporalLayer
=
this
->
provisionalTargetTemporalLayer
;
auto
provisionalTargetTemporalLayer
=
this
->
provisionalTargetTemporalLayer
;
...
@@ -574,7 +574,7 @@ namespace RTC
...
@@ -574,7 +574,7 @@ namespace RTC
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
if
(
!
RTC
::
Consumer
::
IsActive
())
if
(
!
IsActive
())
return
0u
;
return
0u
;
int16_t
desiredSpatialLayer
{
-
1
};
int16_t
desiredSpatialLayer
{
-
1
};
...
@@ -769,7 +769,7 @@ namespace RTC
...
@@ -769,7 +769,7 @@ namespace RTC
if
(
this
->
keyFrameForTsOffsetRequested
)
if
(
this
->
keyFrameForTsOffsetRequested
)
{
{
// Give up and use the theoretical offset.
// Give up and use the theoretical offset.
tsExtraOffset
=
1
u
;
tsExtraOffset
=
0
u
;
}
}
else
if
(
tsExtraOffset
>
maxTsExtraOffset
)
else
if
(
tsExtraOffset
>
maxTsExtraOffset
)
{
{
...
...
worker/src/RTC/SvcConsumer.cpp
浏览文件 @
1d24755c
...
@@ -446,6 +446,7 @@ namespace RTC
...
@@ -446,6 +446,7 @@ namespace RTC
MS_TRACE
();
MS_TRACE
();
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
MS_ASSERT
(
IsActive
(),
"should be active"
);
auto
provisionalTargetSpatialLayer
=
this
->
provisionalTargetSpatialLayer
;
auto
provisionalTargetSpatialLayer
=
this
->
provisionalTargetSpatialLayer
;
auto
provisionalTargetTemporalLayer
=
this
->
provisionalTargetTemporalLayer
;
auto
provisionalTargetTemporalLayer
=
this
->
provisionalTargetTemporalLayer
;
...
@@ -454,7 +455,7 @@ namespace RTC
...
@@ -454,7 +455,7 @@ namespace RTC
this
->
provisionalTargetSpatialLayer
=
-
1
;
this
->
provisionalTargetSpatialLayer
=
-
1
;
this
->
provisionalTargetTemporalLayer
=
-
1
;
this
->
provisionalTargetTemporalLayer
=
-
1
;
if
(
!
RTC
::
Consumer
::
IsActive
())
if
(
!
IsActive
())
return
;
return
;
// clang-format off
// clang-format off
...
@@ -492,13 +493,7 @@ namespace RTC
...
@@ -492,13 +493,7 @@ namespace RTC
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
MS_ASSERT
(
this
->
externallyManagedBitrate
,
"bitrate is not externally managed"
);
if
(
!
RTC
::
Consumer
::
IsActive
())
if
(
!
IsActive
())
return
0u
;
if
(
!
this
->
producerRtpStream
)
return
0u
;
if
(
this
->
producerRtpStream
->
GetScore
()
==
0u
)
return
0u
;
return
0u
;
int16_t
desiredSpatialLayer
{
-
1
};
int16_t
desiredSpatialLayer
{
-
1
};
...
...
worker/src/RTC/Transport.cpp
浏览文件 @
1d24755c
...
@@ -795,16 +795,13 @@ namespace RTC
...
@@ -795,16 +795,13 @@ namespace RTC
RTC
::
BweType
bweType
;
RTC
::
BweType
bweType
;
// Use transport-cc if:
// Use transport-cc if:
// - it's
a simulcast or SVC Consumer
, and
// - it's
video
, and
// - there is transport-wide-cc-01 RTP header extension, and
// - there is transport-wide-cc-01 RTP header extension, and
// - there is "transport-cc" in codecs RTCP feedback.
// - there is "transport-cc" in codecs RTCP feedback.
//
//
// clang-format off
// clang-format off
if
(
if
(
(
consumer
->
GetKind
()
==
RTC
::
Media
::
Kind
::
VIDEO
&&
consumer
->
GetType
()
==
RTC
::
RtpParameters
::
Type
::
SIMULCAST
||
consumer
->
GetType
()
==
RTC
::
RtpParameters
::
Type
::
SVC
)
&&
rtpHeaderExtensionIds
.
transportWideCc01
!=
0u
&&
rtpHeaderExtensionIds
.
transportWideCc01
!=
0u
&&
std
::
any_of
(
std
::
any_of
(
codecs
.
begin
(),
codecs
.
end
(),
[](
const
RTC
::
RtpCodecParameters
&
codec
)
codecs
.
begin
(),
codecs
.
end
(),
[](
const
RTC
::
RtpCodecParameters
&
codec
)
...
@@ -824,16 +821,13 @@ namespace RTC
...
@@ -824,16 +821,13 @@ namespace RTC
bweType
=
RTC
::
BweType
::
TRANSPORT_CC
;
bweType
=
RTC
::
BweType
::
TRANSPORT_CC
;
}
}
// Use REMB if:
// Use REMB if:
// - it's
a simulcast or SVC Consumer
, and
// - it's
video
, and
// - there is abs-send-time RTP header extension, and
// - there is abs-send-time RTP header extension, and
// - there is "remb" in codecs RTCP feedback.
// - there is "remb" in codecs RTCP feedback.
//
//
// clang-format off
// clang-format off
else
if
(
else
if
(
(
consumer
->
GetKind
()
==
RTC
::
Media
::
Kind
::
VIDEO
&&
consumer
->
GetType
()
==
RTC
::
RtpParameters
::
Type
::
SIMULCAST
||
consumer
->
GetType
()
==
RTC
::
RtpParameters
::
Type
::
SVC
)
&&
rtpHeaderExtensionIds
.
absSendTime
!=
0u
&&
rtpHeaderExtensionIds
.
absSendTime
!=
0u
&&
std
::
any_of
(
std
::
any_of
(
codecs
.
begin
(),
codecs
.
end
(),
[](
const
RTC
::
RtpCodecParameters
&
codec
)
codecs
.
begin
(),
codecs
.
end
(),
[](
const
RTC
::
RtpCodecParameters
&
codec
)
...
@@ -879,17 +873,14 @@ namespace RTC
...
@@ -879,17 +873,14 @@ namespace RTC
#ifdef ENABLE_RTC_SENDER_BANDWIDTH_ESTIMATOR
#ifdef ENABLE_RTC_SENDER_BANDWIDTH_ESTIMATOR
// Create SenderBandwidthEstimator if:
// Create SenderBandwidthEstimator if:
// - not already created,
// - not already created,
// - it's
a simulcast or SVC Consumer
, and
// - it's
video
, and
// - there is transport-wide-cc-01 RTP header extension, and
// - there is transport-wide-cc-01 RTP header extension, and
// - there is "transport-cc" in codecs RTCP feedback.
// - there is "transport-cc" in codecs RTCP feedback.
//
//
// clang-format off
// clang-format off
if
(
if
(
!
this
->
senderBwe
&&
!
this
->
senderBwe
&&
(
consumer
->
GetKind
()
==
RTC
::
Media
::
Kind
::
VIDEO
&&
consumer
->
GetType
()
==
RTC
::
RtpParameters
::
Type
::
SIMULCAST
||
consumer
->
GetType
()
==
RTC
::
RtpParameters
::
Type
::
SVC
)
&&
rtpHeaderExtensionIds
.
transportWideCc01
!=
0u
&&
rtpHeaderExtensionIds
.
transportWideCc01
!=
0u
&&
std
::
any_of
(
std
::
any_of
(
codecs
.
begin
(),
codecs
.
end
(),
[](
const
RTC
::
RtpCodecParameters
&
codec
)
codecs
.
begin
(),
codecs
.
end
(),
[](
const
RTC
::
RtpCodecParameters
&
codec
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论