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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 // observed during the call. | 1160 // observed during the call. |
1161 for (TimeSeriesPoint& point : time_series.points) | 1161 for (TimeSeriesPoint& point : time_series.points) |
1162 point.y -= estimated_base_delay_ms; | 1162 point.y -= estimated_base_delay_ms; |
1163 // Add the data set to the plot. | 1163 // Add the data set to the plot. |
1164 plot->series_list_.push_back(std::move(time_series)); | 1164 plot->series_list_.push_back(std::move(time_series)); |
1165 | 1165 |
1166 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); | 1166 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); |
1167 plot->SetSuggestedYAxis(0, 10, "Delay (ms)", kBottomMargin, kTopMargin); | 1167 plot->SetSuggestedYAxis(0, 10, "Delay (ms)", kBottomMargin, kTopMargin); |
1168 plot->SetTitle("Network Delay Change."); | 1168 plot->SetTitle("Network Delay Change."); |
1169 } | 1169 } |
| 1170 |
| 1171 std::vector<std::pair<int64_t, int64_t>> EventLogAnalyzer::GetFrameTimestamps() |
| 1172 const { |
| 1173 std::vector<std::pair<int64_t, int64_t>> timestamps; |
| 1174 size_t largest_stream_size = 0; |
| 1175 const std::vector<LoggedRtpPacket>* largest_video_stream = nullptr; |
| 1176 // Find the incoming video stream with the most number of packets that is |
| 1177 // not rtx. |
| 1178 for (const auto& kv : rtp_packets_) { |
| 1179 if (kv.first.GetDirection() == kIncomingPacket && |
| 1180 video_ssrcs_.find(kv.first) != video_ssrcs_.end() && |
| 1181 rtx_ssrcs_.find(kv.first) == rtx_ssrcs_.end() && |
| 1182 kv.second.size() > largest_stream_size) { |
| 1183 largest_stream_size = kv.second.size(); |
| 1184 largest_video_stream = &kv.second; |
| 1185 } |
| 1186 } |
| 1187 if (largest_video_stream == nullptr) { |
| 1188 for (auto& packet : *largest_video_stream) { |
| 1189 if (packet.header.markerBit) { |
| 1190 int64_t capture_ms = packet.header.timestamp / 90.0; |
| 1191 int64_t arrival_ms = packet.timestamp / 1000.0; |
| 1192 timestamps.push_back(std::make_pair(capture_ms, arrival_ms)); |
| 1193 } |
| 1194 } |
| 1195 } |
| 1196 return timestamps; |
| 1197 } |
1170 } // namespace plotting | 1198 } // namespace plotting |
1171 } // namespace webrtc | 1199 } // namespace webrtc |
OLD | NEW |