From 5f4f69ac57f025b382136e0a9006f5d90cf99bad Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Thu, 1 Dec 2011 15:50:04 +0000 Subject: [PATCH] Removing sleeps from vp8_test. These sleeps were remains from earlier tests that required them to work with some codecs. Removing these sleep calls cut the execution time from 90s to 30s on my machine. Review URL: http://webrtc-codereview.appspot.com/304004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1077 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../video_coding/codecs/test_framework/unit_test.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/modules/video_coding/codecs/test_framework/unit_test.cc b/src/modules/video_coding/codecs/test_framework/unit_test.cc index 97b0ad7bfe..1ded40172b 100644 --- a/src/modules/video_coding/codecs/test_framework/unit_test.cc +++ b/src/modules/video_coding/codecs/test_framework/unit_test.cc @@ -363,7 +363,6 @@ UnitTest::Perform() int frameLength; RawImage inputImage; EncodedImage encodedImage; - EventWrapper& sleepEvent = *EventWrapper::Create(); VideoFrameType videoFrameType = kDeltaFrame; //----- Encoder parameter tests ----- @@ -454,7 +453,6 @@ UnitTest::Perform() EXPECT_TRUE(_encoder->Encode(inputImage, NULL, &frameType) == WEBRTC_VIDEO_CODEC_OK); EXPECT_TRUE(WaitForEncodedFrame() > 0); - sleepEvent.Wait(10); // Allow the encoder's queue to realize it's empty. } // Init then encode. @@ -727,9 +725,7 @@ UnitTest::Perform() EXPECT_TRUE(_decodedVideoBuffer.GetTimeStamp() == static_cast(encTimeStamp)); frames++; - sleepEvent.Wait(33); } - delete &sleepEvent; ASSERT_TRUE(feof(_sourceFile) != 0); rewind(_sourceFile); @@ -745,7 +741,6 @@ UnitTest::RateControlTests() int frames = 0; RawImage inputImage; WebRtc_UWord32 frameLength; - EventWrapper& sleepEvent = *EventWrapper::Create(); // Do not specify maxBitRate (as in ViE). _inst.maxBitrate = 0; @@ -798,8 +793,6 @@ UnitTest::RateControlTests() _encodedVideoBuffer.UpdateLength(0); _encodedVideoBuffer.Reset(); - - sleepEvent.Wait(10); } WebRtc_UWord32 actualBitrate = (totalBytes / frames * _inst.maxFramerate * 8)/1000;