Steve Anton | b332917 | 2017-08-17 15:23:51 -0700 | [diff] [blame] | 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 | */ |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 10 | #ifndef CALL_SSRC_BINDING_OBSERVER_H_ |
| 11 | #define CALL_SSRC_BINDING_OBSERVER_H_ |
Steve Anton | b332917 | 2017-08-17 15:23:51 -0700 | [diff] [blame] | 12 | |
| 13 | #include <string> |
| 14 | |
Steve Anton | b332917 | 2017-08-17 15:23:51 -0700 | [diff] [blame] | 15 | namespace webrtc { |
| 16 | |
| 17 | // With newer versions of SDP, SSRC is often not explicitly signaled and must |
| 18 | // be learned on the fly. This happens by correlating packet SSRCs with included |
| 19 | // RTP extension headers like MID and RSID, or by receiving information from |
| 20 | // RTCP messages. |
| 21 | // SsrcBindingObservers will be notified when a new binding is learned, which |
| 22 | // can happen during call setup and/or during the call. |
| 23 | class SsrcBindingObserver { |
| 24 | public: |
| 25 | virtual ~SsrcBindingObserver() = default; |
| 26 | |
Steve Anton | 53c7ba6 | 2017-08-18 10:05:47 -0700 | [diff] [blame] | 27 | virtual void OnSsrcBoundToRsid(const std::string& rsid, uint32_t ssrc) {} |
| 28 | |
| 29 | virtual void OnSsrcBoundToMid(const std::string& mid, uint32_t ssrc) {} |
| 30 | |
| 31 | virtual void OnSsrcBoundToMidRsid(const std::string& mid, |
| 32 | const std::string& rsid, |
| 33 | uint32_t ssrc) {} |
| 34 | |
| 35 | virtual void OnSsrcBoundToPayloadType(uint8_t payload_type, uint32_t ssrc) {} |
Steve Anton | b332917 | 2017-08-17 15:23:51 -0700 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } // namespace webrtc |
| 39 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 40 | #endif // CALL_SSRC_BINDING_OBSERVER_H_ |