blob: 73a8e8e58647d662fb25f9106d89366f39c0a217 [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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020015#include "rtc_base/basictypes.h"
Steve Antonb3329172017-08-17 15:23:51 -070016
17namespace webrtc {
18
19// With newer versions of SDP, SSRC is often not explicitly signaled and must
20// be learned on the fly. This happens by correlating packet SSRCs with included
21// RTP extension headers like MID and RSID, or by receiving information from
22// RTCP messages.
23// SsrcBindingObservers will be notified when a new binding is learned, which
24// can happen during call setup and/or during the call.
25class SsrcBindingObserver {
26 public:
27 virtual ~SsrcBindingObserver() = default;
28
Steve Anton53c7ba62017-08-18 10:05:47 -070029 virtual void OnSsrcBoundToRsid(const std::string& rsid, uint32_t ssrc) {}
30
31 virtual void OnSsrcBoundToMid(const std::string& mid, uint32_t ssrc) {}
32
33 virtual void OnSsrcBoundToMidRsid(const std::string& mid,
34 const std::string& rsid,
35 uint32_t ssrc) {}
36
37 virtual void OnSsrcBoundToPayloadType(uint8_t payload_type, uint32_t ssrc) {}
Steve Antonb3329172017-08-17 15:23:51 -070038};
39
40} // namespace webrtc
41
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020042#endif // CALL_SSRC_BINDING_OBSERVER_H_