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

Side by Side Diff: webrtc/video/video_loopback.cc

Issue 1362923002: Revert of Wire up send-side bandwidth estimation. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Manual merge of revert Created 5 years, 2 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
« no previous file with comments | « webrtc/video/screenshare_loopback.cc ('k') | webrtc/video/video_quality_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 "Name of a target graph data file. If set, no preview will be shown."); 133 "Name of a target graph data file. If set, no preview will be shown.");
134 std::string OutputFilename() { 134 std::string OutputFilename() {
135 return static_cast<std::string>(FLAGS_output_filename); 135 return static_cast<std::string>(FLAGS_output_filename);
136 } 136 }
137 137
138 DEFINE_int32(duration, 60, "Duration of the test in seconds."); 138 DEFINE_int32(duration, 60, "Duration of the test in seconds.");
139 int DurationSecs() { 139 int DurationSecs() {
140 return static_cast<int>(FLAGS_duration); 140 return static_cast<int>(FLAGS_duration);
141 } 141 }
142 142
143 DEFINE_bool(send_side_bwe, true, "Use send-side bandwidth estimation");
144
145 } // namespace flags 143 } // namespace flags
146 144
147 void Loopback() { 145 void Loopback() {
148 FakeNetworkPipe::Config pipe_config; 146 FakeNetworkPipe::Config pipe_config;
149 pipe_config.loss_percent = flags::LossPercent(); 147 pipe_config.loss_percent = flags::LossPercent();
150 pipe_config.link_capacity_kbps = flags::LinkCapacityKbps(); 148 pipe_config.link_capacity_kbps = flags::LinkCapacityKbps();
151 pipe_config.queue_length_packets = flags::QueueSize(); 149 pipe_config.queue_length_packets = flags::QueueSize();
152 pipe_config.queue_delay_ms = flags::AvgPropagationDelayMs(); 150 pipe_config.queue_delay_ms = flags::AvgPropagationDelayMs();
153 pipe_config.delay_standard_deviation_ms = flags::StdPropagationDelayMs(); 151 pipe_config.delay_standard_deviation_ms = flags::StdPropagationDelayMs();
154 152
155 Call::Config::BitrateConfig call_bitrate_config; 153 Call::Config::BitrateConfig call_bitrate_config;
156 call_bitrate_config.min_bitrate_bps = flags::MinBitrateKbps() * 1000; 154 call_bitrate_config.min_bitrate_bps = flags::MinBitrateKbps() * 1000;
157 call_bitrate_config.start_bitrate_bps = flags::StartBitrateKbps() * 1000; 155 call_bitrate_config.start_bitrate_bps = flags::StartBitrateKbps() * 1000;
158 call_bitrate_config.max_bitrate_bps = flags::MaxBitrateKbps() * 1000; 156 call_bitrate_config.max_bitrate_bps = flags::MaxBitrateKbps() * 1000;
159 157
160 std::string clip = flags::Clip(); 158 std::string clip = flags::Clip();
161 std::string graph_title = clip.empty() ? "" : "video " + clip; 159 std::string graph_title = clip.empty() ? "" : "video " + clip;
162 VideoQualityTest::Params params{ 160 VideoQualityTest::Params params{
163 {flags::Width(), flags::Height(), flags::Fps(), 161 {
164 flags::MinBitrateKbps() * 1000, flags::TargetBitrateKbps() * 1000, 162 flags::Width(),
165 flags::MaxBitrateKbps() * 1000, flags::Codec(), 163 flags::Height(),
166 flags::NumTemporalLayers(), 164 flags::Fps(),
167 0, // No min transmit bitrate. 165 flags::MinBitrateKbps() * 1000,
168 call_bitrate_config, flags::TLDiscardThreshold(), 166 flags::TargetBitrateKbps() * 1000,
169 flags::FLAGS_send_side_bwe}, 167 flags::MaxBitrateKbps() * 1000,
168 flags::Codec(),
169 flags::NumTemporalLayers(),
170 0, // No min transmit bitrate.
171 call_bitrate_config,
172 flags::TLDiscardThreshold()
173 },
170 {clip}, 174 {clip},
171 {}, // Screenshare specific. 175 {}, // Screenshare specific.
172 {graph_title, 0.0, 0.0, flags::DurationSecs(), flags::OutputFilename()}, 176 {graph_title, 0.0, 0.0, flags::DurationSecs(), flags::OutputFilename()},
173 pipe_config, 177 pipe_config,
174 flags::FLAGS_logs}; 178 flags::FLAGS_logs};
175 179
176 VideoQualityTest test; 180 VideoQualityTest test;
177 if (flags::OutputFilename().empty()) 181 if (flags::OutputFilename().empty())
178 test.RunWithVideoRenderer(params); 182 test.RunWithVideoRenderer(params);
179 else 183 else
180 test.RunWithAnalyzer(params); 184 test.RunWithAnalyzer(params);
181 } 185 }
182 } // namespace webrtc 186 } // namespace webrtc
183 187
184 int main(int argc, char* argv[]) { 188 int main(int argc, char* argv[]) {
185 ::testing::InitGoogleTest(&argc, argv); 189 ::testing::InitGoogleTest(&argc, argv);
186 google::ParseCommandLineFlags(&argc, &argv, true); 190 google::ParseCommandLineFlags(&argc, &argv, true);
187 webrtc::test::InitFieldTrialsFromString( 191 webrtc::test::InitFieldTrialsFromString(
188 webrtc::flags::FLAGS_force_fieldtrials); 192 webrtc::flags::FLAGS_force_fieldtrials);
189 webrtc::test::RunTest(webrtc::Loopback); 193 webrtc::test::RunTest(webrtc::Loopback);
190 return 0; 194 return 0;
191 } 195 }
OLDNEW
« no previous file with comments | « webrtc/video/screenshare_loopback.cc ('k') | webrtc/video/video_quality_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698