OLD | NEW |
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/" | 211 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/" |
212 " will assign the group Enable to field trial WebRTC-FooFeature. Multiple " | 212 " will assign the group Enable to field trial WebRTC-FooFeature. Multiple " |
213 "trials are separated by \"/\""); | 213 "trials are separated by \"/\""); |
214 | 214 |
215 // Screenshare-specific flags. | 215 // Screenshare-specific flags. |
216 DEFINE_int(min_transmit_bitrate, 400, "Min transmit bitrate incl. padding."); | 216 DEFINE_int(min_transmit_bitrate, 400, "Min transmit bitrate incl. padding."); |
217 int MinTransmitBitrateKbps() { | 217 int MinTransmitBitrateKbps() { |
218 return FLAG_min_transmit_bitrate; | 218 return FLAG_min_transmit_bitrate; |
219 } | 219 } |
220 | 220 |
| 221 DEFINE_bool(generate_slides, |
| 222 false, |
| 223 "Whether to use randomly generated slides or read them from files."); |
| 224 bool GenerateSlides() { |
| 225 return static_cast<int>(FLAG_generate_slides); |
| 226 } |
| 227 |
221 DEFINE_int(slide_change_interval, | 228 DEFINE_int(slide_change_interval, |
222 10, | 229 10, |
223 "Interval (in seconds) between simulated slide changes."); | 230 "Interval (in seconds) between simulated slide changes."); |
224 int SlideChangeInterval() { | 231 int SlideChangeInterval() { |
225 return static_cast<int>(FLAG_slide_change_interval); | 232 return static_cast<int>(FLAG_slide_change_interval); |
226 } | 233 } |
227 | 234 |
228 DEFINE_int( | 235 DEFINE_int( |
229 scroll_duration, | 236 scroll_duration, |
230 0, | 237 0, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 flags::TargetBitrateKbps() * 1000, | 278 flags::TargetBitrateKbps() * 1000, |
272 flags::MaxBitrateKbps() * 1000, | 279 flags::MaxBitrateKbps() * 1000, |
273 false, | 280 false, |
274 flags::Codec(), | 281 flags::Codec(), |
275 flags::NumTemporalLayers(), | 282 flags::NumTemporalLayers(), |
276 flags::SelectedTL(), | 283 flags::SelectedTL(), |
277 flags::MinTransmitBitrateKbps() * 1000, | 284 flags::MinTransmitBitrateKbps() * 1000, |
278 false, // ULPFEC disabled. | 285 false, // ULPFEC disabled. |
279 false, // FlexFEC disabled. | 286 false, // FlexFEC disabled. |
280 ""}; | 287 ""}; |
281 params.screenshare = {true, flags::SlideChangeInterval(), | 288 params.screenshare = {true, flags::GenerateSlides(), |
| 289 flags::SlideChangeInterval(), |
282 flags::ScrollDuration(), flags::Slides()}; | 290 flags::ScrollDuration(), flags::Slides()}; |
283 params.analyzer = {"screenshare", 0.0, 0.0, flags::DurationSecs(), | 291 params.analyzer = {"screenshare", 0.0, 0.0, flags::DurationSecs(), |
284 flags::OutputFilename(), flags::GraphTitle()}; | 292 flags::OutputFilename(), flags::GraphTitle()}; |
285 params.pipe = pipe_config; | 293 params.pipe = pipe_config; |
286 params.logging = {flags::FLAG_logs, flags::RtcEventLogName(), | 294 params.logging = {flags::FLAG_logs, flags::RtcEventLogName(), |
287 flags::RtpDumpName(), flags::EncodedFramePath()}; | 295 flags::RtpDumpName(), flags::EncodedFramePath()}; |
288 | 296 |
289 if (flags::NumStreams() > 1 && flags::Stream0().empty() && | 297 if (flags::NumStreams() > 1 && flags::Stream0().empty() && |
290 flags::Stream1().empty()) { | 298 flags::Stream1().empty()) { |
291 params.ss.infer_streams = true; | 299 params.ss.infer_streams = true; |
(...skipping 27 matching lines...) Expand all Loading... |
319 } | 327 } |
320 | 328 |
321 // InitFieldTrialsFromString needs a reference to an std::string instance, | 329 // InitFieldTrialsFromString needs a reference to an std::string instance, |
322 // with a scope that outlives the test. | 330 // with a scope that outlives the test. |
323 std::string field_trials = webrtc::flags::FLAG_force_fieldtrials; | 331 std::string field_trials = webrtc::flags::FLAG_force_fieldtrials; |
324 webrtc::test::InitFieldTrialsFromString(field_trials); | 332 webrtc::test::InitFieldTrialsFromString(field_trials); |
325 | 333 |
326 webrtc::test::RunTest(webrtc::Loopback); | 334 webrtc::test::RunTest(webrtc::Loopback); |
327 return 0; | 335 return 0; |
328 } | 336 } |
OLD | NEW |