blob: 09c0f221728c9cc268d0becba83a0041e5a66bb7 [file] [log] [blame]
solenberg3ebbcb52017-01-31 11:58:401/*
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
Tommif6f45432022-05-20 13:21:2011// Syncable is used by RtpStreamsSynchronizer in VideoReceiveStreamInterface,
Tommi3176ef72022-05-22 18:47:2812// and implemented by AudioReceiveStreamInterface.
solenberg3ebbcb52017-01-31 11:58:4013
Mirko Bonadei92ea95e2017-09-15 04:47:3114#ifndef CALL_SYNCABLE_H_
15#define CALL_SYNCABLE_H_
solenberg3ebbcb52017-01-31 11:58:4016
17#include <stdint.h>
18
Florent Castelli8037fc62024-08-29 13:00:4019#include <optional>
solenberg3ebbcb52017-01-31 11:58:4020
21namespace webrtc {
22
23class 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 Persson74d2b1d2020-02-10 15:33:2936 virtual uint32_t id() const = 0;
Florent Castelli8037fc62024-08-29 13:00:4037 virtual std::optional<Info> GetInfo() const = 0;
Åsa Perssonfcf79cc2019-10-22 13:23:4438 virtual bool GetPlayoutRtpTimestamp(uint32_t* rtp_timestamp,
39 int64_t* time_ms) const = 0;
Ivo Creusenbef7b052020-09-08 14:30:2540 virtual bool SetMinimumPlayoutDelay(int delay_ms) = 0;
Åsa Perssonfcf79cc2019-10-22 13:23:4441 virtual void SetEstimatedPlayoutNtpTimestampMs(int64_t ntp_timestamp_ms,
42 int64_t time_ms) = 0;
solenberg3ebbcb52017-01-31 11:58:4043};
44} // namespace webrtc
45
Mirko Bonadei92ea95e2017-09-15 04:47:3146#endif // CALL_SYNCABLE_H_