| 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 |
| 18 | namespace cricket { |
| 19 |
| 20 | // Delayable is used by user code through ApplyConstraints algorithm. Its |
| 21 | // methods must take precendence over similar functional in `syncable.h`. |
| 22 | class 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_ |
| 39 |