// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CAST_STREAMING_IMPL_CLOCK_OFFSET_ESTIMATOR_IMPL_H_ #define CAST_STREAMING_IMPL_CLOCK_OFFSET_ESTIMATOR_IMPL_H_ #include <stddef.h> #include <stdint.h> #include <map> #include <optional> #include <utility> #include "cast/streaming/impl/clock_offset_estimator.h" #include "cast/streaming/rtp_time.h" #include "cast/streaming/impl/statistics_defines.h" #include "platform/base/trivial_clock_traits.h" namespace openscreen::cast { // This implementation listens to two pairs of events: // 1. FrameAckSent / FrameAckReceived (receiver->sender) // 2. PacketSentToNetwork / PacketReceived (sender->receiver) // // There is a causal relationship between these events in that these events // must happen in order. This class obtains the lower and upper bounds for // the offset by taking the difference of timestamps. class ClockOffsetEstimatorImpl final : public ClockOffsetEstimator { … }; } // namespace openscreen::cast #endif // CAST_STREAMING_IMPL_CLOCK_OFFSET_ESTIMATOR_IMPL_H_