Inject TickTimeInterface into VCM and tests
The purpose of this change is to introduce dependency injection of the timer into the video coding module. Review URL: http://webrtc-codereview.appspot.com/332003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1220 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@@ -12,13 +12,15 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "modules/video_coding/main/source/tick_time_interface.h"
|
||||
#include "rtp_dump.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
TransportCallback::TransportCallback(webrtc::RtpRtcp* rtp,
|
||||
TickTimeInterface* 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();
|
||||
TickTimeInterface 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();
|
||||
TickTimeInterface clock;
|
||||
int64_t now = clock.MillisecondTimestamp();
|
||||
|
||||
while (!_rtpPackets.Empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user