Chromium Code Reviews| 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 report->AddString(StatsReport::kStatsValueNameTimingFrameInfo, | |
| 253 info.timing_frame_info.ToString()); | |
|
hbos
2017/06/27 14:08:31
Do not add this stat if timing_frame_info is undef
ilnik
2017/06/27 15:23:56
Multiple stats consumers do not break anything. Th
| |
| 252 } | 254 } |
| 253 | 255 |
| 254 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { | 256 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { |
| 255 ExtractCommonSendProperties(info, report); | 257 ExtractCommonSendProperties(info, report); |
| 256 | 258 |
| 257 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, | 259 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, |
| 258 info.encoder_implementation_name); | 260 info.encoder_implementation_name); |
| 259 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, | 261 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, |
| 260 (info.adapt_reason & 0x2) > 0); | 262 (info.adapt_reason & 0x2) > 0); |
| 261 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, | 263 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1003 StatsReport* report = entry.second; | 1005 StatsReport* report = entry.second; |
| 1004 report->set_timestamp(stats_gathering_started_); | 1006 report->set_timestamp(stats_gathering_started_); |
| 1005 } | 1007 } |
| 1006 } | 1008 } |
| 1007 | 1009 |
| 1008 void StatsCollector::ClearUpdateStatsCacheForTest() { | 1010 void StatsCollector::ClearUpdateStatsCacheForTest() { |
| 1009 stats_gathering_started_ = 0; | 1011 stats_gathering_started_ = 0; |
| 1010 } | 1012 } |
| 1011 | 1013 |
| 1012 } // namespace webrtc | 1014 } // namespace webrtc |
| OLD | NEW |