Re-implement dependency injection of TickTime into VCM and tests

This change basicly re-enables the change of r1220, which was
reverted in r1235 due to Clang issues.

The difference from r1220 is that the TickTimeInterface was
renamed to TickTimeClass, and no longer inherits from TickTime.

Review URL: http://webrtc-codereview.appspot.com/335006

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1267 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org
2011-12-21 15:24:01 +00:00
parent 5490c71a1b
commit 7d8c72e2db
47 changed files with 357 additions and 317 deletions

View File

@@ -19,10 +19,10 @@
#include "jitter_estimate_test.h"
#include "jitter_estimator.h"
#include "media_opt_util.h"
#include "modules/video_coding/main/source/tick_time_base.h"
#include "packet.h"
#include "test_util.h"
#include "test_macros.h"
#include "tick_time.h"
using namespace webrtc;
@@ -92,10 +92,11 @@ int CheckOutFrame(VCMEncodedFrame* frameOut, unsigned int size, bool startCode)
int JitterBufferTest(CmdArgs& args)
{
// Don't run these tests with debug time
#if defined(TICK_TIME_DEBUG) || defined(EVENT_DEBUG)
// Don't run these tests with debug event.
#if defined(EVENT_DEBUG)
return -1;
#endif
TickTimeBase clock;
// Start test
WebRtc_UWord16 seqNum = 1234;
@@ -114,7 +115,7 @@ int JitterBufferTest(CmdArgs& args)
packet.seqNum = seqNum;
packet.payloadType = 126;
seqNum++;
fb->InsertPacket(packet, VCMTickTime::MillisecondTimestamp(), false, 0);
fb->InsertPacket(packet, clock.MillisecondTimestamp(), false, 0);
TEST(frameList.Insert(fb) == 0);
}
VCMFrameListItem* item = NULL;
@@ -135,7 +136,7 @@ int JitterBufferTest(CmdArgs& args)
//printf("DONE timestamp ordered frame list\n");
VCMJitterBuffer jb;
VCMJitterBuffer jb(&clock);
seqNum = 1234;
timeStamp = 123*90;