Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
44dd434a
提交
44dd434a
authored
4月 03, 2019
作者:
Iñaki Baz Castillo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Some C++ rewording
上级
1a69e855
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
23 行增加
和
23 行删除
+23
-23
RembClient.hpp
worker/include/RTC/RembClient.hpp
+2
-2
RemoteBitrateEstimator.hpp
worker/include/RTC/RembServer/RemoteBitrateEstimator.hpp
+3
-3
WebRtcTransport.hpp
worker/include/RTC/WebRtcTransport.hpp
+3
-3
RemoteBitrateEstimatorAbsSendTime.cpp
.../src/RTC/RembServer/RemoteBitrateEstimatorAbsSendTime.cpp
+2
-2
RemoteBitrateEstimatorSingleStream.cpp
...src/RTC/RembServer/RemoteBitrateEstimatorSingleStream.cpp
+1
-1
WebRtcTransport.cpp
worker/src/RTC/WebRtcTransport.cpp
+12
-12
没有找到文件。
worker/include/RTC/RembClient.hpp
浏览文件 @
44dd434a
...
...
@@ -14,8 +14,8 @@ namespace RTC
class
Listener
{
public
:
virtual
void
OnRembClient
BitrateEstimation
(
RTC
::
RembClient
*
rembClient
,
int32_t
availableB
itrate
)
=
0
;
virtual
void
OnRembClient
AvailableBandwidth
(
RTC
::
RembClient
*
rembClient
,
int32_t
availableB
andwidth
)
=
0
;
};
public
:
...
...
worker/include/RTC/RembServer/RemoteBitrateEstimator.hpp
浏览文件 @
44dd434a
...
...
@@ -42,11 +42,11 @@ namespace RTC
class
Listener
{
public
:
// Called when a receive channel group has a new b
itrate
estimate for the incoming streams.
virtual
void
OnRembServerB
itrateEstimation
(
// Called when a receive channel group has a new b
andwidth
estimate for the incoming streams.
virtual
void
OnRembServerB
andwidth
(
const
RemoteBitrateEstimator
*
remoteBitrateEstimator
,
const
std
::
vector
<
uint32_t
>&
ssrcs
,
uint32_t
availableBitrate
)
=
0
;
uint32_t
bandwidth
)
=
0
;
};
protected
:
...
...
worker/include/RTC/WebRtcTransport.hpp
浏览文件 @
44dd434a
...
...
@@ -106,14 +106,14 @@ namespace RTC
/* Pure virtual methods inherited from RTC::RembClient::Listener. */
public
:
void
OnRembClient
BitrateEstimation
(
RTC
::
RembClient
*
rembClient
,
int32_t
availableBitrate
)
override
;
void
OnRembClient
AvailableBandwidth
(
RTC
::
RembClient
*
rembClient
,
int32_t
availableBandwidth
)
override
;
/* Pure virtual methods inherited from RTC::RembServer::RemoteBitrateEstimator::Listener. */
public
:
void
OnRembServerB
itrateEstimation
(
void
OnRembServerB
andwidth
(
const
RTC
::
RembServer
::
RemoteBitrateEstimator
*
remoteBitrateEstimator
,
const
std
::
vector
<
uint32_t
>&
ssrcs
,
uint32_t
availableBitrate
)
override
;
uint32_t
bandwidth
)
override
;
private
:
// Allocated by this.
...
...
worker/src/RTC/RembServer/RemoteBitrateEstimatorAbsSendTime.cpp
浏览文件 @
44dd434a
...
...
@@ -323,7 +323,7 @@ namespace RTC
++
this
->
totalProbesReceived
;
// Make sure that a probe which updated the bitrate immediately has an
// effect by calling the OnRembServerB
itrateEstimation
callback.
// effect by calling the OnRembServerB
andwidth
callback.
if
(
ProcessClusters
(
nowMs
)
==
ProbeResult
::
BITRATE_UPDATED
)
updateEstimate
=
true
;
}
...
...
@@ -377,7 +377,7 @@ namespace RTC
this
->
lastUpdateMs
=
nowMs
;
this
->
availableBitrate
=
targetBitrateBps
;
this
->
observer
->
OnRembServerB
itrateEstimation
(
this
,
ssrcs
,
targetBitrateBps
);
this
->
observer
->
OnRembServerB
andwidth
(
this
,
ssrcs
,
targetBitrateBps
);
}
}
...
...
worker/src/RTC/RembServer/RemoteBitrateEstimatorSingleStream.cpp
浏览文件 @
44dd434a
...
...
@@ -165,7 +165,7 @@ namespace RTC
std
::
vector
<
uint32_t
>
ssrcs
;
GetSsrcs
(
&
ssrcs
);
this
->
observer
->
OnRembServerB
itrateEstimation
(
this
,
ssrcs
,
targetBitrate
);
this
->
observer
->
OnRembServerB
andwidth
(
this
,
ssrcs
,
targetBitrate
);
}
}
...
...
worker/src/RTC/WebRtcTransport.cpp
浏览文件 @
44dd434a
...
...
@@ -1413,28 +1413,28 @@ namespace RTC
// NOTE: No DataChannel support, si just ignore it.
}
inline
void
WebRtcTransport
::
OnRembClient
BitrateEstimation
(
RTC
::
RembClient
*
rembClient
,
int32_t
availableB
itrate
)
inline
void
WebRtcTransport
::
OnRembClient
AvailableBandwidth
(
RTC
::
RembClient
*
rembClient
,
int32_t
availableB
andwidth
)
{
MS_TRACE
();
// TODO
}
inline
void
WebRtcTransport
::
OnRembServerB
itrateEstimation
(
inline
void
WebRtcTransport
::
OnRembServerB
andwidth
(
const
RTC
::
RembServer
::
RemoteBitrateEstimator
*
/*rembServer*/
,
const
std
::
vector
<
uint32_t
>&
ssrcs
,
uint32_t
availableBitrate
)
uint32_t
bandwidth
)
{
MS_TRACE
();
uint32_t
effective
MaxBitrate
{
0u
};
uint32_t
effective
Bandwidth
{
0u
};
// Limit announced
available bitrate
if requested via API.
// Limit announced
bandwidth
if requested via API.
if
(
this
->
maxIncomingBitrate
!=
0u
)
effective
MaxBitrate
=
std
::
min
(
availableBitrate
,
this
->
maxIncomingBitrate
);
effective
Bandwidth
=
std
::
min
(
bandwidth
,
this
->
maxIncomingBitrate
);
else
effective
MaxBitrate
=
availableBitrate
;
effective
Bandwidth
=
bandwidth
;
if
(
MS_HAS_DEBUG_TAG
(
rbe
))
{
...
...
@@ -1448,15 +1448,15 @@ namespace RTC
MS_DEBUG_TAG
(
rbe
,
"sending RTCP REMB packet [
available
:%"
PRIu32
"bps, effective:%"
PRIu32
"bps, ssrcs:%s]"
,
availableBitrate
,
effective
MaxBitrate
,
"sending RTCP REMB packet [
bandwidth
:%"
PRIu32
"bps, effective:%"
PRIu32
"bps, ssrcs:%s]"
,
bandwidth
,
effective
Bandwidth
,
ssrcsStream
.
str
().
c_str
());
}
RTC
::
RTCP
::
FeedbackPsRembPacket
packet
(
0
,
0
);
packet
.
SetBitrate
(
effective
MaxBitrate
);
packet
.
SetBitrate
(
effective
Bandwidth
);
packet
.
SetSsrcs
(
ssrcs
);
packet
.
Serialize
(
RTC
::
RTCP
::
Buffer
);
SendRtcpPacket
(
&
packet
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论