OLD | NEW |
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 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 DEFINE_bool(plot_audio_jitter_buffer, | 104 DEFINE_bool(plot_audio_jitter_buffer, |
105 false, | 105 false, |
106 "Plot the audio jitter buffer delay profile."); | 106 "Plot the audio jitter buffer delay profile."); |
107 DEFINE_string( | 107 DEFINE_string( |
108 force_fieldtrials, | 108 force_fieldtrials, |
109 "", | 109 "", |
110 "Field trials control experimental feature code which can be forced. " | 110 "Field trials control experimental feature code which can be forced. " |
111 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/" | 111 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/" |
112 " will assign the group Enabled to field trial WebRTC-FooFeature. Multiple " | 112 " will assign the group Enabled to field trial WebRTC-FooFeature. Multiple " |
113 "trials are separated by \"/\""); | 113 "trials are separated by \"/\""); |
| 114 DEFINE_string(wav_filename, |
| 115 "", |
| 116 "Path to wav file used for simulation of jitter buffer"); |
114 DEFINE_bool(help, false, "prints this message"); | 117 DEFINE_bool(help, false, "prints this message"); |
115 | 118 |
116 DEFINE_bool(show_detector_state, | 119 DEFINE_bool(show_detector_state, |
117 false, | 120 false, |
118 "Show the state of the delay based BWE detector on the total " | 121 "Show the state of the delay based BWE detector on the total " |
119 "bitrate graph"); | 122 "bitrate graph"); |
120 | 123 |
121 void SetAllPlotFlags(bool setting); | 124 void SetAllPlotFlags(bool setting); |
122 | 125 |
123 | 126 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 if (FLAG_plot_audio_encoder_fec) { | 251 if (FLAG_plot_audio_encoder_fec) { |
249 analyzer.CreateAudioEncoderEnableFecGraph(collection->AppendNewPlot()); | 252 analyzer.CreateAudioEncoderEnableFecGraph(collection->AppendNewPlot()); |
250 } | 253 } |
251 if (FLAG_plot_audio_encoder_dtx) { | 254 if (FLAG_plot_audio_encoder_dtx) { |
252 analyzer.CreateAudioEncoderEnableDtxGraph(collection->AppendNewPlot()); | 255 analyzer.CreateAudioEncoderEnableDtxGraph(collection->AppendNewPlot()); |
253 } | 256 } |
254 if (FLAG_plot_audio_encoder_num_channels) { | 257 if (FLAG_plot_audio_encoder_num_channels) { |
255 analyzer.CreateAudioEncoderNumChannelsGraph(collection->AppendNewPlot()); | 258 analyzer.CreateAudioEncoderNumChannelsGraph(collection->AppendNewPlot()); |
256 } | 259 } |
257 if (FLAG_plot_audio_jitter_buffer) { | 260 if (FLAG_plot_audio_jitter_buffer) { |
258 analyzer.CreateAudioJitterBufferGraph( | 261 std::string wav_path; |
259 webrtc::test::ResourcePath( | 262 if (FLAG_wav_filename[0] != '\0') { |
260 "audio_processing/conversational_speech/EN_script2_F_sp2_B1", | 263 wav_path = FLAG_wav_filename; |
261 "wav"), | 264 } else { |
262 48000, collection->AppendNewPlot()); | 265 wav_path = webrtc::test::ResourcePath( |
| 266 "audio_processing/conversational_speech/EN_script2_F_sp2_B1", "wav"); |
| 267 } |
| 268 analyzer.CreateAudioJitterBufferGraph(wav_path, 48000, |
| 269 collection->AppendNewPlot()); |
263 } | 270 } |
264 | 271 |
265 collection->Draw(); | 272 collection->Draw(); |
266 | 273 |
267 return 0; | 274 return 0; |
268 } | 275 } |
269 | 276 |
270 | 277 |
271 void SetAllPlotFlags(bool setting) { | 278 void SetAllPlotFlags(bool setting) { |
272 FLAG_plot_incoming_packet_sizes = setting; | 279 FLAG_plot_incoming_packet_sizes = setting; |
(...skipping 15 matching lines...) Expand all Loading... |
288 FLAG_plot_fraction_loss_feedback = setting; | 295 FLAG_plot_fraction_loss_feedback = setting; |
289 FLAG_plot_timestamps = setting; | 296 FLAG_plot_timestamps = setting; |
290 FLAG_plot_audio_encoder_bitrate_bps = setting; | 297 FLAG_plot_audio_encoder_bitrate_bps = setting; |
291 FLAG_plot_audio_encoder_frame_length_ms = setting; | 298 FLAG_plot_audio_encoder_frame_length_ms = setting; |
292 FLAG_plot_audio_encoder_packet_loss = setting; | 299 FLAG_plot_audio_encoder_packet_loss = setting; |
293 FLAG_plot_audio_encoder_fec = setting; | 300 FLAG_plot_audio_encoder_fec = setting; |
294 FLAG_plot_audio_encoder_dtx = setting; | 301 FLAG_plot_audio_encoder_dtx = setting; |
295 FLAG_plot_audio_encoder_num_channels = setting; | 302 FLAG_plot_audio_encoder_num_channels = setting; |
296 FLAG_plot_audio_jitter_buffer = setting; | 303 FLAG_plot_audio_jitter_buffer = setting; |
297 } | 304 } |
OLD | NEW |