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

@@ -12,13 +12,15 @@
#include <cmath>
#include "modules/video_coding/main/source/tick_time_base.h"
#include "rtp_dump.h"
namespace webrtc {
TransportCallback::TransportCallback(webrtc::RtpRtcp* rtp,
TickTimeBase* clock,
const char* filename):
RTPSendCompleteCallback(rtp, filename)
RTPSendCompleteCallback(rtp, clock, filename)
{
//
}
@@ -49,7 +51,8 @@ TransportCallback::SendPacket(int channel, const void *data, int len)
transmitPacket = PacketLoss();
}
WebRtc_UWord64 now = VCMTickTime::MillisecondTimestamp();
TickTimeBase clock;
int64_t now = clock.MillisecondTimestamp();
// Insert outgoing packet into list
if (transmitPacket)
{
@@ -73,7 +76,8 @@ TransportCallback::TransportPackets()
{
// Are we ready to send packets to the receiver?
rtpPacket* packet = NULL;
WebRtc_UWord64 now = VCMTickTime::MillisecondTimestamp();
TickTimeBase clock;
int64_t now = clock.MillisecondTimestamp();
while (!_rtpPackets.Empty())
{