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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 if (delay_ms != -1) | 121 if (delay_ms != -1) |
122 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.SendSideDelayInMs", delay_ms); | 122 RTC_HISTOGRAM_COUNTS_100000("WebRTC.Video.SendSideDelayInMs", delay_ms); |
123 | 123 |
124 int max_delay_ms = max_delay_counter_.Avg(kMinRequiredSamples); | 124 int max_delay_ms = max_delay_counter_.Avg(kMinRequiredSamples); |
125 if (max_delay_ms != -1) { | 125 if (max_delay_ms != -1) { |
126 RTC_HISTOGRAM_COUNTS_100000( | 126 RTC_HISTOGRAM_COUNTS_100000( |
127 "WebRTC.Video.SendSideDelayMaxInMs", max_delay_ms); | 127 "WebRTC.Video.SendSideDelayMaxInMs", max_delay_ms); |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
| 131 void SendStatisticsProxy::OnEncoderImplementationName( |
| 132 const char* implementation_name) { |
| 133 rtc::CritScope lock(&crit_); |
| 134 stats_.encoder_implementation_name = implementation_name; |
| 135 } |
| 136 |
131 void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) { | 137 void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) { |
132 rtc::CritScope lock(&crit_); | 138 rtc::CritScope lock(&crit_); |
133 stats_.encode_frame_rate = framerate; | 139 stats_.encode_frame_rate = framerate; |
134 stats_.media_bitrate_bps = bitrate; | 140 stats_.media_bitrate_bps = bitrate; |
135 } | 141 } |
136 | 142 |
137 void SendStatisticsProxy::CpuOveruseMetricsUpdated( | 143 void SendStatisticsProxy::CpuOveruseMetricsUpdated( |
138 const CpuOveruseMetrics& metrics) { | 144 const CpuOveruseMetrics& metrics) { |
139 rtc::CritScope lock(&crit_); | 145 rtc::CritScope lock(&crit_); |
140 // TODO(asapersson): Change to use OnEncodedFrame() for avg_encode_time_ms. | 146 // TODO(asapersson): Change to use OnEncodedFrame() for avg_encode_time_ms. |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 381 } |
376 | 382 |
377 int SendStatisticsProxy::BoolSampleCounter::Fraction( | 383 int SendStatisticsProxy::BoolSampleCounter::Fraction( |
378 int min_required_samples, float multiplier) const { | 384 int min_required_samples, float multiplier) const { |
379 if (num_samples < min_required_samples || num_samples == 0) | 385 if (num_samples < min_required_samples || num_samples == 0) |
380 return -1; | 386 return -1; |
381 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); | 387 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); |
382 } | 388 } |
383 | 389 |
384 } // namespace webrtc | 390 } // namespace webrtc |
OLD | NEW |