Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: webrtc/modules/pacing/alr_detector.cc

Issue 2986893002: Piggybacking simulcast id and ALR experiment id into video content type extension. (Closed)
Patch Set: Remove static initialization from VideoContentType and remove memoization in AlrDetector Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/pacing/alr_detector.h" 11 #include "webrtc/modules/pacing/alr_detector.h"
12 12
13 #include <map>
philipel 2017/08/29 12:06:15 Not used.
ilnik 2017/08/29 12:41:21 Done.
13 #include <string> 14 #include <string>
14 15
15 #include "webrtc/rtc_base/checks.h" 16 #include "webrtc/rtc_base/checks.h"
16 #include "webrtc/rtc_base/format_macros.h" 17 #include "webrtc/rtc_base/format_macros.h"
17 #include "webrtc/rtc_base/logging.h" 18 #include "webrtc/rtc_base/logging.h"
18 #include "webrtc/rtc_base/timeutils.h" 19 #include "webrtc/rtc_base/timeutils.h"
19 #include "webrtc/system_wrappers/include/field_trial.h" 20 #include "webrtc/system_wrappers/include/field_trial.h"
20 21
21 namespace webrtc { 22 namespace webrtc {
22 23
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const std::string kIgnoredSuffix = "_Dogfood"; 85 const std::string kIgnoredSuffix = "_Dogfood";
85 if (group_name.rfind(kIgnoredSuffix) == 86 if (group_name.rfind(kIgnoredSuffix) ==
86 group_name.length() - kIgnoredSuffix.length()) { 87 group_name.length() - kIgnoredSuffix.length()) {
87 group_name.resize(group_name.length() - kIgnoredSuffix.length()); 88 group_name.resize(group_name.length() - kIgnoredSuffix.length());
88 } 89 }
89 90
90 if (group_name.empty()) 91 if (group_name.empty())
91 return ret; 92 return ret;
92 93
93 AlrExperimentSettings settings; 94 AlrExperimentSettings settings;
94 if (sscanf(group_name.c_str(), "%f,%" PRId64 ",%d,%d,%d", 95 if (sscanf(group_name.c_str(), "%f,%" PRId64 ",%d,%d,%d,%d",
95 &settings.pacing_factor, &settings.max_paced_queue_time, 96 &settings.pacing_factor, &settings.max_paced_queue_time,
96 &settings.alr_bandwidth_usage_percent, 97 &settings.alr_bandwidth_usage_percent,
97 &settings.alr_start_budget_level_percent, 98 &settings.alr_start_budget_level_percent,
98 &settings.alr_stop_budget_level_percent) == 5) { 99 &settings.alr_stop_budget_level_percent,
100 &settings.group_id) == 6) {
99 ret.emplace(settings); 101 ret.emplace(settings);
100 LOG(LS_INFO) << "Using ALR experiment settings: " 102 LOG(LS_INFO) << "Using ALR experiment settings: "
101 "pacing factor: " 103 "pacing factor: "
102 << settings.pacing_factor << ", max pacer queue length: " 104 << settings.pacing_factor << ", max pacer queue length: "
103 << settings.max_paced_queue_time 105 << settings.max_paced_queue_time
104 << ", ALR start bandwidth usage percent: " 106 << ", ALR start bandwidth usage percent: "
105 << settings.alr_bandwidth_usage_percent 107 << settings.alr_bandwidth_usage_percent
106 << ", ALR end budget level percent: " 108 << ", ALR end budget level percent: "
107 << settings.alr_start_budget_level_percent 109 << settings.alr_start_budget_level_percent
108 << ", ALR end budget level percent: " 110 << ", ALR end budget level percent: "
109 << settings.alr_stop_budget_level_percent; 111 << settings.alr_stop_budget_level_percent
112 << ", ALR experiment group ID: " << settings.group_id;
110 } else { 113 } else {
111 LOG(LS_INFO) << "Failed to parse ALR experiment: " << experiment_name; 114 LOG(LS_INFO) << "Failed to parse ALR experiment: " << experiment_name;
112 } 115 }
113 116
114 return ret; 117 return ret;
115 } 118 }
116 119
117 } // namespace webrtc 120 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698