#include <algorithm>
#include <utility>
#include "base/check.h"
#include "base/time/tick_clock.h"
#include "media/cast/logging/receiver_time_offset_estimator_impl.h"
namespace media {
namespace cast {
namespace {
uint64_t MakeEventKey(RtpTimeTicks rtp, uint16_t packet_id, bool audio) { … }
}
ReceiverTimeOffsetEstimatorImpl::BoundCalculator::BoundCalculator()
: … { … }
ReceiverTimeOffsetEstimatorImpl::BoundCalculator::~BoundCalculator() = default;
void ReceiverTimeOffsetEstimatorImpl::BoundCalculator::SetSent(
RtpTimeTicks rtp,
uint16_t packet_id,
bool audio,
base::TimeTicks t) { … }
void ReceiverTimeOffsetEstimatorImpl::BoundCalculator::SetReceived(
RtpTimeTicks rtp,
uint16_t packet_id,
bool audio,
base::TimeTicks t) { … }
void ReceiverTimeOffsetEstimatorImpl::BoundCalculator::UpdateBound(
base::TimeTicks sent, base::TimeTicks received) { … }
void ReceiverTimeOffsetEstimatorImpl::BoundCalculator::CheckUpdate(
uint64_t key) { … }
ReceiverTimeOffsetEstimatorImpl::ReceiverTimeOffsetEstimatorImpl() = default;
ReceiverTimeOffsetEstimatorImpl::~ReceiverTimeOffsetEstimatorImpl() { … }
void ReceiverTimeOffsetEstimatorImpl::OnReceiveFrameEvent(
const FrameEvent& frame_event) { … }
bool ReceiverTimeOffsetEstimatorImpl::GetReceiverOffsetBounds(
base::TimeDelta* lower_bound,
base::TimeDelta* upper_bound) { … }
void ReceiverTimeOffsetEstimatorImpl::OnReceivePacketEvent(
const PacketEvent& packet_event) { … }
}
}