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

Unified Diff: webrtc/video_engine/overuse_frame_detector_unittest.cc

Issue 1278383002: Remove avg encode time from CpuOveruseMetric struct and use value from OnEncodedFrame instead. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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_engine/overuse_frame_detector_unittest.cc
diff --git a/webrtc/video_engine/overuse_frame_detector_unittest.cc b/webrtc/video_engine/overuse_frame_detector_unittest.cc
index 5524ba5a0f658745c34609eda2911b0846407bcb..f6f6bf5600506b5d490ebe105e02c45fc23a89cc 100644
--- a/webrtc/video_engine/overuse_frame_detector_unittest.cc
+++ b/webrtc/video_engine/overuse_frame_detector_unittest.cc
@@ -103,8 +103,6 @@ class OveruseFrameDetectorTest : public ::testing::Test,
overuse_detector_->Process();
}
- int AvgEncodeTimeMs() { return metrics_.avg_encode_time_ms; }
-
int UsagePercent() { return metrics_.encode_usage_percent; }
CpuOveruseOptions options_;
@@ -356,16 +354,6 @@ TEST_F(OveruseFrameDetectorTest, FrameDelay_NonMatchingSendFrameIgnored) {
EXPECT_EQ(kProcessingTimeMs, overuse_detector_->LastProcessingTimeMs());
}
-TEST_F(OveruseFrameDetectorTest, EncodedFrame) {
- const int kInitialAvgEncodeTimeInMs = 5;
- EXPECT_EQ(kInitialAvgEncodeTimeInMs, AvgEncodeTimeMs());
- for (int i = 0; i < 30; i++) {
- clock_->AdvanceTimeMilliseconds(33);
- overuse_detector_->FrameEncoded(2);
- }
- EXPECT_EQ(2, AvgEncodeTimeMs());
-}
-
// enable_encode_usage_method = true;
// enable_extended_processing_usage = true;
// UsagePercent() > high_encode_usage_threshold_percent => overuse.

Powered by Google App Engine
This is Rietveld 408576698