Chromium Code Reviews| 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 |
| 11 #include <iostream> | 11 #include <iostream> |
| 12 | 12 |
| 13 #include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" | 13 #include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h" |
| 14 #include "webrtc/rtc_base/flags.h" | 14 #include "webrtc/rtc_base/flags.h" |
| 15 #include "webrtc/rtc_tools/event_log_visualizer/analyzer.h" | 15 #include "webrtc/rtc_tools/event_log_visualizer/analyzer.h" |
| 16 #include "webrtc/rtc_tools/event_log_visualizer/plot_base.h" | 16 #include "webrtc/rtc_tools/event_log_visualizer/plot_base.h" |
| 17 #include "webrtc/rtc_tools/event_log_visualizer/plot_python.h" | 17 #include "webrtc/rtc_tools/event_log_visualizer/plot_python.h" |
| 18 #include "webrtc/test/field_trial.h" | 18 #include "webrtc/test/field_trial.h" |
| 19 #include "webrtc/test/testsupport/fileutils.h" | 19 #include "webrtc/test/testsupport/fileutils.h" |
| 20 | 20 |
| 21 DEFINE_string(plot_profile, | |
| 22 "default", | |
| 23 "A profile that selects a certain subset of the plots. Currently " | |
| 24 "defined profiles are \"all\", \"none\" and \"default\""); | |
| 25 | |
| 21 DEFINE_bool(incoming, true, "Plot statistics for incoming packets."); | 26 DEFINE_bool(incoming, true, "Plot statistics for incoming packets."); |
| 22 DEFINE_bool(outgoing, true, "Plot statistics for outgoing packets."); | 27 DEFINE_bool(outgoing, true, "Plot statistics for outgoing packets."); |
| 23 DEFINE_bool(plot_all, true, "Plot all different data types."); | 28 DEFINE_bool(plot_packet_sizes, |
| 24 DEFINE_bool(plot_packets, | |
| 25 false, | 29 false, |
| 26 "Plot bar graph showing the size of each packet."); | 30 "Plot bar graph showing the size of each packet."); |
| 31 DEFINE_bool(plot_packet_count, | |
| 32 false, | |
| 33 "Plot the accumulated number of packets for each stream."); | |
| 27 DEFINE_bool(plot_audio_playout, | 34 DEFINE_bool(plot_audio_playout, |
| 28 false, | 35 false, |
| 29 "Plot bar graph showing the time between each audio playout."); | 36 "Plot bar graph showing the time between each audio playout."); |
| 30 DEFINE_bool(plot_audio_level, | 37 DEFINE_bool(plot_audio_level, |
| 31 false, | 38 false, |
| 32 "Plot line graph showing the audio level."); | 39 "Plot line graph showing the audio level of incoming audio."); |
| 40 DEFINE_bool(plot_sequence_number, | |
| 41 false, | |
| 42 "Plot the sequence number difference between consecutive incoming " | |
| 43 "packets."); | |
| 33 DEFINE_bool( | 44 DEFINE_bool( |
| 34 plot_sequence_number, | 45 plot_incoming_delay_delta, |
| 35 false, | |
| 36 "Plot the difference in sequence number between consecutive packets."); | |
| 37 DEFINE_bool( | |
| 38 plot_delay_change, | |
| 39 false, | 46 false, |
| 40 "Plot the difference in 1-way path delay between consecutive packets."); | 47 "Plot the difference in 1-way path delay between consecutive packets."); |
| 41 DEFINE_bool(plot_accumulated_delay_change, | 48 DEFINE_bool(plot_incoming_delay, |
| 49 true, | |
| 50 "Plot the 1-way path delay for incoming packets, normalized so " | |
| 51 "that the first packet has delay 0."); | |
| 52 DEFINE_bool(plot_incoming_loss_rate, | |
| 53 true, | |
| 54 "Compute the loss rate for incoming packets using a method that's " | |
| 55 "similar to the one used for RTCP SR and RR fraction lost. Note " | |
| 56 "that the loss rate can be negative if packets are duplicated or " | |
| 57 "reordered."); | |
| 58 DEFINE_bool(plot_total_bitrate, | |
| 59 true, | |
| 60 "Plot the total bitrate used by all streams."); | |
| 61 DEFINE_bool(plot_stream_bitrate, true, "Plot the bitrate used by each stream."); | |
| 62 DEFINE_bool(plot_simulated_sendside_bwe, | |
| 42 false, | 63 false, |
| 43 "Plot the accumulated 1-way path delay change, or the path delay " | 64 "Run the send-side bandwidth estimator with the outgoing rtp and " |
| 44 "change compared to the first packet."); | 65 "incoming rtcp and plot the resulting estimate."); |
| 45 DEFINE_bool(plot_total_bitrate, | |
| 46 false, | |
| 47 "Plot the total bitrate used by all streams."); | |
| 48 DEFINE_bool(plot_stream_bitrate, | |
| 49 false, | |
| 50 "Plot the bitrate used by each stream."); | |
| 51 DEFINE_bool(plot_bwe, | |
| 52 false, | |
| 53 "Run the bandwidth estimator with the logged rtp and rtcp and plot " | |
| 54 "the output."); | |
| 55 DEFINE_bool(plot_network_delay_feedback, | 66 DEFINE_bool(plot_network_delay_feedback, |
| 56 false, | 67 true, |
| 57 "Compute network delay based on sent packets and the received " | 68 "Compute network delay based on sent packets and the received " |
| 58 "transport feedback."); | 69 "transport feedback."); |
| 59 DEFINE_bool(plot_fraction_loss, | 70 DEFINE_bool(plot_fraction_loss_feedback, |
| 60 false, | 71 true, |
| 61 "Plot packet loss in percent for outgoing packets (as perceived by " | 72 "Plot packet loss in percent for outgoing packets (as perceived by " |
| 62 "the send-side bandwidth estimator)."); | 73 "the send-side bandwidth estimator)."); |
| 63 DEFINE_bool(plot_timestamps, | 74 DEFINE_bool(plot_timestamps, |
| 64 false, | 75 false, |
| 65 "Plot the rtp timestamps of all rtp and rtcp packets over time."); | 76 "Plot the rtp timestamps of all rtp and rtcp packets over time."); |
| 66 DEFINE_bool(audio_encoder_bitrate_bps, | 77 DEFINE_bool(plot_audio_encoder_bitrate_bps, |
| 67 false, | 78 false, |
| 68 "Plot the audio encoder target bitrate."); | 79 "Plot the audio encoder target bitrate."); |
| 69 DEFINE_bool(audio_encoder_frame_length_ms, | 80 DEFINE_bool(plot_audio_encoder_frame_length_ms, |
| 70 false, | 81 false, |
| 71 "Plot the audio encoder frame length."); | 82 "Plot the audio encoder frame length."); |
| 72 DEFINE_bool( | 83 DEFINE_bool( |
| 73 audio_encoder_uplink_packet_loss_fraction, | 84 plot_audio_encoder_packet_loss, |
| 74 false, | 85 false, |
| 75 "Plot the uplink packet loss fraction which is send to the audio encoder."); | 86 "Plot the uplink packet loss fraction which is sent to the audio encoder."); |
| 76 DEFINE_bool(audio_encoder_fec, false, "Plot the audio encoder FEC."); | 87 DEFINE_bool(plot_audio_encoder_fec, false, "Plot the audio encoder FEC."); |
| 77 DEFINE_bool(audio_encoder_dtx, false, "Plot the audio encoder DTX."); | 88 DEFINE_bool(plot_audio_encoder_dtx, false, "Plot the audio encoder DTX."); |
| 78 DEFINE_bool(audio_encoder_num_channels, | 89 DEFINE_bool(plot_audio_encoder_num_channels, |
| 79 false, | 90 false, |
| 80 "Plot the audio encoder number of channels."); | 91 "Plot the audio encoder number of channels."); |
| 81 DEFINE_bool(plot_audio_jitter_buffer, | 92 DEFINE_bool(plot_audio_jitter_buffer, |
| 82 false, | 93 false, |
| 83 "Plot the audio jitter buffer delay profile."); | 94 "Plot the audio jitter buffer delay profile."); |
| 84 DEFINE_string( | 95 DEFINE_string( |
| 85 force_fieldtrials, | 96 force_fieldtrials, |
| 86 "", | 97 "", |
| 87 "Field trials control experimental feature code which can be forced. " | 98 "Field trials control experimental feature code which can be forced. " |
| 88 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/" | 99 "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/" |
| 89 " will assign the group Enabled to field trial WebRTC-FooFeature. Multiple " | 100 " will assign the group Enabled to field trial WebRTC-FooFeature. Multiple " |
| 90 "trials are separated by \"/\""); | 101 "trials are separated by \"/\""); |
| 91 DEFINE_bool(help, false, "prints this message"); | 102 DEFINE_bool(help, false, "prints this message"); |
| 92 | 103 |
| 93 DEFINE_bool( | 104 DEFINE_bool(show_detector_state, |
| 94 show_detector_state, | 105 false, |
| 95 false, | 106 "Show the state of the delay based BWE detector on the total " |
| 96 "Mark the delay based bwe detector state on the total bitrate graph"); | 107 "bitrate graph"); |
| 108 | |
| 109 void SetAllPlotFlags(bool setting); | |
| 110 | |
| 97 | 111 |
| 98 int main(int argc, char* argv[]) { | 112 int main(int argc, char* argv[]) { |
| 99 std::string program_name = argv[0]; | 113 std::string program_name = argv[0]; |
| 100 std::string usage = | 114 std::string usage = |
| 101 "A tool for visualizing WebRTC event logs.\n" | 115 "A tool for visualizing WebRTC event logs.\n" |
| 102 "Example usage:\n" + | 116 "Example usage:\n" + |
| 103 program_name + " <logfile> | python\n" + "Run " + program_name + | 117 program_name + " <logfile> | python\n" + "Run " + program_name + |
| 104 " --help for a list of command line options\n"; | 118 " --help for a list of command line options\n"; |
| 119 | |
| 120 // Parse command line flags without removing them. We're only interested in | |
| 121 // the |plot_profile| flag. | |
| 122 rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, false); | |
| 123 if (strcmp(FLAG_plot_profile, "all") == 0) { | |
| 124 SetAllPlotFlags(true); | |
| 125 } else if (strcmp(FLAG_plot_profile, "none") == 0) { | |
| 126 SetAllPlotFlags(false); | |
| 127 } else if (strcmp(FLAG_plot_profile, "default") == 0) { | |
| 128 // Do nothing. | |
| 129 } else { | |
| 130 rtc::Flag* plot_profile_flag = rtc::FlagList::Lookup("plot_profile"); | |
| 131 RTC_CHECK(plot_profile_flag); | |
| 132 plot_profile_flag->Print(false); | |
| 133 } | |
| 134 // Parse the remaining flags. They are applied relative to the chosen profile. | |
| 105 rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 135 rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
| 136 | |
| 106 if (argc != 2 || FLAG_help) { | 137 if (argc != 2 || FLAG_help) { |
| 107 // Print usage information. | 138 // Print usage information. |
| 108 std::cout << usage; | 139 std::cout << usage; |
| 109 if (FLAG_help) | 140 if (FLAG_help) |
| 110 rtc::FlagList::Print(nullptr, false); | 141 rtc::FlagList::Print(nullptr, false); |
| 111 return 0; | 142 return 0; |
| 112 } | 143 } |
| 113 | 144 |
| 114 webrtc::test::SetExecutablePath(argv[0]); | 145 webrtc::test::SetExecutablePath(argv[0]); |
| 115 webrtc::test::InitFieldTrialsFromString(FLAG_force_fieldtrials); | 146 webrtc::test::InitFieldTrialsFromString(FLAG_force_fieldtrials); |
| 116 | 147 |
| 117 std::string filename = argv[1]; | 148 std::string filename = argv[1]; |
| 118 | 149 |
| 119 webrtc::ParsedRtcEventLog parsed_log; | 150 webrtc::ParsedRtcEventLog parsed_log; |
| 120 | 151 |
| 121 if (!parsed_log.ParseFile(filename)) { | 152 if (!parsed_log.ParseFile(filename)) { |
| 122 std::cerr << "Could not parse the entire log file." << std::endl; | 153 std::cerr << "Could not parse the entire log file." << std::endl; |
| 123 std::cerr << "Proceeding to analyze the first " | 154 std::cerr << "Proceeding to analyze the first " |
| 124 << parsed_log.GetNumberOfEvents() << " events in the file." | 155 << parsed_log.GetNumberOfEvents() << " events in the file." |
| 125 << std::endl; | 156 << std::endl; |
| 126 } | 157 } |
| 127 | 158 |
| 128 webrtc::plotting::EventLogAnalyzer analyzer(parsed_log); | 159 webrtc::plotting::EventLogAnalyzer analyzer(parsed_log); |
| 129 std::unique_ptr<webrtc::plotting::PlotCollection> collection( | 160 std::unique_ptr<webrtc::plotting::PlotCollection> collection( |
| 130 new webrtc::plotting::PythonPlotCollection()); | 161 new webrtc::plotting::PythonPlotCollection()); |
| 131 | 162 |
| 132 if (FLAG_plot_all || FLAG_plot_packets) { | 163 if (FLAG_plot_packet_sizes) { |
| 133 if (FLAG_incoming) { | 164 if (FLAG_incoming) { |
| 134 analyzer.CreatePacketGraph(webrtc::PacketDirection::kIncomingPacket, | 165 analyzer.CreatePacketGraph(webrtc::PacketDirection::kIncomingPacket, |
| 135 collection->AppendNewPlot()); | 166 collection->AppendNewPlot()); |
| 167 } | |
| 168 if (FLAG_outgoing) { | |
| 169 analyzer.CreatePacketGraph(webrtc::PacketDirection::kOutgoingPacket, | |
| 170 collection->AppendNewPlot()); | |
| 171 } | |
| 172 } | |
| 173 if (FLAG_plot_packet_count) { | |
| 174 if (FLAG_incoming) { | |
|
minyue-webrtc
2017/07/21 15:08:43
I would suggest remove FLAG_incoming and FLAG_outg
terelius
2017/08/08 12:15:59
Done.
| |
| 136 analyzer.CreateAccumulatedPacketsGraph( | 175 analyzer.CreateAccumulatedPacketsGraph( |
| 137 webrtc::PacketDirection::kIncomingPacket, | 176 webrtc::PacketDirection::kIncomingPacket, |
| 138 collection->AppendNewPlot()); | 177 collection->AppendNewPlot()); |
| 139 } | 178 } |
| 140 if (FLAG_outgoing) { | 179 if (FLAG_outgoing) { |
| 141 analyzer.CreatePacketGraph(webrtc::PacketDirection::kOutgoingPacket, | |
| 142 collection->AppendNewPlot()); | |
| 143 analyzer.CreateAccumulatedPacketsGraph( | 180 analyzer.CreateAccumulatedPacketsGraph( |
| 144 webrtc::PacketDirection::kOutgoingPacket, | 181 webrtc::PacketDirection::kOutgoingPacket, |
| 145 collection->AppendNewPlot()); | 182 collection->AppendNewPlot()); |
| 146 } | 183 } |
| 147 } | 184 } |
| 148 | 185 if (FLAG_plot_audio_playout) { |
| 149 if (FLAG_plot_all || FLAG_plot_audio_playout) { | |
| 150 analyzer.CreatePlayoutGraph(collection->AppendNewPlot()); | 186 analyzer.CreatePlayoutGraph(collection->AppendNewPlot()); |
| 151 } | 187 } |
| 152 | 188 if (FLAG_plot_audio_level) { |
| 153 if (FLAG_plot_all || FLAG_plot_audio_level) { | |
| 154 analyzer.CreateAudioLevelGraph(collection->AppendNewPlot()); | 189 analyzer.CreateAudioLevelGraph(collection->AppendNewPlot()); |
| 155 } | 190 } |
| 156 | 191 if (FLAG_plot_sequence_number && FLAG_incoming) { |
| 157 if (FLAG_plot_all || FLAG_plot_sequence_number) { | 192 analyzer.CreateSequenceNumberGraph(collection->AppendNewPlot()); |
| 158 if (FLAG_incoming) { | |
| 159 analyzer.CreateSequenceNumberGraph(collection->AppendNewPlot()); | |
| 160 } | |
| 161 } | 193 } |
| 162 | 194 if (FLAG_plot_incoming_delay_delta && FLAG_incoming) { |
| 163 if (FLAG_plot_all || FLAG_plot_delay_change) { | 195 analyzer.CreateIncomingDelayDeltaGraph(collection->AppendNewPlot()); |
| 164 if (FLAG_incoming) { | |
| 165 analyzer.CreateDelayChangeGraph(collection->AppendNewPlot()); | |
| 166 } | |
| 167 } | 196 } |
| 168 | 197 if (FLAG_plot_incoming_delay && FLAG_incoming) { |
| 169 if (FLAG_plot_all || FLAG_plot_accumulated_delay_change) { | 198 analyzer.CreateIncomingDelayGraph(collection->AppendNewPlot()); |
| 170 if (FLAG_incoming) { | |
| 171 analyzer.CreateAccumulatedDelayChangeGraph(collection->AppendNewPlot()); | |
| 172 } | |
| 173 } | 199 } |
| 174 | 200 if (FLAG_plot_incoming_loss_rate && FLAG_incoming) { |
| 175 if (FLAG_plot_all || FLAG_plot_fraction_loss) { | |
| 176 analyzer.CreateFractionLossGraph(collection->AppendNewPlot()); | |
| 177 analyzer.CreateIncomingPacketLossGraph(collection->AppendNewPlot()); | 201 analyzer.CreateIncomingPacketLossGraph(collection->AppendNewPlot()); |
| 178 } | 202 } |
| 179 | 203 if (FLAG_plot_total_bitrate) { |
| 180 if (FLAG_plot_all || FLAG_plot_total_bitrate) { | |
| 181 if (FLAG_incoming) { | 204 if (FLAG_incoming) { |
| 182 analyzer.CreateTotalBitrateGraph(webrtc::PacketDirection::kIncomingPacket, | 205 analyzer.CreateTotalBitrateGraph(webrtc::PacketDirection::kIncomingPacket, |
| 183 collection->AppendNewPlot(), | 206 collection->AppendNewPlot(), |
| 184 FLAG_show_detector_state); | 207 FLAG_show_detector_state); |
| 185 } | 208 } |
| 186 if (FLAG_outgoing) { | 209 if (FLAG_outgoing) { |
| 187 analyzer.CreateTotalBitrateGraph(webrtc::PacketDirection::kOutgoingPacket, | 210 analyzer.CreateTotalBitrateGraph(webrtc::PacketDirection::kOutgoingPacket, |
| 188 collection->AppendNewPlot(), | 211 collection->AppendNewPlot(), |
| 189 FLAG_show_detector_state); | 212 FLAG_show_detector_state); |
| 190 } | 213 } |
| 191 } | 214 } |
| 192 | 215 if (FLAG_plot_stream_bitrate) { |
| 193 if (FLAG_plot_all || FLAG_plot_stream_bitrate) { | |
| 194 if (FLAG_incoming) { | 216 if (FLAG_incoming) { |
| 195 analyzer.CreateStreamBitrateGraph( | 217 analyzer.CreateStreamBitrateGraph( |
| 196 webrtc::PacketDirection::kIncomingPacket, | 218 webrtc::PacketDirection::kIncomingPacket, |
| 197 collection->AppendNewPlot()); | 219 collection->AppendNewPlot()); |
| 198 } | 220 } |
| 199 if (FLAG_outgoing) { | 221 if (FLAG_outgoing) { |
| 200 analyzer.CreateStreamBitrateGraph( | 222 analyzer.CreateStreamBitrateGraph( |
| 201 webrtc::PacketDirection::kOutgoingPacket, | 223 webrtc::PacketDirection::kOutgoingPacket, |
| 202 collection->AppendNewPlot()); | 224 collection->AppendNewPlot()); |
| 203 } | 225 } |
| 204 } | 226 } |
| 205 | 227 if (FLAG_plot_simulated_sendside_bwe) { |
| 206 if (FLAG_plot_all || FLAG_plot_bwe) { | |
| 207 analyzer.CreateBweSimulationGraph(collection->AppendNewPlot()); | 228 analyzer.CreateBweSimulationGraph(collection->AppendNewPlot()); |
| 208 } | 229 } |
| 209 | 230 if (FLAG_plot_network_delay_feedback) { |
| 210 if (FLAG_plot_all || FLAG_plot_network_delay_feedback) { | |
| 211 analyzer.CreateNetworkDelayFeedbackGraph(collection->AppendNewPlot()); | 231 analyzer.CreateNetworkDelayFeedbackGraph(collection->AppendNewPlot()); |
| 212 } | 232 } |
| 213 | 233 if (FLAG_plot_fraction_loss_feedback && FLAG_outgoing) { |
| 214 if (FLAG_plot_all || FLAG_plot_timestamps) { | 234 analyzer.CreateFractionLossGraph(collection->AppendNewPlot()); |
| 235 } | |
| 236 if (FLAG_plot_timestamps) { | |
| 215 analyzer.CreateTimestampGraph(collection->AppendNewPlot()); | 237 analyzer.CreateTimestampGraph(collection->AppendNewPlot()); |
| 216 } | 238 } |
| 217 | 239 if (FLAG_plot_audio_encoder_bitrate_bps) { |
| 218 if (FLAG_plot_all || FLAG_audio_encoder_bitrate_bps) { | |
| 219 analyzer.CreateAudioEncoderTargetBitrateGraph(collection->AppendNewPlot()); | 240 analyzer.CreateAudioEncoderTargetBitrateGraph(collection->AppendNewPlot()); |
| 220 } | 241 } |
| 221 | 242 if (FLAG_plot_audio_encoder_frame_length_ms) { |
| 222 if (FLAG_plot_all || FLAG_audio_encoder_frame_length_ms) { | |
| 223 analyzer.CreateAudioEncoderFrameLengthGraph(collection->AppendNewPlot()); | 243 analyzer.CreateAudioEncoderFrameLengthGraph(collection->AppendNewPlot()); |
| 224 } | 244 } |
| 225 | 245 if (FLAG_plot_audio_encoder_packet_loss) { |
| 226 if (FLAG_plot_all || FLAG_audio_encoder_uplink_packet_loss_fraction) { | 246 analyzer.CreateAudioEncoderPacketLossGraph(collection->AppendNewPlot()); |
| 227 analyzer.CreateAudioEncoderUplinkPacketLossFractionGraph( | |
| 228 collection->AppendNewPlot()); | |
| 229 } | 247 } |
| 230 | 248 if (FLAG_plot_audio_encoder_fec) { |
| 231 if (FLAG_plot_all || FLAG_audio_encoder_fec) { | |
| 232 analyzer.CreateAudioEncoderEnableFecGraph(collection->AppendNewPlot()); | 249 analyzer.CreateAudioEncoderEnableFecGraph(collection->AppendNewPlot()); |
| 233 } | 250 } |
| 234 | 251 if (FLAG_plot_audio_encoder_dtx) { |
| 235 if (FLAG_plot_all || FLAG_audio_encoder_dtx) { | |
| 236 analyzer.CreateAudioEncoderEnableDtxGraph(collection->AppendNewPlot()); | 252 analyzer.CreateAudioEncoderEnableDtxGraph(collection->AppendNewPlot()); |
| 237 } | 253 } |
| 238 | 254 if (FLAG_plot_audio_encoder_num_channels) { |
| 239 if (FLAG_plot_all || FLAG_audio_encoder_num_channels) { | |
| 240 analyzer.CreateAudioEncoderNumChannelsGraph(collection->AppendNewPlot()); | 255 analyzer.CreateAudioEncoderNumChannelsGraph(collection->AppendNewPlot()); |
| 241 } | 256 } |
| 242 | 257 if (FLAG_plot_audio_jitter_buffer) { |
| 243 if (FLAG_plot_all || FLAG_plot_audio_jitter_buffer) { | |
| 244 analyzer.CreateAudioJitterBufferGraph( | 258 analyzer.CreateAudioJitterBufferGraph( |
| 245 webrtc::test::ResourcePath( | 259 webrtc::test::ResourcePath( |
| 246 "audio_processing/conversational_speech/EN_script2_F_sp2_B1", | 260 "audio_processing/conversational_speech/EN_script2_F_sp2_B1", |
| 247 "wav"), | 261 "wav"), |
| 248 48000, collection->AppendNewPlot()); | 262 48000, collection->AppendNewPlot()); |
| 249 } | 263 } |
| 250 | 264 |
| 251 collection->Draw(); | 265 collection->Draw(); |
| 252 | 266 |
| 253 return 0; | 267 return 0; |
| 254 } | 268 } |
| 269 | |
| 270 | |
| 271 void SetAllPlotFlags(bool setting) { | |
| 272 FLAG_plot_packet_sizes = setting; | |
| 273 FLAG_plot_packet_count = setting; | |
| 274 FLAG_plot_audio_playout = setting; | |
| 275 FLAG_plot_audio_level = setting; | |
| 276 FLAG_plot_sequence_number = setting; | |
| 277 FLAG_plot_incoming_delay_delta = setting; | |
| 278 FLAG_plot_incoming_delay = setting; | |
| 279 FLAG_plot_incoming_loss_rate = setting; | |
| 280 FLAG_plot_total_bitrate = setting; | |
| 281 FLAG_plot_stream_bitrate = setting; | |
| 282 FLAG_plot_simulated_sendside_bwe = setting; | |
| 283 FLAG_plot_network_delay_feedback = setting; | |
| 284 FLAG_plot_fraction_loss_feedback = setting; | |
| 285 FLAG_plot_timestamps = setting; | |
| 286 FLAG_plot_audio_encoder_bitrate_bps = setting; | |
| 287 FLAG_plot_audio_encoder_frame_length_ms = setting; | |
| 288 FLAG_plot_audio_encoder_packet_loss = setting; | |
| 289 FLAG_plot_audio_encoder_fec = setting; | |
| 290 FLAG_plot_audio_encoder_dtx = setting; | |
| 291 FLAG_plot_audio_encoder_num_channels = setting; | |
| 292 FLAG_plot_audio_jitter_buffer = setting; | |
| 293 } | |
| OLD | NEW |