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

Side by Side Diff: webrtc/video/send_statistics_proxy.cc

Issue 1406903002: Expose codec implementation names in stats. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix rebase Created 5 years 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/video/send_statistics_proxy.h ('k') | webrtc/video/video_decoder.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 (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void SendStatisticsProxy::SetContentType( 154 void SendStatisticsProxy::SetContentType(
155 VideoEncoderConfig::ContentType content_type) { 155 VideoEncoderConfig::ContentType content_type) {
156 rtc::CritScope lock(&crit_); 156 rtc::CritScope lock(&crit_);
157 if (content_type_ != content_type) { 157 if (content_type_ != content_type) {
158 uma_container_->UpdateHistograms(); 158 uma_container_->UpdateHistograms();
159 uma_container_.reset(new UmaSamplesContainer(GetUmaPrefix(content_type))); 159 uma_container_.reset(new UmaSamplesContainer(GetUmaPrefix(content_type)));
160 content_type_ = content_type; 160 content_type_ = content_type;
161 } 161 }
162 } 162 }
163 163
164 void SendStatisticsProxy::OnEncoderImplementationName(
165 const char* implementation_name) {
166 rtc::CritScope lock(&crit_);
167 stats_.encoder_implementation_name = implementation_name;
168 }
169
164 void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) { 170 void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) {
165 rtc::CritScope lock(&crit_); 171 rtc::CritScope lock(&crit_);
166 stats_.encode_frame_rate = framerate; 172 stats_.encode_frame_rate = framerate;
167 stats_.media_bitrate_bps = bitrate; 173 stats_.media_bitrate_bps = bitrate;
168 } 174 }
169 175
170 void SendStatisticsProxy::CpuOveruseMetricsUpdated( 176 void SendStatisticsProxy::CpuOveruseMetricsUpdated(
171 const CpuOveruseMetrics& metrics) { 177 const CpuOveruseMetrics& metrics) {
172 rtc::CritScope lock(&crit_); 178 rtc::CritScope lock(&crit_);
173 stats_.encode_usage_percent = metrics.encode_usage_percent; 179 stats_.encode_usage_percent = metrics.encode_usage_percent;
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 return Fraction(min_required_samples, 1000.0f); 420 return Fraction(min_required_samples, 1000.0f);
415 } 421 }
416 422
417 int SendStatisticsProxy::BoolSampleCounter::Fraction( 423 int SendStatisticsProxy::BoolSampleCounter::Fraction(
418 int min_required_samples, float multiplier) const { 424 int min_required_samples, float multiplier) const {
419 if (num_samples < min_required_samples || num_samples == 0) 425 if (num_samples < min_required_samples || num_samples == 0)
420 return -1; 426 return -1;
421 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); 427 return static_cast<int>((sum * multiplier / num_samples) + 0.5f);
422 } 428 }
423 } // namespace webrtc 429 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698