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

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

Issue 2946413002: Report timing frames info in GetStats. (Closed)
Patch Set: rebase 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
« no previous file with comments | « webrtc/modules/video_coding/timing.cc ('k') | webrtc/test/fuzzers/rtp_packet_fuzzer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
255 }
252 } 256 }
253 257
254 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { 258 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) {
255 ExtractCommonSendProperties(info, report); 259 ExtractCommonSendProperties(info, report);
256 260
257 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, 261 report->AddString(StatsReport::kStatsValueNameCodecImplementationName,
258 info.encoder_implementation_name); 262 info.encoder_implementation_name);
259 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, 263 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution,
260 (info.adapt_reason & 0x2) > 0); 264 (info.adapt_reason & 0x2) > 0);
261 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, 265 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution,
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 StatsReport* report = entry.second; 1007 StatsReport* report = entry.second;
1004 report->set_timestamp(stats_gathering_started_); 1008 report->set_timestamp(stats_gathering_started_);
1005 } 1009 }
1006 } 1010 }
1007 1011
1008 void StatsCollector::ClearUpdateStatsCacheForTest() { 1012 void StatsCollector::ClearUpdateStatsCacheForTest() {
1009 stats_gathering_started_ = 0; 1013 stats_gathering_started_ = 0;
1010 } 1014 }
1011 1015
1012 } // namespace webrtc 1016 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/timing.cc ('k') | webrtc/test/fuzzers/rtp_packet_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698