blob: ada505610fa0c0e55fd7d146420e5bedccc7deb7 [file] [log] [blame]
Steve Antonb3329172017-08-17 15:23:51 -07001/*
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 Bonadei92ea95e2017-09-15 06:47:31 +020010#ifndef CALL_SSRC_BINDING_OBSERVER_H_
11#define CALL_SSRC_BINDING_OBSERVER_H_
Steve Antonb3329172017-08-17 15:23:51 -070012
13#include <string>
14
Steve Antonb3329172017-08-17 15:23:51 -070015namespace 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.
23class SsrcBindingObserver {
24 public:
25 virtual ~SsrcBindingObserver() = default;
26
Steve Anton53c7ba62017-08-18 10:05:47 -070027 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 Antonb3329172017-08-17 15:23:51 -070036};
37
38} // namespace webrtc
39
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020040#endif // CALL_SSRC_BINDING_OBSERVER_H_