Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: webrtc/pc/statscollector.cc

Issue 2946413002: Report timing frames info in GetStats. (Closed)
Patch Set: Implement Hbos@ comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 if (info.timing_frame_info)
253 report->AddString(StatsReport::kStatsValueNameTimingFrameInfo,
254 info.timing_frame_info->ToString());
sprang_webrtc 2017/06/28 15:31:41 nit: curly brackets for multi-line if, plus indent
ilnik 2017/06/29 08:39:56 Done.
252 } 255 }
253 256
254 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { 257 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) {
255 ExtractCommonSendProperties(info, report); 258 ExtractCommonSendProperties(info, report);
256 259
257 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, 260 report->AddString(StatsReport::kStatsValueNameCodecImplementationName,
258 info.encoder_implementation_name); 261 info.encoder_implementation_name);
259 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, 262 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution,
260 (info.adapt_reason & 0x2) > 0); 263 (info.adapt_reason & 0x2) > 0);
261 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, 264 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution,
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 StatsReport* report = entry.second; 1006 StatsReport* report = entry.second;
1004 report->set_timestamp(stats_gathering_started_); 1007 report->set_timestamp(stats_gathering_started_);
1005 } 1008 }
1006 } 1009 }
1007 1010
1008 void StatsCollector::ClearUpdateStatsCacheForTest() { 1011 void StatsCollector::ClearUpdateStatsCacheForTest() {
1009 stats_gathering_started_ = 0; 1012 stats_gathering_started_ = 0;
1010 } 1013 }
1011 1014
1012 } // namespace webrtc 1015 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698