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

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
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..09ff9a55311e10b465b55822331d8f4bfa9f13c5 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -678,18 +678,23 @@ void SendStatisticsProxy::OnIncomingFrame(int width, int height) {
}
void SendStatisticsProxy::SetResolutionRestrictionStats(
- bool scaling_enabled,
+ bool cpu_scaling_enabled,
+ bool quality_scaling_enabled,
bool cpu_restricted,
int num_quality_downscales) {
rtc::CritScope lock(&crit_);
- if (scaling_enabled) {
- quality_downscales_ = num_quality_downscales;
- stats_.bw_limited_resolution = quality_downscales_ > 0;
+ if (cpu_scaling_enabled) {
stats_.cpu_limited_resolution = cpu_restricted;
} else {
- stats_.bw_limited_resolution = false;
stats_.cpu_limited_resolution = false;
+ }
+
+ if (quality_scaling_enabled) {
+ quality_downscales_ = num_quality_downscales;
+ stats_.bw_limited_resolution = quality_downscales_ > 0;
+ } else {
quality_downscales_ = -1;
+ stats_.bw_limited_resolution = false;
}
kthelgason 2017/03/31 07:57:38 I think the amount of parameters and conditions he
åsapersson 2017/03/31 09:53:38 Done.
}

Powered by Google App Engine
This is Rietveld 408576698