solenberg | 3ebbcb5 | 2017-01-31 03:58:40 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | // Syncable is used by RtpStreamsSynchronizer in VideoReceiveStream, and |
| 12 | // implemented by AudioReceiveStream. |
| 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 14 | #ifndef CALL_SYNCABLE_H_ |
| 15 | #define CALL_SYNCABLE_H_ |
solenberg | 3ebbcb5 | 2017-01-31 03:58:40 -0800 | [diff] [blame] | 16 | |
| 17 | #include <stdint.h> |
| 18 | |
Danil Chapovalov | b9b146c | 2018-06-15 12:28:07 +0200 | [diff] [blame] | 19 | #include "absl/types/optional.h" |
solenberg | 3ebbcb5 | 2017-01-31 03:58:40 -0800 | [diff] [blame] | 20 | |
| 21 | namespace webrtc { |
| 22 | |
| 23 | class Syncable { |
| 24 | public: |
| 25 | struct Info { |
| 26 | int64_t latest_receive_time_ms = 0; |
| 27 | uint32_t latest_received_capture_timestamp = 0; |
| 28 | uint32_t capture_time_ntp_secs = 0; |
| 29 | uint32_t capture_time_ntp_frac = 0; |
| 30 | uint32_t capture_time_source_clock = 0; |
| 31 | int current_delay_ms = 0; |
| 32 | }; |
| 33 | |
| 34 | virtual ~Syncable(); |
| 35 | |
| 36 | virtual int id() const = 0; |
Danil Chapovalov | b9b146c | 2018-06-15 12:28:07 +0200 | [diff] [blame] | 37 | virtual absl::optional<Info> GetInfo() const = 0; |
solenberg | 3ebbcb5 | 2017-01-31 03:58:40 -0800 | [diff] [blame] | 38 | virtual uint32_t GetPlayoutTimestamp() const = 0; |
| 39 | virtual void SetMinimumPlayoutDelay(int delay_ms) = 0; |
| 40 | }; |
| 41 | } // namespace webrtc |
| 42 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 43 | #endif // CALL_SYNCABLE_H_ |