| Index: webrtc/video/vie_sync_module.cc
|
| diff --git a/webrtc/video/vie_sync_module.cc b/webrtc/video/vie_sync_module.cc
|
| index af57ab4b76d5cfa05fe0252f1ea4283c6decdbbb..23c4d20f2d1915dae9b2bf04a7eb50b5bec7a4dd 100644
|
| --- a/webrtc/video/vie_sync_module.cc
|
| +++ b/webrtc/video/vie_sync_module.cc
|
| @@ -12,6 +12,7 @@
|
|
|
| #include "webrtc/base/checks.h"
|
| #include "webrtc/base/logging.h"
|
| +#include "webrtc/base/timeutils.h"
|
| #include "webrtc/base/trace_event.h"
|
| #include "webrtc/modules/rtp_rtcp/include/rtp_receiver.h"
|
| #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
|
| @@ -55,7 +56,7 @@ ViESyncModule::ViESyncModule(VideoCodingModule* vcm)
|
| video_rtp_rtcp_(nullptr),
|
| voe_channel_id_(-1),
|
| voe_sync_interface_(nullptr),
|
| - last_sync_time_(TickTime::Now()),
|
| + last_sync_time_(rtc::TimeNanos()),
|
| sync_() {}
|
|
|
| ViESyncModule::~ViESyncModule() {
|
| @@ -85,12 +86,13 @@ void ViESyncModule::ConfigureSync(int voe_channel_id,
|
|
|
| int64_t ViESyncModule::TimeUntilNextProcess() {
|
| const int64_t kSyncIntervalMs = 1000;
|
| - return kSyncIntervalMs - (TickTime::Now() - last_sync_time_).Milliseconds();
|
| + return kSyncIntervalMs -
|
| + (rtc::TimeNanos() - last_sync_time_) / rtc::kNumNanosecsPerMillisec;
|
| }
|
|
|
| void ViESyncModule::Process() {
|
| rtc::CritScope lock(&data_cs_);
|
| - last_sync_time_ = TickTime::Now();
|
| + last_sync_time_ = rtc::TimeNanos();
|
|
|
| const int current_video_delay_ms = vcm_->Delay();
|
|
|
|
|