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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 case ParsedRtcEventLog::LOSS_BASED_BWE_UPDATE: { | 460 case ParsedRtcEventLog::LOSS_BASED_BWE_UPDATE: { |
461 LossBasedBweUpdate bwe_update; | 461 LossBasedBweUpdate bwe_update; |
462 bwe_update.timestamp = parsed_log_.GetTimestamp(i); | 462 bwe_update.timestamp = parsed_log_.GetTimestamp(i); |
463 parsed_log_.GetLossBasedBweUpdate(i, &bwe_update.new_bitrate, | 463 parsed_log_.GetLossBasedBweUpdate(i, &bwe_update.new_bitrate, |
464 &bwe_update.fraction_loss, | 464 &bwe_update.fraction_loss, |
465 &bwe_update.expected_packets); | 465 &bwe_update.expected_packets); |
466 bwe_loss_updates_.push_back(bwe_update); | 466 bwe_loss_updates_.push_back(bwe_update); |
467 break; | 467 break; |
468 } | 468 } |
469 case ParsedRtcEventLog::DELAY_BASED_BWE_UPDATE: { | 469 case ParsedRtcEventLog::DELAY_BASED_BWE_UPDATE: { |
| 470 bwe_delay_updates_.push_back(parsed_log_.GetDelayBasedBweUpdate(i)); |
470 break; | 471 break; |
471 } | 472 } |
472 case ParsedRtcEventLog::AUDIO_NETWORK_ADAPTATION_EVENT: { | 473 case ParsedRtcEventLog::AUDIO_NETWORK_ADAPTATION_EVENT: { |
473 AudioNetworkAdaptationEvent ana_event; | 474 AudioNetworkAdaptationEvent ana_event; |
474 ana_event.timestamp = parsed_log_.GetTimestamp(i); | 475 ana_event.timestamp = parsed_log_.GetTimestamp(i); |
475 parsed_log_.GetAudioNetworkAdaptation(i, &ana_event.config); | 476 parsed_log_.GetAudioNetworkAdaptation(i, &ana_event.config); |
476 audio_network_adaptation_events_.push_back(ana_event); | 477 audio_network_adaptation_events_.push_back(ana_event); |
477 break; | 478 break; |
478 } | 479 } |
479 case ParsedRtcEventLog::BWE_PROBE_CLUSTER_CREATED_EVENT: { | 480 case ParsedRtcEventLog::BWE_PROBE_CLUSTER_CREATED_EVENT: { |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 } | 927 } |
927 float window_duration_in_seconds = | 928 float window_duration_in_seconds = |
928 static_cast<float>(window_duration_) / 1000000; | 929 static_cast<float>(window_duration_) / 1000000; |
929 float x = static_cast<float>(time - begin_time_) / 1000000; | 930 float x = static_cast<float>(time - begin_time_) / 1000000; |
930 float y = bytes_in_window * 8 / window_duration_in_seconds / 1000; | 931 float y = bytes_in_window * 8 / window_duration_in_seconds / 1000; |
931 time_series->points.emplace_back(x, y); | 932 time_series->points.emplace_back(x, y); |
932 } | 933 } |
933 | 934 |
934 // Overlay the send-side bandwidth estimate over the outgoing bitrate. | 935 // Overlay the send-side bandwidth estimate over the outgoing bitrate. |
935 if (desired_direction == kOutgoingPacket) { | 936 if (desired_direction == kOutgoingPacket) { |
936 TimeSeries* time_series = | 937 TimeSeries* loss_series = |
937 plot->AddTimeSeries("Loss-based estimate", LINE_STEP_GRAPH); | 938 plot->AddTimeSeries("Loss-based estimate", LINE_STEP_GRAPH); |
938 for (auto& bwe_update : bwe_loss_updates_) { | 939 for (auto& loss_update : bwe_loss_updates_) { |
939 float x = | 940 float x = |
940 static_cast<float>(bwe_update.timestamp - begin_time_) / 1000000; | 941 static_cast<float>(loss_update.timestamp - begin_time_) / 1000000; |
941 float y = static_cast<float>(bwe_update.new_bitrate) / 1000; | 942 float y = static_cast<float>(loss_update.new_bitrate) / 1000; |
942 time_series->points.emplace_back(x, y); | 943 loss_series->points.emplace_back(x, y); |
| 944 } |
| 945 |
| 946 TimeSeries* delay_series = |
| 947 plot->AddTimeSeries("Delay-based estimate", LINE_STEP_GRAPH); |
| 948 for (auto& delay_update : bwe_delay_updates_) { |
| 949 float x = |
| 950 static_cast<float>(delay_update.timestamp - begin_time_) / 1000000; |
| 951 float y = static_cast<float>(delay_update.bitrate_bps) / 1000; |
| 952 delay_series->points.emplace_back(x, y); |
943 } | 953 } |
944 | 954 |
945 TimeSeries* created_series = | 955 TimeSeries* created_series = |
946 plot->AddTimeSeries("Probe cluster created.", DOT_GRAPH); | 956 plot->AddTimeSeries("Probe cluster created.", DOT_GRAPH); |
947 for (auto& cluster : bwe_probe_cluster_created_events_) { | 957 for (auto& cluster : bwe_probe_cluster_created_events_) { |
948 float x = static_cast<float>(cluster.timestamp - begin_time_) / 1000000; | 958 float x = static_cast<float>(cluster.timestamp - begin_time_) / 1000000; |
949 float y = static_cast<float>(cluster.bitrate_bps) / 1000; | 959 float y = static_cast<float>(cluster.bitrate_bps) / 1000; |
950 created_series->points.emplace_back(x, y); | 960 created_series->points.emplace_back(x, y); |
951 } | 961 } |
952 | 962 |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1376 return rtc::Optional<float>(); | 1386 return rtc::Optional<float>(); |
1377 }, | 1387 }, |
1378 audio_network_adaptation_events_, begin_time_, time_series); | 1388 audio_network_adaptation_events_, begin_time_, time_series); |
1379 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); | 1389 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); |
1380 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))", | 1390 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))", |
1381 kBottomMargin, kTopMargin); | 1391 kBottomMargin, kTopMargin); |
1382 plot->SetTitle("Reported audio encoder number of channels"); | 1392 plot->SetTitle("Reported audio encoder number of channels"); |
1383 } | 1393 } |
1384 } // namespace plotting | 1394 } // namespace plotting |
1385 } // namespace webrtc | 1395 } // namespace webrtc |
OLD | NEW |