OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 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 |
| 11 #ifndef WEBRTC_API_ORTC_RTPTRANSPORTCONTROLLERINTERFACE_H_ |
| 12 #define WEBRTC_API_ORTC_RTPTRANSPORTCONTROLLERINTERFACE_H_ |
| 13 |
| 14 #include <vector> |
| 15 |
| 16 #include "webrtc/api/ortc/rtptransportinterface.h" |
| 17 |
| 18 namespace webrtc { |
| 19 |
| 20 class RtpTransportControllerAdapter; |
| 21 |
| 22 // Used to group RTP transports between a local endpoint and the same remote |
| 23 // endpoint, for the purpose of sharing bandwidth estimation and other things. |
| 24 // |
| 25 // Comparing this to the PeerConnection model, non-budled audio/video would use |
| 26 // two RtpTransports with a single RtpTransportController, whereas bundled |
| 27 // media would use a single RtpTransport, and two PeerConnections would use |
| 28 // independent RtpTransportControllers. |
| 29 // |
| 30 // RtpTransports are associated with this controller when they're created, by |
| 31 // passing the controller into OrtcFactory's relevant "CreateRtpTransport" |
| 32 // method. When a transport is destroyed, it's automatically disassociated. |
| 33 // GetTransports returns all currently associated transports. |
| 34 // |
| 35 // This is the RTP equivalent of "IceTransportController" in ORTC; RtpTransport |
| 36 // is to RtpTransportController as IceTransport is to IceTransportController. |
| 37 class RtpTransportControllerInterface { |
| 38 public: |
| 39 virtual ~RtpTransportControllerInterface() {} |
| 40 |
| 41 // Returns all transports associated with this controller (see explanation |
| 42 // above). No ordering is guaranteed. |
| 43 virtual std::vector<RtpTransportInterface*> GetTransports() const = 0; |
| 44 |
| 45 protected: |
| 46 // Only for internal use. Returns a pointer to an internal interface, for use |
| 47 // by the implementation. |
| 48 virtual RtpTransportControllerAdapter* GetInternal() = 0; |
| 49 |
| 50 // Classes that can use this internal interface. |
| 51 friend class RtpTransportAdapter; |
| 52 }; |
| 53 |
| 54 } // namespace webrtc |
| 55 |
| 56 #endif // WEBRTC_API_ORTC_RTPTRANSPORTCONTROLLERINTERFACE_H_ |
OLD | NEW |