/* * Copyright (c) 2016 The WebRTC Project Authors. All rights reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef RTC_BASE_TIMESTAMP_ALIGNER_H_ #define RTC_BASE_TIMESTAMP_ALIGNER_H_ #include <stdint.h> #include "rtc_base/system/rtc_export.h" #include "rtc_base/time_utils.h" namespace rtc { // The TimestampAligner class helps translating timestamps of a capture system // into the same timescale as is used by rtc::TimeMicros(). Some capture systems // provide timestamps, which comes from the capturing hardware (camera or sound // card) or stamped close to the capturing hardware. Such timestamps are more // accurate (less jittery) than reading the system clock, but may have a // different epoch and unknown clock drift. Frame timestamps in webrtc should // use rtc::TimeMicros (system monotonic time), and this class provides a filter // which lets us use the rtc::TimeMicros timescale, and at the same time take // advantage of higher accuracy of the capturer's clock. // This class is not thread safe, so all calls to it must be synchronized // externally. class RTC_EXPORT TimestampAligner { … }; } // namespace rtc #endif // RTC_BASE_TIMESTAMP_ALIGNER_H_