| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 126   return static_cast<int>(FLAG_queue_size); | 126   return static_cast<int>(FLAG_queue_size); | 
| 127 } | 127 } | 
| 128 | 128 | 
| 129 DEFINE_int(avg_propagation_delay_ms, | 129 DEFINE_int(avg_propagation_delay_ms, | 
| 130            0, | 130            0, | 
| 131            "Average link propagation delay in ms."); | 131            "Average link propagation delay in ms."); | 
| 132 int AvgPropagationDelayMs() { | 132 int AvgPropagationDelayMs() { | 
| 133   return static_cast<int>(FLAG_avg_propagation_delay_ms); | 133   return static_cast<int>(FLAG_avg_propagation_delay_ms); | 
| 134 } | 134 } | 
| 135 | 135 | 
|  | 136 DEFINE_string(rtc_event_log_name, "", "Filename for rtc event log."); | 
|  | 137 std::string RtcEventLogName() { | 
|  | 138   return static_cast<std::string>(FLAG_rtc_event_log_name); | 
|  | 139 } | 
|  | 140 | 
|  | 141 DEFINE_string(rtp_dump_name, "", "Filename for dumped received RTP stream."); | 
|  | 142 std::string RtpDumpName() { | 
|  | 143   return static_cast<std::string>(FLAG_rtp_dump_name); | 
|  | 144 } | 
|  | 145 | 
| 136 DEFINE_int(std_propagation_delay_ms, | 146 DEFINE_int(std_propagation_delay_ms, | 
| 137            0, | 147            0, | 
| 138            "Link propagation delay standard deviation in ms."); | 148            "Link propagation delay standard deviation in ms."); | 
| 139 int StdPropagationDelayMs() { | 149 int StdPropagationDelayMs() { | 
| 140   return static_cast<int>(FLAG_std_propagation_delay_ms); | 150   return static_cast<int>(FLAG_std_propagation_delay_ms); | 
| 141 } | 151 } | 
| 142 | 152 | 
| 143 DEFINE_int(num_streams, 0, "Number of streams to show or analyze."); | 153 DEFINE_int(num_streams, 0, "Number of streams to show or analyze."); | 
| 144 int NumStreams() { | 154 int NumStreams() { | 
| 145   return static_cast<int>(FLAG_num_streams); | 155   return static_cast<int>(FLAG_num_streams); | 
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 249   pipe_config.queue_delay_ms = flags::AvgPropagationDelayMs(); | 259   pipe_config.queue_delay_ms = flags::AvgPropagationDelayMs(); | 
| 250   pipe_config.delay_standard_deviation_ms = flags::StdPropagationDelayMs(); | 260   pipe_config.delay_standard_deviation_ms = flags::StdPropagationDelayMs(); | 
| 251   pipe_config.allow_reordering = flags::FLAG_allow_reordering; | 261   pipe_config.allow_reordering = flags::FLAG_allow_reordering; | 
| 252 | 262 | 
| 253   Call::Config::BitrateConfig call_bitrate_config; | 263   Call::Config::BitrateConfig call_bitrate_config; | 
| 254   call_bitrate_config.min_bitrate_bps = flags::MinBitrateKbps() * 1000; | 264   call_bitrate_config.min_bitrate_bps = flags::MinBitrateKbps() * 1000; | 
| 255   call_bitrate_config.start_bitrate_bps = flags::StartBitrateKbps() * 1000; | 265   call_bitrate_config.start_bitrate_bps = flags::StartBitrateKbps() * 1000; | 
| 256   call_bitrate_config.max_bitrate_bps = flags::MaxBitrateKbps() * 1000; | 266   call_bitrate_config.max_bitrate_bps = flags::MaxBitrateKbps() * 1000; | 
| 257 | 267 | 
| 258   VideoQualityTest::Params params; | 268   VideoQualityTest::Params params; | 
| 259   params.call = {flags::FLAG_send_side_bwe, call_bitrate_config}; | 269   params.call = {flags::FLAG_send_side_bwe, call_bitrate_config, 0}; | 
| 260   params.video = {flags::FLAG_video, | 270   params.video = {flags::FLAG_video, | 
| 261                   flags::Width(), | 271                   flags::Width(), | 
| 262                   flags::Height(), | 272                   flags::Height(), | 
| 263                   flags::Fps(), | 273                   flags::Fps(), | 
| 264                   flags::MinBitrateKbps() * 1000, | 274                   flags::MinBitrateKbps() * 1000, | 
| 265                   flags::TargetBitrateKbps() * 1000, | 275                   flags::TargetBitrateKbps() * 1000, | 
| 266                   flags::MaxBitrateKbps() * 1000, | 276                   flags::MaxBitrateKbps() * 1000, | 
| 267                   flags::FLAG_suspend_below_min_bitrate, | 277                   flags::FLAG_suspend_below_min_bitrate, | 
| 268                   flags::Codec(), | 278                   flags::Codec(), | 
| 269                   flags::NumTemporalLayers(), | 279                   flags::NumTemporalLayers(), | 
| 270                   flags::SelectedTL(), | 280                   flags::SelectedTL(), | 
| 271                   0,  // No min transmit bitrate. | 281                   0,  // No min transmit bitrate. | 
| 272                   flags::FLAG_use_ulpfec, | 282                   flags::FLAG_use_ulpfec, | 
| 273                   flags::FLAG_use_flexfec, | 283                   flags::FLAG_use_flexfec, | 
| 274                   flags::EncodedFramePath(), |  | 
| 275                   flags::Clip(), | 284                   flags::Clip(), | 
| 276                   flags::GetCaptureDevice()}; | 285                   flags::GetCaptureDevice()}; | 
| 277   params.audio = {flags::FLAG_audio, flags::FLAG_audio_video_sync, | 286   params.audio = {flags::FLAG_audio, flags::FLAG_audio_video_sync, | 
| 278                   flags::FLAG_audio_dtx}; | 287                   flags::FLAG_audio_dtx}; | 
|  | 288   params.logging = {flags::FLAG_logs, flags::FLAG_rtc_event_log_name, | 
|  | 289                     flags::FLAG_rtp_dump_name, flags::FLAG_encoded_frame_path}; | 
| 279   params.screenshare.enabled = false; | 290   params.screenshare.enabled = false; | 
| 280   params.analyzer = {"video", 0.0, 0.0, flags::DurationSecs(), | 291   params.analyzer = {"video", 0.0, 0.0, flags::DurationSecs(), | 
| 281       flags::OutputFilename(), flags::GraphTitle()}; | 292       flags::OutputFilename(), flags::GraphTitle()}; | 
| 282   params.pipe = pipe_config; | 293   params.pipe = pipe_config; | 
| 283   params.logs = flags::FLAG_logs; |  | 
| 284 | 294 | 
| 285   if (flags::NumStreams() > 1 && flags::Stream0().empty() && | 295   if (flags::NumStreams() > 1 && flags::Stream0().empty() && | 
| 286       flags::Stream1().empty()) { | 296       flags::Stream1().empty()) { | 
| 287     params.ss.infer_streams = true; | 297     params.ss.infer_streams = true; | 
| 288   } | 298   } | 
| 289 | 299 | 
| 290   std::vector<std::string> stream_descriptors; | 300   std::vector<std::string> stream_descriptors; | 
| 291   stream_descriptors.push_back(flags::Stream0()); | 301   stream_descriptors.push_back(flags::Stream0()); | 
| 292   stream_descriptors.push_back(flags::Stream1()); | 302   stream_descriptors.push_back(flags::Stream1()); | 
| 293   std::vector<std::string> SL_descriptors; | 303   std::vector<std::string> SL_descriptors; | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
| 315   } | 325   } | 
| 316 | 326 | 
| 317   // InitFieldTrialsFromString needs a reference to an std::string instance, | 327   // InitFieldTrialsFromString needs a reference to an std::string instance, | 
| 318   // with a scope that outlives the test. | 328   // with a scope that outlives the test. | 
| 319   std::string field_trials = webrtc::flags::FLAG_force_fieldtrials; | 329   std::string field_trials = webrtc::flags::FLAG_force_fieldtrials; | 
| 320   webrtc::test::InitFieldTrialsFromString(field_trials); | 330   webrtc::test::InitFieldTrialsFromString(field_trials); | 
| 321 | 331 | 
| 322   webrtc::test::RunTest(webrtc::Loopback); | 332   webrtc::test::RunTest(webrtc::Loopback); | 
| 323   return 0; | 333   return 0; | 
| 324 } | 334 } | 
| OLD | NEW | 
|---|