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

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

Issue 3009793002: Implement googContentType GetStats metric reported on receive side. (Closed)
Patch Set: Fix uninitialized value error pass 2 Created 3 years, 3 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/media/engine/webrtcvideoengine.cc ('k') | webrtc/video/receive_statistics_proxy.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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 report->AddInt(i.name, i.value); 263 report->AddInt(i.name, i.value);
264 report->AddString(StatsReport::kStatsValueNameMediaType, "video"); 264 report->AddString(StatsReport::kStatsValueNameMediaType, "video");
265 265
266 if (info.timing_frame_info) { 266 if (info.timing_frame_info) {
267 report->AddString(StatsReport::kStatsValueNameTimingFrameInfo, 267 report->AddString(StatsReport::kStatsValueNameTimingFrameInfo,
268 info.timing_frame_info->ToString()); 268 info.timing_frame_info->ToString());
269 } 269 }
270 270
271 report->AddInt64(StatsReport::kStatsValueNameInterframeDelayMaxMs, 271 report->AddInt64(StatsReport::kStatsValueNameInterframeDelayMaxMs,
272 info.interframe_delay_max_ms); 272 info.interframe_delay_max_ms);
273
274 report->AddString(
275 StatsReport::kStatsValueNameContentType,
276 webrtc::videocontenttypehelpers::ToString(info.content_type));
tommi 2017/09/04 09:27:42 since AddString supports static literals, can we c
ilnik 2017/09/04 09:41:07 Done.
273 } 277 }
274 278
275 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { 279 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) {
276 ExtractCommonSendProperties(info, report); 280 ExtractCommonSendProperties(info, report);
277 281
278 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, 282 report->AddString(StatsReport::kStatsValueNameCodecImplementationName,
279 info.encoder_implementation_name); 283 info.encoder_implementation_name);
280 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, 284 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution,
281 (info.adapt_reason & 0x2) > 0); 285 (info.adapt_reason & 0x2) > 0);
282 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, 286 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution,
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 StatsReport* report = entry.second; 1028 StatsReport* report = entry.second;
1025 report->set_timestamp(stats_gathering_started_); 1029 report->set_timestamp(stats_gathering_started_);
1026 } 1030 }
1027 } 1031 }
1028 1032
1029 void StatsCollector::ClearUpdateStatsCacheForTest() { 1033 void StatsCollector::ClearUpdateStatsCacheForTest() {
1030 stats_gathering_started_ = 0; 1034 stats_gathering_started_ = 0;
1031 } 1035 }
1032 1036
1033 } // namespace webrtc 1037 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine.cc ('k') | webrtc/video/receive_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698