ssrc_binding_observer.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. #ifndef CALL_SSRC_BINDING_OBSERVER_H_
  11. #define CALL_SSRC_BINDING_OBSERVER_H_
  12. #include <string>
  13. namespace webrtc {
  14. // With newer versions of SDP, SSRC is often not explicitly signaled and must
  15. // be learned on the fly. This happens by correlating packet SSRCs with included
  16. // RTP extension headers like MID and RSID, or by receiving information from
  17. // RTCP messages.
  18. // SsrcBindingObservers will be notified when a new binding is learned, which
  19. // can happen during call setup and/or during the call.
  20. class SsrcBindingObserver {
  21. public:
  22. virtual ~SsrcBindingObserver() = default;
  23. virtual void OnSsrcBoundToRsid(const std::string& rsid, uint32_t ssrc) {}
  24. virtual void OnSsrcBoundToMid(const std::string& mid, uint32_t ssrc) {}
  25. virtual void OnSsrcBoundToMidRsid(const std::string& mid,
  26. const std::string& rsid,
  27. uint32_t ssrc) {}
  28. virtual void OnSsrcBoundToPayloadType(uint8_t payload_type, uint32_t ssrc) {}
  29. };
  30. } // namespace webrtc
  31. #endif // CALL_SSRC_BINDING_OBSERVER_H_