| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright (c) 2016 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_BASE_TIMESTAMPALIGNER_H_ | 11 #ifndef WEBRTC_BASE_TIMESTAMPALIGNER_H_ |
| 12 #define WEBRTC_BASE_TIMESTAMPALIGNER_H_ | 12 #define WEBRTC_BASE_TIMESTAMPALIGNER_H_ |
| 13 | 13 |
| 14 #include "webrtc/base/basictypes.h" | 14 #include <stdint.h> |
| 15 |
| 15 #include "webrtc/base/constructormagic.h" | 16 #include "webrtc/base/constructormagic.h" |
| 16 | 17 |
| 17 namespace rtc { | 18 namespace rtc { |
| 18 | 19 |
| 19 // The TimestampAligner class helps translating camera timestamps into | 20 // The TimestampAligner class helps translating camera timestamps into |
| 20 // the same timescale as is used by rtc::TimeMicros(). Some cameras | 21 // the same timescale as is used by rtc::TimeMicros(). Some cameras |
| 21 // have built in timestamping which is more accurate than reading the | 22 // have built in timestamping which is more accurate than reading the |
| 22 // system clock, but using a different epoch and unknown clock drift. | 23 // system clock, but using a different epoch and unknown clock drift. |
| 23 // Frame timestamps in webrtc should use rtc::TimeMicros (system monotonic | 24 // Frame timestamps in webrtc should use rtc::TimeMicros (system monotonic |
| 24 // time), and this class provides a filter which lets us use the | 25 // time), and this class provides a filter which lets us use the |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // translated timestamps, to get them back from the future. | 65 // translated timestamps, to get them back from the future. |
| 65 int64_t clip_bias_us_; | 66 int64_t clip_bias_us_; |
| 66 // Used to ensure that translated timestamps are monotonous. | 67 // Used to ensure that translated timestamps are monotonous. |
| 67 int64_t prev_translated_time_us_; | 68 int64_t prev_translated_time_us_; |
| 68 RTC_DISALLOW_COPY_AND_ASSIGN(TimestampAligner); | 69 RTC_DISALLOW_COPY_AND_ASSIGN(TimestampAligner); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace rtc | 72 } // namespace rtc |
| 72 | 73 |
| 73 #endif // WEBRTC_BASE_TIMESTAMPALIGNER_H_ | 74 #endif // WEBRTC_BASE_TIMESTAMPALIGNER_H_ |
| OLD | NEW |