OLD | NEW |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.BandwidthLimitedResolutionInPercent", | 86 RTC_HISTOGRAM_PERCENTAGE("WebRTC.Video.BandwidthLimitedResolutionInPercent", |
87 bw_limited); | 87 bw_limited); |
88 } | 88 } |
89 int num_disabled = bw_resolutions_disabled_counter_.Avg(kMinRequiredSamples); | 89 int num_disabled = bw_resolutions_disabled_counter_.Avg(kMinRequiredSamples); |
90 if (num_disabled != -1) { | 90 if (num_disabled != -1) { |
91 RTC_HISTOGRAM_ENUMERATION( | 91 RTC_HISTOGRAM_ENUMERATION( |
92 "WebRTC.Video.BandwidthLimitedResolutionsDisabled", num_disabled, 10); | 92 "WebRTC.Video.BandwidthLimitedResolutionsDisabled", num_disabled, 10); |
93 } | 93 } |
94 } | 94 } |
95 | 95 |
| 96 void SendStatisticsProxy::OnEncoderImplementationName( |
| 97 const char* implementation_name) { |
| 98 rtc::CritScope lock(&crit_); |
| 99 stats_.encoder_implementation_name = implementation_name; |
| 100 } |
| 101 |
96 void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) { | 102 void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) { |
97 rtc::CritScope lock(&crit_); | 103 rtc::CritScope lock(&crit_); |
98 stats_.encode_frame_rate = framerate; | 104 stats_.encode_frame_rate = framerate; |
99 stats_.media_bitrate_bps = bitrate; | 105 stats_.media_bitrate_bps = bitrate; |
100 } | 106 } |
101 | 107 |
102 void SendStatisticsProxy::CpuOveruseMetricsUpdated( | 108 void SendStatisticsProxy::CpuOveruseMetricsUpdated( |
103 const CpuOveruseMetrics& metrics) { | 109 const CpuOveruseMetrics& metrics) { |
104 rtc::CritScope lock(&crit_); | 110 rtc::CritScope lock(&crit_); |
105 // TODO(asapersson): Change to use OnEncodedFrame() for avg_encode_time_ms. | 111 // TODO(asapersson): Change to use OnEncodedFrame() for avg_encode_time_ms. |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 } | 343 } |
338 | 344 |
339 int SendStatisticsProxy::BoolSampleCounter::Fraction( | 345 int SendStatisticsProxy::BoolSampleCounter::Fraction( |
340 int min_required_samples, float multiplier) const { | 346 int min_required_samples, float multiplier) const { |
341 if (num_samples < min_required_samples || num_samples == 0) | 347 if (num_samples < min_required_samples || num_samples == 0) |
342 return -1; | 348 return -1; |
343 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); | 349 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); |
344 } | 350 } |
345 | 351 |
346 } // namespace webrtc | 352 } // namespace webrtc |
OLD | NEW |