diff options
author | asapersson@webrtc.org <asapersson@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-09-23 20:05:39 +0000 |
---|---|---|
committer | asapersson@webrtc.org <asapersson@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-09-23 20:05:39 +0000 |
commit | ae14504dd56981e01bad96c86cca729ec31e6596 (patch) | |
tree | f95dc9cdb325f549cd474068ff68dbafdcbe815f /video_engine/overuse_frame_detector_unittest.cc | |
parent | a6665e70dd52036515e14bfc77078007a941a84c (diff) | |
download | webrtc-ae14504dd56981e01bad96c86cca729ec31e6596.tar.gz |
- Reset capture deltas at resolution change.
- Applied smoothing of capture jitter.
- Adjusted thresholds.
R=stefan@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/2070005
git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4817 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_engine/overuse_frame_detector_unittest.cc')
-rw-r--r-- | video_engine/overuse_frame_detector_unittest.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/video_engine/overuse_frame_detector_unittest.cc b/video_engine/overuse_frame_detector_unittest.cc index 616b13dc..d1995692 100644 --- a/video_engine/overuse_frame_detector_unittest.cc +++ b/video_engine/overuse_frame_detector_unittest.cc @@ -32,14 +32,16 @@ class OveruseFrameDetectorTest : public ::testing::Test { virtual void SetUp() { clock_.reset(new SimulatedClock(1234)); observer_.reset(new MockCpuOveruseObserver()); - overuse_detector_.reset(new OveruseFrameDetector(clock_.get())); + overuse_detector_.reset(new OveruseFrameDetector(clock_.get(), + 10.0f, + 15.0f)); overuse_detector_->SetObserver(observer_.get()); } void InsertFramesWithInterval(size_t num_frames, int interval_ms) { while (num_frames-- > 0) { clock_->AdvanceTimeMilliseconds(interval_ms); - overuse_detector_->FrameCaptured(); + overuse_detector_->FrameCaptured(640, 480); } } @@ -48,12 +50,12 @@ class OveruseFrameDetectorTest : public ::testing::Test { EXPECT_CALL(*(observer_.get()), OveruseDetected()).Times(1); - InsertFramesWithInterval(30, regular_frame_interval_ms); - InsertFramesWithInterval(30, 1000); + InsertFramesWithInterval(50, regular_frame_interval_ms); + InsertFramesWithInterval(50, 110); overuse_detector_->Process(); - InsertFramesWithInterval(30, regular_frame_interval_ms); - InsertFramesWithInterval(30, 1000); + InsertFramesWithInterval(50, regular_frame_interval_ms); + InsertFramesWithInterval(50, 110); overuse_detector_->Process(); } @@ -62,7 +64,7 @@ class OveruseFrameDetectorTest : public ::testing::Test { EXPECT_CALL(*(observer_.get()), NormalUsage()).Times(testing::AtLeast(1)); - InsertFramesWithInterval(300, regular_frame_interval_ms); + InsertFramesWithInterval(900, regular_frame_interval_ms); overuse_detector_->Process(); } |