OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 { StatsReport::kStatsValueNamePacketsReceived, info.packets_rcvd }, | 242 { StatsReport::kStatsValueNamePacketsReceived, info.packets_rcvd }, |
243 { StatsReport::kStatsValueNamePlisSent, info.plis_sent }, | 243 { StatsReport::kStatsValueNamePlisSent, info.plis_sent }, |
244 { StatsReport::kStatsValueNameRenderDelayMs, info.render_delay_ms }, | 244 { StatsReport::kStatsValueNameRenderDelayMs, info.render_delay_ms }, |
245 { StatsReport::kStatsValueNameTargetDelayMs, info.target_delay_ms }, | 245 { StatsReport::kStatsValueNameTargetDelayMs, info.target_delay_ms }, |
246 { StatsReport::kStatsValueNameFramesDecoded, info.frames_decoded }, | 246 { StatsReport::kStatsValueNameFramesDecoded, info.frames_decoded }, |
247 }; | 247 }; |
248 | 248 |
249 for (const auto& i : ints) | 249 for (const auto& i : ints) |
250 report->AddInt(i.name, i.value); | 250 report->AddInt(i.name, i.value); |
251 report->AddString(StatsReport::kStatsValueNameMediaType, "video"); | 251 report->AddString(StatsReport::kStatsValueNameMediaType, "video"); |
| 252 |
252 if (info.timing_frame_info) { | 253 if (info.timing_frame_info) { |
253 report->AddString(StatsReport::kStatsValueNameTimingFrameInfo, | 254 report->AddString(StatsReport::kStatsValueNameTimingFrameInfo, |
254 info.timing_frame_info->ToString()); | 255 info.timing_frame_info->ToString()); |
255 } | 256 } |
| 257 |
| 258 report->AddInt64(StatsReport::kStatsValueNameInterframeDelaySumMs, |
| 259 info.interframe_delay_sum_ms); |
256 } | 260 } |
257 | 261 |
258 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { | 262 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { |
259 ExtractCommonSendProperties(info, report); | 263 ExtractCommonSendProperties(info, report); |
260 | 264 |
261 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, | 265 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, |
262 info.encoder_implementation_name); | 266 info.encoder_implementation_name); |
263 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, | 267 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, |
264 (info.adapt_reason & 0x2) > 0); | 268 (info.adapt_reason & 0x2) > 0); |
265 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, | 269 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 StatsReport* report = entry.second; | 1011 StatsReport* report = entry.second; |
1008 report->set_timestamp(stats_gathering_started_); | 1012 report->set_timestamp(stats_gathering_started_); |
1009 } | 1013 } |
1010 } | 1014 } |
1011 | 1015 |
1012 void StatsCollector::ClearUpdateStatsCacheForTest() { | 1016 void StatsCollector::ClearUpdateStatsCacheForTest() { |
1013 stats_gathering_started_ = 0; | 1017 stats_gathering_started_ = 0; |
1014 } | 1018 } |
1015 | 1019 |
1016 } // namespace webrtc | 1020 } // namespace webrtc |
OLD | NEW |