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

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
Index: webrtc/video/send_statistics_proxy.cc
diff --git a/webrtc/video/send_statistics_proxy.cc b/webrtc/video/send_statistics_proxy.cc
index a996976e5d48aa8fa0ea33be0bba100f129ef94a..5e6a7f17c9dfcc08e6eb38012c9776f70aa05670 100644
--- a/webrtc/video/send_statistics_proxy.cc
+++ b/webrtc/video/send_statistics_proxy.cc
@@ -487,9 +487,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) {
@@ -569,10 +568,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(
@@ -582,6 +582,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) {

Powered by Google App Engine
This is Rietveld 408576698