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

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

Issue 2430603003: Implement qpSum stat for video send ssrc stats. (Closed)
Patch Set: Change qp_sum to rtc::Optional<uint64_t>. Created 4 years, 1 month 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 ExtractCommonSendProperties(info, report); 240 ExtractCommonSendProperties(info, report);
241 241
242 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, 242 report->AddString(StatsReport::kStatsValueNameCodecImplementationName,
243 info.encoder_implementation_name); 243 info.encoder_implementation_name);
244 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, 244 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution,
245 (info.adapt_reason & 0x2) > 0); 245 (info.adapt_reason & 0x2) > 0);
246 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, 246 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution,
247 (info.adapt_reason & 0x1) > 0); 247 (info.adapt_reason & 0x1) > 0);
248 report->AddBoolean(StatsReport::kStatsValueNameViewLimitedResolution, 248 report->AddBoolean(StatsReport::kStatsValueNameViewLimitedResolution,
249 (info.adapt_reason & 0x4) > 0); 249 (info.adapt_reason & 0x4) > 0);
250 if (info.qp_sum)
251 report->AddInt(StatsReport::kStatsValueNameQpSum, *info.qp_sum);
250 252
251 const IntForAdd ints[] = { 253 const IntForAdd ints[] = {
252 { StatsReport::kStatsValueNameAdaptationChanges, info.adapt_changes }, 254 { StatsReport::kStatsValueNameAdaptationChanges, info.adapt_changes },
253 { StatsReport::kStatsValueNameAvgEncodeMs, info.avg_encode_ms }, 255 { StatsReport::kStatsValueNameAvgEncodeMs, info.avg_encode_ms },
254 { StatsReport::kStatsValueNameEncodeUsagePercent, 256 { StatsReport::kStatsValueNameEncodeUsagePercent,
255 info.encode_usage_percent }, 257 info.encode_usage_percent },
256 { StatsReport::kStatsValueNameFirsReceived, info.firs_rcvd }, 258 { StatsReport::kStatsValueNameFirsReceived, info.firs_rcvd },
257 { StatsReport::kStatsValueNameFrameHeightSent, info.send_frame_height }, 259 { StatsReport::kStatsValueNameFrameHeightSent, info.send_frame_height },
258 { StatsReport::kStatsValueNameFrameRateInput, info.framerate_input }, 260 { StatsReport::kStatsValueNameFrameRateInput, info.framerate_input },
259 { StatsReport::kStatsValueNameFrameRateSent, info.framerate_sent }, 261 { StatsReport::kStatsValueNameFrameRateSent, info.framerate_sent },
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 StatsReport* report = entry.second; 968 StatsReport* report = entry.second;
967 report->set_timestamp(stats_gathering_started_); 969 report->set_timestamp(stats_gathering_started_);
968 } 970 }
969 } 971 }
970 972
971 void StatsCollector::ClearUpdateStatsCacheForTest() { 973 void StatsCollector::ClearUpdateStatsCacheForTest() {
972 stats_gathering_started_ = 0; 974 stats_gathering_started_ = 0;
973 } 975 }
974 976
975 } // namespace webrtc 977 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/statscollector_unittest.cc » ('j') | webrtc/video/send_statistics_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698