Index: webrtc/video/send_statistics_proxy.cc |
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc |
index 7371111066559f1e83860c36a875e65b3c22cb7b..8102b9310e371f3a419994a0e5324377c2ff4d39 100644 |
--- a/webrtc/video/send_statistics_proxy.cc |
+++ b/webrtc/video/send_statistics_proxy.cc |
@@ -189,9 +189,13 @@ void SendStatisticsProxy::OnOutgoingRate(uint32_t framerate, uint32_t bitrate) { |
stats_.media_bitrate_bps = bitrate; |
} |
-void SendStatisticsProxy::CpuOveruseMetricsUpdated( |
+void SendStatisticsProxy::OnEncodedFrameTimeMeasured( |
+ int encode_time_ms, |
const CpuOveruseMetrics& metrics) { |
rtc::CritScope lock(&crit_); |
+ uma_container_->encode_time_counter_.Add(encode_time_ms); |
+ encode_time_.Apply(1.0f, encode_time_ms); |
+ stats_.avg_encode_time_ms = round(encode_time_.filtered()); |
stats_.encode_usage_percent = metrics.encode_usage_percent; |
} |
@@ -331,13 +335,6 @@ void SendStatisticsProxy::OnIncomingFrame(int width, int height) { |
uma_container_->input_height_counter_.Add(height); |
} |
-void SendStatisticsProxy::OnEncodedFrame(int encode_time_ms) { |
- rtc::CritScope lock(&crit_); |
- uma_container_->encode_time_counter_.Add(encode_time_ms); |
- encode_time_.Apply(1.0f, encode_time_ms); |
- stats_.avg_encode_time_ms = round(encode_time_.filtered()); |
-} |
- |
void SendStatisticsProxy::RtcpPacketTypesCounterUpdated( |
uint32_t ssrc, |
const RtcpPacketTypeCounter& packet_counter) { |