aboutsummaryrefslogtreecommitdiff
path: root/modules/rtp_rtcp/source/rtcp_transceiver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rtp_rtcp/source/rtcp_transceiver.cc')
-rw-r--r--modules/rtp_rtcp/source/rtcp_transceiver.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/rtp_rtcp/source/rtcp_transceiver.cc b/modules/rtp_rtcp/source/rtcp_transceiver.cc
index 1de581849b..41fa5e6206 100644
--- a/modules/rtp_rtcp/source/rtcp_transceiver.cc
+++ b/modules/rtp_rtcp/source/rtcp_transceiver.cc
@@ -14,6 +14,7 @@
#include <utility>
#include <vector>
+#include "api/units/timestamp.h"
#include "modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include "rtc_base/checks.h"
#include "rtc_base/event.h"
@@ -23,7 +24,8 @@
namespace webrtc {
RtcpTransceiver::RtcpTransceiver(const RtcpTransceiverConfig& config)
- : task_queue_(config.task_queue),
+ : clock_(config.clock),
+ task_queue_(config.task_queue),
rtcp_transceiver_(std::make_unique<RtcpTransceiverImpl>(config)) {
RTC_DCHECK(task_queue_);
}
@@ -82,9 +84,9 @@ void RtcpTransceiver::SetReadyToSend(bool ready) {
void RtcpTransceiver::ReceivePacket(rtc::CopyOnWriteBuffer packet) {
RTC_CHECK(rtcp_transceiver_);
RtcpTransceiverImpl* ptr = rtcp_transceiver_.get();
- int64_t now_us = rtc::TimeMicros();
- task_queue_->PostTask(ToQueuedTask(
- [ptr, packet, now_us] { ptr->ReceivePacket(packet, now_us); }));
+ Timestamp now = clock_->CurrentTime();
+ task_queue_->PostTask(
+ ToQueuedTask([ptr, packet, now] { ptr->ReceivePacket(packet, now); }));
}
void RtcpTransceiver::SendCompoundPacket() {