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

Unified Diff: webrtc/video/overuse_frame_detector.h

Issue 2918143003: Set overuse detector max frame interval based on target frame rate. (Closed)
Patch Set: Rebase Created 3 years, 6 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/encoder_rtcp_feedback_unittest.cc ('k') | webrtc/video/overuse_frame_detector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/overuse_frame_detector.h
diff --git a/webrtc/video/overuse_frame_detector.h b/webrtc/video/overuse_frame_detector.h
index 2fb3104d538dccc756ca9464f61a12f434b8b9d3..29efa1609d6d8a6b2bfac32861183c0dfba19603 100644
--- a/webrtc/video/overuse_frame_detector.h
+++ b/webrtc/video/overuse_frame_detector.h
@@ -68,7 +68,7 @@ class OveruseFrameDetector {
AdaptationObserverInterface* overuse_observer,
EncodedFrameObserver* encoder_timing_,
CpuOveruseMetricsObserver* metrics_observer);
- ~OveruseFrameDetector();
+ virtual ~OveruseFrameDetector();
// Start to periodically check for overuse.
void StartCheckForOveruse();
@@ -77,6 +77,13 @@ class OveruseFrameDetector {
// StartCheckForOveruse has been called.
void StopCheckForOveruse();
+ // Defines the current maximum framerate targeted by the capturer. This is
+ // used to make sure the encode usage percent doesn't drop unduly if the
+ // capturer has quiet periods (for instance caused by screen capturers with
+ // variable capture rate depending on content updates), otherwise we might
+ // experience adaptation toggling.
+ virtual void OnTargetFramerateUpdated(int framerate_fps);
+
// Called for each captured frame.
void FrameCaptured(const VideoFrame& frame, int64_t time_when_first_seen_us);
@@ -135,6 +142,7 @@ class OveruseFrameDetector {
// Number of pixels of last captured frame.
int num_pixels_ GUARDED_BY(task_checker_);
+ int max_framerate_ GUARDED_BY(task_checker_);
int64_t last_overuse_time_ms_ GUARDED_BY(task_checker_);
int checks_above_threshold_ GUARDED_BY(task_checker_);
int num_overuse_detections_ GUARDED_BY(task_checker_);
« no previous file with comments | « webrtc/video/encoder_rtcp_feedback_unittest.cc ('k') | webrtc/video/overuse_frame_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698