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

Unified Diff: webrtc/video/send_statistics_proxy.cc

Issue 2398963003: Move usage of QualityScaler to ViEEncoder. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 b29884e585426ffa2bcb03bd050986b71ceb3895..371438c2f7586a702a1255bffee499f3f6f9bbe1 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -489,9 +489,8 @@ void SendStatisticsProxy::OnSendEncodedImage(
uma_container_->key_frame_counter_.Add(encoded_image._frameType ==
kVideoFrameKey);
-
stats_.bw_limited_resolution =
- encoded_image.adapt_reason_.quality_resolution_downscales > 0 ||
+ stats_.bw_limited_resolution ||
encoded_image.adapt_reason_.bw_resolutions_disabled > 0;
if (encoded_image.adapt_reason_.quality_resolution_downscales != -1) {
@@ -571,10 +570,11 @@ void SendStatisticsProxy::OnIncomingFrame(int width, int height) {
uma_container_->cpu_limited_frame_counter_.Add(stats_.cpu_limited_resolution);
}
-void SendStatisticsProxy::SetCpuRestrictedResolution(
- bool cpu_restricted_resolution) {
+void SendStatisticsProxy::SetResolutionRestrictionStats(bool bandwidth,
+ bool cpu) {
rtc::CritScope lock(&crit_);
- stats_.cpu_limited_resolution = cpu_restricted_resolution;
+ stats_.bw_limited_resolution = bandwidth;
+ stats_.cpu_limited_resolution = cpu;
}
void SendStatisticsProxy::OnCpuRestrictedResolutionChanged(
@@ -584,6 +584,13 @@ void SendStatisticsProxy::OnCpuRestrictedResolutionChanged(
++stats_.number_of_cpu_adapt_changes;
}
+void SendStatisticsProxy::OnQualityRestrictedResolutionChanged(
+ bool restricted) {
+ rtc::CritScope lock(&crit_);
+ uma_container_->quality_downscales_counter_.Add(restricted);
+ stats_.bw_limited_resolution = restricted;
+}
+
void SendStatisticsProxy::RtcpPacketTypesCounterUpdated(
uint32_t ssrc,
const RtcpPacketTypeCounter& packet_counter) {
« 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