Index: webrtc/video/send_statistics_proxy.cc |
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc |
index 83399a9013df898de83f90347b4d1e11c1b0514a..3614ac2c69423e445db0147d5b60a1de81a84dd8 100644 |
--- a/webrtc/video/send_statistics_proxy.cc |
+++ b/webrtc/video/send_statistics_proxy.cc |
@@ -179,9 +179,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; |
} |
@@ -321,13 +325,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) { |