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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 1569853002: Measure encoding time on encode callbacks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove unused variable Created 4 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index d2964b21dae4c101ae6ba8cbd36ec1fbc0950946..184863ed848e7ec1353a28dee2f9bc7b3997af87 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) {

Powered by Google App Engine
This is Rietveld 408576698