blob: 90ce5d7089114e42a9429253ded2602e3ce81e83 [file] [log] [blame]
Ruslan Burakov493a6502019-02-27 15:32:48 +01001/*
2 * Copyright (c) 2019 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#ifndef MEDIA_BASE_DELAYABLE_H_
12#define MEDIA_BASE_DELAYABLE_H_
13
14#include <stdint.h>
15
16#include "absl/types/optional.h"
17
18namespace cricket {
19
20// Delayable is used by user code through ApplyConstraints algorithm. Its
21// methods must take precendence over similar functional in |syncable.h|.
22class Delayable {
23 public:
24 virtual ~Delayable() {}
25 // Set base minimum delay of the receive stream with specified ssrc.
26 // Base minimum delay sets lower bound on minimum delay value which
27 // determines minimum delay until audio playout.
28 // Returns false if there is no stream with given ssrc.
29 virtual bool SetBaseMinimumPlayoutDelayMs(uint32_t ssrc, int delay_ms) = 0;
30
31 // Returns current value of base minimum delay in milliseconds.
32 virtual absl::optional<int> GetBaseMinimumPlayoutDelayMs(
33 uint32_t ssrc) const = 0;
34};
35
36} // namespace cricket
37
38#endif // MEDIA_BASE_DELAYABLE_H_