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

Unified Diff: webrtc/video/overuse_frame_detector.cc

Issue 2398963003: Move usage of QualityScaler to ViEEncoder. (Closed)
Patch Set: Stats now properly reflect scaling status Created 4 years, 2 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/overuse_frame_detector.cc
diff --git a/webrtc/video/overuse_frame_detector.cc b/webrtc/video/overuse_frame_detector.cc
index bb89864bb0409f9bbee1a95168697266b9654238..c730898543a0021c8dbd8e0b4997d3439752a33b 100644
--- a/webrtc/video/overuse_frame_detector.cc
+++ b/webrtc/video/overuse_frame_detector.cc
@@ -204,7 +204,7 @@ class OveruseFrameDetector::CheckOveruseTask : public rtc::QueuedTask {
OveruseFrameDetector::OveruseFrameDetector(
Clock* clock,
const CpuOveruseOptions& options,
- CpuOveruseObserver* observer,
+ ScalingObserverInterface* observer,
EncodedFrameObserver* encoder_timing,
CpuOveruseMetricsObserver* metrics_observer)
: check_overuse_task_(nullptr),
@@ -370,13 +370,13 @@ void OveruseFrameDetector::CheckForOveruse() {
++num_overuse_detections_;
if (observer_)
- observer_->OveruseDetected();
+ observer_->ScaleDown(scale_reason_);
} else if (IsUnderusing(*metrics_, now)) {
last_rampup_time_ms_ = now;
in_quick_rampup_ = true;
if (observer_)
- observer_->NormalUsage();
+ observer_->ScaleUp(scale_reason_);
}
int rampup_delay =

Powered by Google App Engine
This is Rietveld 408576698