Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
M
mediasoup
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
聂卓夫
mediasoup
Commits
640fa345
Unverified
提交
640fa345
authored
4月 14, 2023
作者:
Vittorio Palmisano
提交者:
GitHub
4月 14, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix bandwidth probation dead state (#1031)
* Fix bandwidth probation dead state * Fix comment * Refactor timeout setting
上级
abfd942f
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
33 行增加
和
7 行删除
+33
-7
alr_detector.cc
...rtc/modules/congestion_controller/goog_cc/alr_detector.cc
+20
-1
alr_detector.h
...brtc/modules/congestion_controller/goog_cc/alr_detector.h
+3
-0
goog_cc_network_control.cc
.../congestion_controller/goog_cc/goog_cc_network_control.cc
+1
-1
alr_experiment.cc
...ibwebrtc/libwebrtc/rtc_base/experiments/alr_experiment.cc
+8
-5
alr_experiment.h
...libwebrtc/libwebrtc/rtc_base/experiments/alr_experiment.h
+1
-0
没有找到文件。
worker/deps/libwebrtc/libwebrtc/modules/congestion_controller/goog_cc/alr_detector.cc
浏览文件 @
640fa345
...
@@ -62,6 +62,11 @@ AlrDetector::AlrDetector(
...
@@ -62,6 +62,11 @@ AlrDetector::AlrDetector(
experiment_settings
experiment_settings
?
experiment_settings
->
alr_stop_budget_level_percent
/
100.0
?
experiment_settings
->
alr_stop_budget_level_percent
/
100.0
:
kDefaultStopBudgetLevelRatio
),
:
kDefaultStopBudgetLevelRatio
),
alr_timeout_
(
"alr_timeout"
,
experiment_settings
?
experiment_settings
->
alr_timeout
:
kDefaultAlrTimeout
),
alr_budget_
(
0
,
true
)
{
alr_budget_
(
0
,
true
)
{
ParseFieldTrial
({
&
bandwidth_usage_ratio_
,
&
start_budget_level_ratio_
,
ParseFieldTrial
({
&
bandwidth_usage_ratio_
,
&
start_budget_level_ratio_
,
&
stop_budget_level_ratio_
},
&
stop_budget_level_ratio_
},
...
@@ -73,7 +78,7 @@ AlrDetector::~AlrDetector() {}
...
@@ -73,7 +78,7 @@ AlrDetector::~AlrDetector() {}
void
AlrDetector
::
OnBytesSent
(
size_t
bytes_sent
,
int64_t
send_time_ms
)
{
void
AlrDetector
::
OnBytesSent
(
size_t
bytes_sent
,
int64_t
send_time_ms
)
{
if
(
!
last_send_time_ms_
.
has_value
())
{
if
(
!
last_send_time_ms_
.
has_value
())
{
last_send_time_ms_
=
send_time_ms
;
last_send_time_ms_
=
send_time_ms
;
// Since the duration for sending the bytes is unkn
wo
n, return without
// Since the duration for sending the bytes is unkn
ow
n, return without
// updating alr state.
// updating alr state.
return
;
return
;
}
}
...
@@ -109,4 +114,18 @@ absl::optional<int64_t> AlrDetector::GetApplicationLimitedRegionStartTime()
...
@@ -109,4 +114,18 @@ absl::optional<int64_t> AlrDetector::GetApplicationLimitedRegionStartTime()
return
alr_started_time_ms_
;
return
alr_started_time_ms_
;
}
}
absl
::
optional
<
int64_t
>
AlrDetector
::
GetApplicationLimitedRegionStartTime
(
int64_t
at_time_ms
)
{
if
(
!
alr_started_time_ms_
&&
*
last_send_time_ms_
)
{
int64_t
delta_time_ms
=
at_time_ms
-
*
last_send_time_ms_
;
// If ALR is stopped and we haven't sent any packets for a while, force start.
if
(
delta_time_ms
>
alr_timeout_
)
{
MS_WARN_TAG
(
bwe
,
"large delta_time_ms: %ld, forcing alr state change"
,
delta_time_ms
);
alr_started_time_ms_
.
emplace
(
at_time_ms
);
}
}
return
alr_started_time_ms_
;
}
}
// namespace webrtc
}
// namespace webrtc
worker/deps/libwebrtc/libwebrtc/modules/congestion_controller/goog_cc/alr_detector.h
浏览文件 @
640fa345
...
@@ -43,6 +43,7 @@ class AlrDetector {
...
@@ -43,6 +43,7 @@ class AlrDetector {
// Returns time in milliseconds when the current application-limited region
// Returns time in milliseconds when the current application-limited region
// started or empty result if the sender is currently not application-limited.
// started or empty result if the sender is currently not application-limited.
absl
::
optional
<
int64_t
>
GetApplicationLimitedRegionStartTime
()
const
;
absl
::
optional
<
int64_t
>
GetApplicationLimitedRegionStartTime
()
const
;
absl
::
optional
<
int64_t
>
GetApplicationLimitedRegionStartTime
(
int64_t
at_time_ms
);
void
UpdateBudgetWithElapsedTime
(
int64_t
delta_time_ms
);
void
UpdateBudgetWithElapsedTime
(
int64_t
delta_time_ms
);
void
UpdateBudgetWithBytesSent
(
size_t
bytes_sent
);
void
UpdateBudgetWithBytesSent
(
size_t
bytes_sent
);
...
@@ -56,6 +57,7 @@ class AlrDetector {
...
@@ -56,6 +57,7 @@ class AlrDetector {
static
constexpr
double
kDefaultBandwidthUsageRatio
=
0
.
65
;
static
constexpr
double
kDefaultBandwidthUsageRatio
=
0
.
65
;
static
constexpr
double
kDefaultStartBudgetLevelRatio
=
0
.
80
;
static
constexpr
double
kDefaultStartBudgetLevelRatio
=
0
.
80
;
static
constexpr
double
kDefaultStopBudgetLevelRatio
=
0
.
50
;
static
constexpr
double
kDefaultStopBudgetLevelRatio
=
0
.
50
;
static
constexpr
int
kDefaultAlrTimeout
=
3000
;
AlrDetector
(
const
WebRtcKeyValueConfig
*
key_value_config
,
AlrDetector
(
const
WebRtcKeyValueConfig
*
key_value_config
,
absl
::
optional
<
AlrExperimentSettings
>
experiment_settings
);
absl
::
optional
<
AlrExperimentSettings
>
experiment_settings
);
...
@@ -64,6 +66,7 @@ class AlrDetector {
...
@@ -64,6 +66,7 @@ class AlrDetector {
FieldTrialParameter
<
double
>
bandwidth_usage_ratio_
;
FieldTrialParameter
<
double
>
bandwidth_usage_ratio_
;
FieldTrialParameter
<
double
>
start_budget_level_ratio_
;
FieldTrialParameter
<
double
>
start_budget_level_ratio_
;
FieldTrialParameter
<
double
>
stop_budget_level_ratio_
;
FieldTrialParameter
<
double
>
stop_budget_level_ratio_
;
FieldTrialParameter
<
int
>
alr_timeout_
;
absl
::
optional
<
int64_t
>
last_send_time_ms_
;
absl
::
optional
<
int64_t
>
last_send_time_ms_
;
...
...
worker/deps/libwebrtc/libwebrtc/modules/congestion_controller/goog_cc/goog_cc_network_control.cc
浏览文件 @
640fa345
...
@@ -195,7 +195,7 @@ NetworkControlUpdate GoogCcNetworkController::OnProcessInterval(
...
@@ -195,7 +195,7 @@ NetworkControlUpdate GoogCcNetworkController::OnProcessInterval(
}
}
bandwidth_estimation_
->
UpdateEstimate
(
msg
.
at_time
);
bandwidth_estimation_
->
UpdateEstimate
(
msg
.
at_time
);
absl
::
optional
<
int64_t
>
start_time_ms
=
absl
::
optional
<
int64_t
>
start_time_ms
=
alr_detector_
->
GetApplicationLimitedRegionStartTime
();
alr_detector_
->
GetApplicationLimitedRegionStartTime
(
msg
.
at_time
.
ms
()
);
probe_controller_
->
SetAlrStartTimeMs
(
start_time_ms
);
probe_controller_
->
SetAlrStartTimeMs
(
start_time_ms
);
auto
probes
=
probe_controller_
->
Process
(
msg
.
at_time
.
ms
());
auto
probes
=
probe_controller_
->
Process
(
msg
.
at_time
.
ms
());
...
...
worker/deps/libwebrtc/libwebrtc/rtc_base/experiments/alr_experiment.cc
浏览文件 @
640fa345
...
@@ -26,7 +26,7 @@ const char AlrExperimentSettings::kScreenshareProbingBweExperimentName[] =
...
@@ -26,7 +26,7 @@ const char AlrExperimentSettings::kScreenshareProbingBweExperimentName[] =
"WebRTC-ProbingScreenshareBwe"
;
"WebRTC-ProbingScreenshareBwe"
;
const
char
AlrExperimentSettings
::
kStrictPacingAndProbingExperimentName
[]
=
const
char
AlrExperimentSettings
::
kStrictPacingAndProbingExperimentName
[]
=
"WebRTC-StrictPacingAndProbing"
;
"WebRTC-StrictPacingAndProbing"
;
const
char
kDefaultProbingScreenshareBweSettings
[]
=
"1.0,2875,80,40,-60,3"
;
const
char
kDefaultProbingScreenshareBweSettings
[]
=
"1.0,2875,80,40,-60,3
,3000
"
;
bool
AlrExperimentSettings
::
MaxOneFieldTrialEnabled
()
{
bool
AlrExperimentSettings
::
MaxOneFieldTrialEnabled
()
{
return
AlrExperimentSettings
::
MaxOneFieldTrialEnabled
(
return
AlrExperimentSettings
::
MaxOneFieldTrialEnabled
(
...
@@ -71,12 +71,13 @@ AlrExperimentSettings::CreateFromFieldTrial(
...
@@ -71,12 +71,13 @@ AlrExperimentSettings::CreateFromFieldTrial(
}
}
AlrExperimentSettings
settings
;
AlrExperimentSettings
settings
;
if
(
sscanf
(
group_name
.
c_str
(),
"%f,%"
PRId64
",%d,%d,%d,%d"
,
if
(
sscanf
(
group_name
.
c_str
(),
"%f,%"
PRId64
",%d,%d,%d,%d
,%d
"
,
&
settings
.
pacing_factor
,
&
settings
.
max_paced_queue_time
,
&
settings
.
pacing_factor
,
&
settings
.
max_paced_queue_time
,
&
settings
.
alr_bandwidth_usage_percent
,
&
settings
.
alr_bandwidth_usage_percent
,
&
settings
.
alr_start_budget_level_percent
,
&
settings
.
alr_start_budget_level_percent
,
&
settings
.
alr_stop_budget_level_percent
,
&
settings
.
alr_stop_budget_level_percent
,
&
settings
.
group_id
)
==
6
)
{
&
settings
.
group_id
,
&
settings
.
alr_timeout
)
==
7
)
{
ret
.
emplace
(
settings
);
ret
.
emplace
(
settings
);
MS_DEBUG_TAG
(
bwe
,
"Using ALR experiment settings: "
MS_DEBUG_TAG
(
bwe
,
"Using ALR experiment settings: "
"pacing factor: %f"
"pacing factor: %f"
...
@@ -84,13 +85,15 @@ AlrExperimentSettings::CreateFromFieldTrial(
...
@@ -84,13 +85,15 @@ AlrExperimentSettings::CreateFromFieldTrial(
", ALR bandwidth usage percent: %d"
", ALR bandwidth usage percent: %d"
", ALR start budget level percent: %d"
", ALR start budget level percent: %d"
", ALR end budget level percent: %d"
", ALR end budget level percent: %d"
", ALR experiment group ID: %d"
,
", ALR experiment group ID: %d"
", ALR timeout: %d"
,
settings
.
pacing_factor
,
settings
.
pacing_factor
,
settings
.
max_paced_queue_time
,
settings
.
max_paced_queue_time
,
settings
.
alr_bandwidth_usage_percent
,
settings
.
alr_bandwidth_usage_percent
,
settings
.
alr_start_budget_level_percent
,
settings
.
alr_start_budget_level_percent
,
settings
.
alr_stop_budget_level_percent
,
settings
.
alr_stop_budget_level_percent
,
settings
.
group_id
);
settings
.
group_id
,
settings
.
alr_timeout
);
}
else
{
}
else
{
MS_DEBUG_TAG
(
bwe
,
"Failed to parse ALR experiment: %s"
,
experiment_name
);
MS_DEBUG_TAG
(
bwe
,
"Failed to parse ALR experiment: %s"
,
experiment_name
);
}
}
...
...
worker/deps/libwebrtc/libwebrtc/rtc_base/experiments/alr_experiment.h
浏览文件 @
640fa345
...
@@ -24,6 +24,7 @@ struct AlrExperimentSettings {
...
@@ -24,6 +24,7 @@ struct AlrExperimentSettings {
int
alr_bandwidth_usage_percent
;
int
alr_bandwidth_usage_percent
;
int
alr_start_budget_level_percent
;
int
alr_start_budget_level_percent
;
int
alr_stop_budget_level_percent
;
int
alr_stop_budget_level_percent
;
int
alr_timeout
;
// Will be sent to the receive side for stats slicing.
// Will be sent to the receive side for stats slicing.
// Can be 0..6, because it's sent as a 3 bits value and there's also
// Can be 0..6, because it's sent as a 3 bits value and there's also
// reserved value to indicate absence of experiment.
// reserved value to indicate absence of experiment.
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论