jitter_buffer_delay_interface.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright 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. #ifndef PC_JITTER_BUFFER_DELAY_INTERFACE_H_
  11. #define PC_JITTER_BUFFER_DELAY_INTERFACE_H_
  12. #include <stdint.h>
  13. #include "absl/types/optional.h"
  14. #include "media/base/delayable.h"
  15. #include "rtc_base/ref_count.h"
  16. namespace webrtc {
  17. // JitterBufferDelay delivers user's queries to the underlying media channel. It
  18. // can describe either video or audio delay for receiving stream. "Interface"
  19. // suffix in the interface name is required to be compatible with api/proxy.cc
  20. class JitterBufferDelayInterface : public rtc::RefCountInterface {
  21. public:
  22. // OnStart allows to uniqely identify to which receiving stream playout
  23. // delay must correpond through |media_channel| and |ssrc| pair.
  24. virtual void OnStart(cricket::Delayable* media_channel, uint32_t ssrc) = 0;
  25. // Indicates that underlying receiving stream is stopped.
  26. virtual void OnStop() = 0;
  27. virtual void Set(absl::optional<double> delay_seconds) = 0;
  28. };
  29. } // namespace webrtc
  30. #endif // PC_JITTER_BUFFER_DELAY_INTERFACE_H_