solenberg | 3ebbcb5 | 2017-01-31 11:58:40 | [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 | |
Tommi | f6f4543 | 2022-05-20 13:21:20 | [diff] [blame] | 11 | // Syncable is used by RtpStreamsSynchronizer in VideoReceiveStreamInterface, |
Tommi | 3176ef7 | 2022-05-22 18:47:28 | [diff] [blame] | 12 | // and implemented by AudioReceiveStreamInterface. |
solenberg | 3ebbcb5 | 2017-01-31 11:58:40 | [diff] [blame] | 13 | |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 14 | #ifndef CALL_SYNCABLE_H_ |
| 15 | #define CALL_SYNCABLE_H_ |
solenberg | 3ebbcb5 | 2017-01-31 11:58:40 | [diff] [blame] | 16 | |
| 17 | #include <stdint.h> |
| 18 | |
Florent Castelli | 8037fc6 | 2024-08-29 13:00:40 | [diff] [blame] | 19 | #include <optional> |
solenberg | 3ebbcb5 | 2017-01-31 11:58:40 | [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 | |
Åsa Persson | 74d2b1d | 2020-02-10 15:33:29 | [diff] [blame] | 36 | virtual uint32_t id() const = 0; |
Florent Castelli | 8037fc6 | 2024-08-29 13:00:40 | [diff] [blame] | 37 | virtual std::optional<Info> GetInfo() const = 0; |
Åsa Persson | fcf79cc | 2019-10-22 13:23:44 | [diff] [blame] | 38 | virtual bool GetPlayoutRtpTimestamp(uint32_t* rtp_timestamp, |
| 39 | int64_t* time_ms) const = 0; |
Ivo Creusen | bef7b05 | 2020-09-08 14:30:25 | [diff] [blame] | 40 | virtual bool SetMinimumPlayoutDelay(int delay_ms) = 0; |
Åsa Persson | fcf79cc | 2019-10-22 13:23:44 | [diff] [blame] | 41 | virtual void SetEstimatedPlayoutNtpTimestampMs(int64_t ntp_timestamp_ms, |
| 42 | int64_t time_ms) = 0; |
solenberg | 3ebbcb5 | 2017-01-31 11:58:40 | [diff] [blame] | 43 | }; |
| 44 | } // namespace webrtc |
| 45 | |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 46 | #endif // CALL_SYNCABLE_H_ |