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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 2783213002: Do not report quality limited resolution stats when quality scaler is disabled. (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index 1f12b2d640ab63d9887d9f087d04cc2ac6993006..7cefa294e60cdf4741f685220ee0136762d3081f 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -677,20 +677,15 @@ void SendStatisticsProxy::OnIncomingFrame(int width, int height) {
"ssrc", rtp_config_.ssrcs[0]);
}
-void SendStatisticsProxy::SetResolutionRestrictionStats(
- bool scaling_enabled,
- bool cpu_restricted,
- int num_quality_downscales) {
+void SendStatisticsProxy::SetCpuScalingStats(bool cpu_restricted_resolution) {
rtc::CritScope lock(&crit_);
- if (scaling_enabled) {
- quality_downscales_ = num_quality_downscales;
- stats_.bw_limited_resolution = quality_downscales_ > 0;
- stats_.cpu_limited_resolution = cpu_restricted;
- } else {
- stats_.bw_limited_resolution = false;
- stats_.cpu_limited_resolution = false;
- quality_downscales_ = -1;
- }
+ stats_.cpu_limited_resolution = cpu_restricted_resolution;
+}
+
+void SendStatisticsProxy::SetQualityScalingStats(int num_quality_downscales) {
+ rtc::CritScope lock(&crit_);
+ quality_downscales_ = num_quality_downscales;
+ stats_.bw_limited_resolution = quality_downscales_ > 0;
}
void SendStatisticsProxy::OnCpuRestrictedResolutionChanged(
« no previous file with comments | « webrtc/video/send_statistics_proxy.h ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698