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<int64_t> EventLogAnalyzer::GetFrameTimestamps() const { | |
1172 std::vector<int64_t> timestamps; | |
1173 size_t largest_stream_size = 0; | |
1174 const std::vector<LoggedRtpPacket>* largest_video_stream = nullptr; | |
1175 // Find the incoming video stream with the most number of packets that is | |
1176 // not rtx. | |
1177 for (const auto& kv : rtp_packets_) { | |
1178 if (kv.first.GetDirection() == kIncomingPacket && | |
1179 video_ssrcs_.find(kv.first) != video_ssrcs_.end() && | |
1180 rtx_ssrcs_.find(kv.first) == rtx_ssrcs_.end() && | |
1181 kv.second.size() > largest_stream_size) { | |
1182 largest_stream_size = kv.second.size(); | |
1183 largest_video_stream = &kv.second; | |
1184 } | |
1185 } | |
1186 if (largest_video_stream == nullptr) | |
1187 return std::vector<int64_t>(); | |
terelius
2016/12/20 15:25:08
Maybe:
if (largest_video_stream != nullptr) {
fo
stefan-webrtc
2016/12/20 15:28:39
Done.
| |
1188 for (auto& packet : *largest_video_stream) { | |
1189 if (packet.header.markerBit) { | |
1190 int64_t capture_ms = packet.header.timestamp / 90.0; | |
1191 timestamps.push_back(capture_ms); | |
terelius
2016/12/20 15:25:08
I think it would be nicer if timestamps was a vect
stefan-webrtc
2016/12/20 15:28:39
Done.
| |
1192 int64_t arrival_ms = packet.timestamp / 1000.0; | |
1193 timestamps.push_back(arrival_ms); | |
1194 } | |
1195 } | |
1196 return timestamps; | |
1197 } | |
1170 } // namespace plotting | 1198 } // namespace plotting |
1171 } // namespace webrtc | 1199 } // namespace webrtc |
OLD | NEW |