Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 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 | |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 11 | #ifndef PC_RTP_TRANSCEIVER_H_ |
| 12 | #define PC_RTP_TRANSCEIVER_H_ |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 13 | |
Harald Alvestrand | 5761e7b | 2021-01-29 14:45:08 +0000 | [diff] [blame] | 14 | #include <stddef.h> |
| 15 | |
| 16 | #include <algorithm> |
| 17 | #include <functional> |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 18 | #include <string> |
| 19 | #include <vector> |
| 20 | |
Harald Alvestrand | 5761e7b | 2021-01-29 14:45:08 +0000 | [diff] [blame] | 21 | #include "absl/types/optional.h" |
| 22 | #include "api/array_view.h" |
| 23 | #include "api/media_types.h" |
| 24 | #include "api/proxy.h" |
| 25 | #include "api/rtc_error.h" |
| 26 | #include "api/rtp_parameters.h" |
| 27 | #include "api/rtp_receiver_interface.h" |
| 28 | #include "api/rtp_sender_interface.h" |
| 29 | #include "api/rtp_transceiver_direction.h" |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 30 | #include "api/rtp_transceiver_interface.h" |
Harald Alvestrand | 5761e7b | 2021-01-29 14:45:08 +0000 | [diff] [blame] | 31 | #include "api/scoped_refptr.h" |
| 32 | #include "api/task_queue/task_queue_base.h" |
Ruslan Burakov | 501bfba | 2019-02-11 10:29:19 +0100 | [diff] [blame] | 33 | #include "pc/channel_interface.h" |
Florent Castelli | 2d9d82e | 2019-04-23 19:25:51 +0200 | [diff] [blame] | 34 | #include "pc/channel_manager.h" |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 35 | #include "pc/rtp_receiver.h" |
| 36 | #include "pc/rtp_sender.h" |
Harald Alvestrand | 5761e7b | 2021-01-29 14:45:08 +0000 | [diff] [blame] | 37 | #include "rtc_base/ref_counted_object.h" |
Tommi | 99c8a80 | 2021-04-27 15:00:00 +0200 | [diff] [blame] | 38 | #include "rtc_base/task_utils/pending_task_safety_flag.h" |
Harald Alvestrand | 5761e7b | 2021-01-29 14:45:08 +0000 | [diff] [blame] | 39 | #include "rtc_base/third_party/sigslot/sigslot.h" |
| 40 | #include "rtc_base/thread_annotations.h" |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 41 | |
| 42 | namespace webrtc { |
| 43 | |
| 44 | // Implementation of the public RtpTransceiverInterface. |
| 45 | // |
| 46 | // The RtpTransceiverInterface is only intended to be used with a PeerConnection |
| 47 | // that enables Unified Plan SDP. Thus, the methods that only need to implement |
| 48 | // public API features and are not used internally can assume exactly one sender |
| 49 | // and receiver. |
| 50 | // |
| 51 | // Since the RtpTransceiver is used internally by PeerConnection for tracking |
| 52 | // RtpSenders, RtpReceivers, and BaseChannels, and PeerConnection needs to be |
| 53 | // backwards compatible with Plan B SDP, this implementation is more flexible |
| 54 | // than that required by the WebRTC specification. |
| 55 | // |
| 56 | // With Plan B SDP, an RtpTransceiver can have any number of senders and |
| 57 | // receivers which map to a=ssrc lines in the m= section. |
| 58 | // With Unified Plan SDP, an RtpTransceiver will have exactly one sender and one |
| 59 | // receiver which are encapsulated by the m= section. |
| 60 | // |
| 61 | // This class manages the RtpSenders, RtpReceivers, and BaseChannel associated |
| 62 | // with this m= section. Since the transceiver, senders, and receivers are |
| 63 | // reference counted and can be referenced from JavaScript (in Chromium), these |
| 64 | // objects must be ready to live for an arbitrary amount of time. The |
| 65 | // BaseChannel is not reference counted and is owned by the ChannelManager, so |
| 66 | // the PeerConnection must take care of creating/deleting the BaseChannel and |
| 67 | // setting the channel reference in the transceiver to null when it has been |
| 68 | // deleted. |
| 69 | // |
| 70 | // The RtpTransceiver is specialized to either audio or video according to the |
| 71 | // MediaType specified in the constructor. Audio RtpTransceivers will have |
| 72 | // AudioRtpSenders, AudioRtpReceivers, and a VoiceChannel. Video RtpTransceivers |
| 73 | // will have VideoRtpSenders, VideoRtpReceivers, and a VideoChannel. |
| 74 | class RtpTransceiver final |
Steve Anton | 6077675 | 2018-01-10 11:51:34 -0800 | [diff] [blame] | 75 | : public rtc::RefCountedObject<RtpTransceiverInterface>, |
| 76 | public sigslot::has_slots<> { |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 77 | public: |
Steve Anton | 79e7960 | 2017-11-20 10:25:56 -0800 | [diff] [blame] | 78 | // Construct a Plan B-style RtpTransceiver with no senders, receivers, or |
| 79 | // channel set. |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 80 | // |media_type| specifies the type of RtpTransceiver (and, by transitivity, |
| 81 | // the type of senders, receivers, and channel). Can either by audio or video. |
Tommi | 99c8a80 | 2021-04-27 15:00:00 +0200 | [diff] [blame] | 82 | RtpTransceiver(cricket::MediaType media_type, |
| 83 | cricket::ChannelManager* channel_manager); |
Steve Anton | 79e7960 | 2017-11-20 10:25:56 -0800 | [diff] [blame] | 84 | // Construct a Unified Plan-style RtpTransceiver with the given sender and |
| 85 | // receiver. The media type will be derived from the media types of the sender |
| 86 | // and receiver. The sender and receiver should have the same media type. |
Markus Handell | 0357b3e | 2020-03-16 13:40:51 +0100 | [diff] [blame] | 87 | // |HeaderExtensionsToOffer| is used for initializing the return value of |
| 88 | // HeaderExtensionsToOffer(). |
Steve Anton | 79e7960 | 2017-11-20 10:25:56 -0800 | [diff] [blame] | 89 | RtpTransceiver( |
| 90 | rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>> sender, |
| 91 | rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>> |
Florent Castelli | 2d9d82e | 2019-04-23 19:25:51 +0200 | [diff] [blame] | 92 | receiver, |
Markus Handell | 0357b3e | 2020-03-16 13:40:51 +0100 | [diff] [blame] | 93 | cricket::ChannelManager* channel_manager, |
Harald Alvestrand | 280054f | 2020-11-10 13:12:53 +0000 | [diff] [blame] | 94 | std::vector<RtpHeaderExtensionCapability> HeaderExtensionsToOffer, |
| 95 | std::function<void()> on_negotiation_needed); |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 96 | ~RtpTransceiver() override; |
| 97 | |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 98 | // Returns the Voice/VideoChannel set for this transceiver. May be null if |
| 99 | // the transceiver is not in the currently set local/remote description. |
Amit Hilbuch | dd9390c | 2018-11-13 16:26:05 -0800 | [diff] [blame] | 100 | cricket::ChannelInterface* channel() const { return channel_; } |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 101 | |
| 102 | // Sets the Voice/VideoChannel. The caller must pass in the correct channel |
| 103 | // implementation based on the type of the transceiver. |
Amit Hilbuch | dd9390c | 2018-11-13 16:26:05 -0800 | [diff] [blame] | 104 | void SetChannel(cricket::ChannelInterface* channel); |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 105 | |
| 106 | // Adds an RtpSender of the appropriate type to be owned by this transceiver. |
| 107 | // Must not be null. |
| 108 | void AddSender( |
| 109 | rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>> sender); |
| 110 | |
| 111 | // Removes the given RtpSender. Returns false if the sender is not owned by |
| 112 | // this transceiver. |
| 113 | bool RemoveSender(RtpSenderInterface* sender); |
| 114 | |
| 115 | // Returns a vector of the senders owned by this transceiver. |
| 116 | std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> |
| 117 | senders() const { |
| 118 | return senders_; |
| 119 | } |
| 120 | |
| 121 | // Adds an RtpReceiver of the appropriate type to be owned by this |
| 122 | // transceiver. Must not be null. |
| 123 | void AddReceiver( |
| 124 | rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>> |
| 125 | receiver); |
| 126 | |
| 127 | // Removes the given RtpReceiver. Returns false if the sender is not owned by |
| 128 | // this transceiver. |
| 129 | bool RemoveReceiver(RtpReceiverInterface* receiver); |
| 130 | |
| 131 | // Returns a vector of the receivers owned by this transceiver. |
| 132 | std::vector< |
| 133 | rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> |
| 134 | receivers() const { |
| 135 | return receivers_; |
| 136 | } |
| 137 | |
Steve Anton | f9381f0 | 2017-12-14 10:23:57 -0800 | [diff] [blame] | 138 | // Returns the backing object for the transceiver's Unified Plan sender. |
| 139 | rtc::scoped_refptr<RtpSenderInternal> sender_internal() const; |
| 140 | |
| 141 | // Returns the backing object for the transceiver's Unified Plan receiver. |
| 142 | rtc::scoped_refptr<RtpReceiverInternal> receiver_internal() const; |
| 143 | |
Steve Anton | dcc3c02 | 2017-12-22 16:02:54 -0800 | [diff] [blame] | 144 | // RtpTransceivers are not associated until they have a corresponding media |
| 145 | // section set in SetLocalDescription or SetRemoteDescription. Therefore, |
| 146 | // when setting a local offer we need a way to remember which transceiver was |
| 147 | // used to create which media section in the offer. Storing the mline index |
| 148 | // in CreateOffer is specified in JSEP to allow us to do that. |
Danil Chapovalov | 66cadcc | 2018-06-19 16:47:43 +0200 | [diff] [blame] | 149 | absl::optional<size_t> mline_index() const { return mline_index_; } |
| 150 | void set_mline_index(absl::optional<size_t> mline_index) { |
Steve Anton | dcc3c02 | 2017-12-22 16:02:54 -0800 | [diff] [blame] | 151 | mline_index_ = mline_index; |
| 152 | } |
| 153 | |
| 154 | // Sets the MID for this transceiver. If the MID is not null, then the |
| 155 | // transceiver is considered "associated" with the media section that has the |
| 156 | // same MID. |
Danil Chapovalov | 66cadcc | 2018-06-19 16:47:43 +0200 | [diff] [blame] | 157 | void set_mid(const absl::optional<std::string>& mid) { mid_ = mid; } |
Steve Anton | dcc3c02 | 2017-12-22 16:02:54 -0800 | [diff] [blame] | 158 | |
| 159 | // Sets the intended direction for this transceiver. Intended to be used |
| 160 | // internally over SetDirection since this does not trigger a negotiation |
| 161 | // needed callback. |
| 162 | void set_direction(RtpTransceiverDirection direction) { |
| 163 | direction_ = direction; |
| 164 | } |
| 165 | |
| 166 | // Sets the current direction for this transceiver as negotiated in an offer/ |
| 167 | // answer exchange. The current direction is null before an answer with this |
| 168 | // transceiver has been set. |
| 169 | void set_current_direction(RtpTransceiverDirection direction); |
| 170 | |
Steve Anton | 0f5400a | 2018-07-17 14:25:36 -0700 | [diff] [blame] | 171 | // Sets the fired direction for this transceiver. The fired direction is null |
| 172 | // until SetRemoteDescription is called or an answer is set (either local or |
| 173 | // remote). |
| 174 | void set_fired_direction(RtpTransceiverDirection direction); |
| 175 | |
Steve Anton | f9381f0 | 2017-12-14 10:23:57 -0800 | [diff] [blame] | 176 | // According to JSEP rules for SetRemoteDescription, RtpTransceivers can be |
| 177 | // reused only if they were added by AddTrack. |
| 178 | void set_created_by_addtrack(bool created_by_addtrack) { |
| 179 | created_by_addtrack_ = created_by_addtrack; |
| 180 | } |
Eldar Rello | 353a718 | 2019-11-25 18:49:44 +0200 | [diff] [blame] | 181 | // If AddTrack has been called then transceiver can't be removed during |
| 182 | // rollback. |
| 183 | void set_reused_for_addtrack(bool reused_for_addtrack) { |
| 184 | reused_for_addtrack_ = reused_for_addtrack; |
| 185 | } |
| 186 | |
Steve Anton | f9381f0 | 2017-12-14 10:23:57 -0800 | [diff] [blame] | 187 | bool created_by_addtrack() const { return created_by_addtrack_; } |
| 188 | |
Eldar Rello | 353a718 | 2019-11-25 18:49:44 +0200 | [diff] [blame] | 189 | bool reused_for_addtrack() const { return reused_for_addtrack_; } |
| 190 | |
Steve Anton | f9381f0 | 2017-12-14 10:23:57 -0800 | [diff] [blame] | 191 | // Returns true if this transceiver has ever had the current direction set to |
| 192 | // sendonly or sendrecv. |
| 193 | bool has_ever_been_used_to_send() const { |
| 194 | return has_ever_been_used_to_send_; |
| 195 | } |
| 196 | |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 197 | // Informs the transceiver that its owning |
| 198 | // PeerConnection is closed. |
| 199 | void SetPeerConnectionClosed(); |
| 200 | |
Harald Alvestrand | c75c428 | 2020-08-26 12:17:54 +0000 | [diff] [blame] | 201 | // Executes the "stop the RTCRtpTransceiver" procedure from |
| 202 | // the webrtc-pc specification, described under the stop() method. |
| 203 | void StopTransceiverProcedure(); |
| 204 | |
Steve Anton | 52d8677 | 2018-02-20 15:48:12 -0800 | [diff] [blame] | 205 | // Fired when the RtpTransceiver state changes such that negotiation is now |
| 206 | // needed (e.g., in response to a direction change). |
Harald Alvestrand | 280054f | 2020-11-10 13:12:53 +0000 | [diff] [blame] | 207 | // sigslot::signal0<> SignalNegotiationNeeded; |
Steve Anton | 52d8677 | 2018-02-20 15:48:12 -0800 | [diff] [blame] | 208 | |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 209 | // RtpTransceiverInterface implementation. |
Steve Anton | 6947025 | 2018-02-09 11:43:08 -0800 | [diff] [blame] | 210 | cricket::MediaType media_type() const override; |
Danil Chapovalov | 66cadcc | 2018-06-19 16:47:43 +0200 | [diff] [blame] | 211 | absl::optional<std::string> mid() const override; |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 212 | rtc::scoped_refptr<RtpSenderInterface> sender() const override; |
| 213 | rtc::scoped_refptr<RtpReceiverInterface> receiver() const override; |
| 214 | bool stopped() const override; |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 215 | bool stopping() const override; |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 216 | RtpTransceiverDirection direction() const override; |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 217 | RTCError SetDirectionWithError( |
| 218 | RtpTransceiverDirection new_direction) override; |
Danil Chapovalov | 66cadcc | 2018-06-19 16:47:43 +0200 | [diff] [blame] | 219 | absl::optional<RtpTransceiverDirection> current_direction() const override; |
Steve Anton | 0f5400a | 2018-07-17 14:25:36 -0700 | [diff] [blame] | 220 | absl::optional<RtpTransceiverDirection> fired_direction() const override; |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 221 | RTCError StopStandard() override; |
| 222 | void StopInternal() override; |
Florent Castelli | 2d9d82e | 2019-04-23 19:25:51 +0200 | [diff] [blame] | 223 | RTCError SetCodecPreferences( |
| 224 | rtc::ArrayView<RtpCodecCapability> codecs) override; |
| 225 | std::vector<RtpCodecCapability> codec_preferences() const override { |
| 226 | return codec_preferences_; |
| 227 | } |
Markus Handell | 0357b3e | 2020-03-16 13:40:51 +0100 | [diff] [blame] | 228 | std::vector<RtpHeaderExtensionCapability> HeaderExtensionsToOffer() |
| 229 | const override; |
Markus Handell | 5932fe1 | 2020-12-17 22:19:40 +0100 | [diff] [blame] | 230 | std::vector<RtpHeaderExtensionCapability> HeaderExtensionsNegotiated() |
| 231 | const override; |
Markus Handell | 755c65d | 2020-06-24 01:06:10 +0200 | [diff] [blame] | 232 | RTCError SetOfferedRtpHeaderExtensions( |
| 233 | rtc::ArrayView<const RtpHeaderExtensionCapability> |
| 234 | header_extensions_to_offer) override; |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 235 | |
Tommi | cc7a368 | 2021-05-04 14:59:38 +0200 | [diff] [blame] | 236 | // Called on the signaling thread when the local or remote content description |
| 237 | // is updated. Used to update the negotiated header extensions. |
| 238 | // TODO(tommi): The implementation of this method is currently very simple and |
| 239 | // only used for updating the negotiated headers. However, we're planning to |
| 240 | // move all the updates done on the channel from the transceiver into this |
| 241 | // method. This will happen with the ownership of the channel object being |
| 242 | // moved into the transceiver. |
| 243 | void OnNegotiationUpdate(SdpType sdp_type, |
| 244 | const cricket::MediaContentDescription* content); |
| 245 | |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 246 | private: |
Tommi | 99c8a80 | 2021-04-27 15:00:00 +0200 | [diff] [blame] | 247 | void OnFirstPacketReceived(); |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 248 | void StopSendingAndReceiving(); |
Steve Anton | 6077675 | 2018-01-10 11:51:34 -0800 | [diff] [blame] | 249 | |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 250 | // Enforce that this object is created, used and destroyed on one thread. |
Tommi | 99c8a80 | 2021-04-27 15:00:00 +0200 | [diff] [blame] | 251 | TaskQueueBase* const thread_; |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 252 | const bool unified_plan_; |
| 253 | const cricket::MediaType media_type_; |
Tommi | 99c8a80 | 2021-04-27 15:00:00 +0200 | [diff] [blame] | 254 | rtc::scoped_refptr<PendingTaskSafetyFlag> signaling_thread_safety_; |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 255 | std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> |
| 256 | senders_; |
| 257 | std::vector< |
| 258 | rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> |
| 259 | receivers_; |
| 260 | |
Tommi | 99c8a80 | 2021-04-27 15:00:00 +0200 | [diff] [blame] | 261 | bool stopped_ RTC_GUARDED_BY(thread_) = false; |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 262 | bool stopping_ RTC_GUARDED_BY(thread_) = false; |
| 263 | bool is_pc_closed_ = false; |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 264 | RtpTransceiverDirection direction_ = RtpTransceiverDirection::kInactive; |
Danil Chapovalov | 66cadcc | 2018-06-19 16:47:43 +0200 | [diff] [blame] | 265 | absl::optional<RtpTransceiverDirection> current_direction_; |
Steve Anton | 0f5400a | 2018-07-17 14:25:36 -0700 | [diff] [blame] | 266 | absl::optional<RtpTransceiverDirection> fired_direction_; |
Danil Chapovalov | 66cadcc | 2018-06-19 16:47:43 +0200 | [diff] [blame] | 267 | absl::optional<std::string> mid_; |
| 268 | absl::optional<size_t> mline_index_; |
Steve Anton | f9381f0 | 2017-12-14 10:23:57 -0800 | [diff] [blame] | 269 | bool created_by_addtrack_ = false; |
Eldar Rello | 353a718 | 2019-11-25 18:49:44 +0200 | [diff] [blame] | 270 | bool reused_for_addtrack_ = false; |
Steve Anton | f9381f0 | 2017-12-14 10:23:57 -0800 | [diff] [blame] | 271 | bool has_ever_been_used_to_send_ = false; |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 272 | |
Amit Hilbuch | dd9390c | 2018-11-13 16:26:05 -0800 | [diff] [blame] | 273 | cricket::ChannelInterface* channel_ = nullptr; |
Florent Castelli | 2d9d82e | 2019-04-23 19:25:51 +0200 | [diff] [blame] | 274 | cricket::ChannelManager* channel_manager_ = nullptr; |
| 275 | std::vector<RtpCodecCapability> codec_preferences_; |
Markus Handell | 755c65d | 2020-06-24 01:06:10 +0200 | [diff] [blame] | 276 | std::vector<RtpHeaderExtensionCapability> header_extensions_to_offer_; |
Tommi | cc7a368 | 2021-05-04 14:59:38 +0200 | [diff] [blame] | 277 | |
| 278 | // |negotiated_header_extensions_| is read and written to on the signaling |
| 279 | // thread from the SdpOfferAnswerHandler class (e.g. |
| 280 | // PushdownMediaDescription(). |
| 281 | cricket::RtpHeaderExtensions negotiated_header_extensions_ |
| 282 | RTC_GUARDED_BY(thread_); |
| 283 | |
Harald Alvestrand | 280054f | 2020-11-10 13:12:53 +0000 | [diff] [blame] | 284 | const std::function<void()> on_negotiation_needed_; |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 285 | }; |
| 286 | |
Mirko Bonadei | 9d9b8de | 2021-02-26 09:51:26 +0100 | [diff] [blame] | 287 | BEGIN_PRIMARY_PROXY_MAP(RtpTransceiver) |
Harald Alvestrand | 5761e7b | 2021-01-29 14:45:08 +0000 | [diff] [blame] | 288 | |
Mirko Bonadei | 9d9b8de | 2021-02-26 09:51:26 +0100 | [diff] [blame] | 289 | PROXY_PRIMARY_THREAD_DESTRUCTOR() |
Tomas Gunnarsson | fc83cdc | 2020-09-10 13:04:50 +0200 | [diff] [blame] | 290 | BYPASS_PROXY_CONSTMETHOD0(cricket::MediaType, media_type) |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 291 | PROXY_CONSTMETHOD0(absl::optional<std::string>, mid) |
| 292 | PROXY_CONSTMETHOD0(rtc::scoped_refptr<RtpSenderInterface>, sender) |
| 293 | PROXY_CONSTMETHOD0(rtc::scoped_refptr<RtpReceiverInterface>, receiver) |
| 294 | PROXY_CONSTMETHOD0(bool, stopped) |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 295 | PROXY_CONSTMETHOD0(bool, stopping) |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 296 | PROXY_CONSTMETHOD0(RtpTransceiverDirection, direction) |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 297 | PROXY_METHOD1(webrtc::RTCError, SetDirectionWithError, RtpTransceiverDirection) |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 298 | PROXY_CONSTMETHOD0(absl::optional<RtpTransceiverDirection>, current_direction) |
| 299 | PROXY_CONSTMETHOD0(absl::optional<RtpTransceiverDirection>, fired_direction) |
Harald Alvestrand | 6060df5 | 2020-08-11 09:54:02 +0200 | [diff] [blame] | 300 | PROXY_METHOD0(webrtc::RTCError, StopStandard) |
| 301 | PROXY_METHOD0(void, StopInternal) |
Florent Castelli | 2d9d82e | 2019-04-23 19:25:51 +0200 | [diff] [blame] | 302 | PROXY_METHOD1(webrtc::RTCError, |
| 303 | SetCodecPreferences, |
| 304 | rtc::ArrayView<RtpCodecCapability>) |
| 305 | PROXY_CONSTMETHOD0(std::vector<RtpCodecCapability>, codec_preferences) |
Markus Handell | 0357b3e | 2020-03-16 13:40:51 +0100 | [diff] [blame] | 306 | PROXY_CONSTMETHOD0(std::vector<RtpHeaderExtensionCapability>, |
| 307 | HeaderExtensionsToOffer) |
Markus Handell | 5932fe1 | 2020-12-17 22:19:40 +0100 | [diff] [blame] | 308 | PROXY_CONSTMETHOD0(std::vector<RtpHeaderExtensionCapability>, |
| 309 | HeaderExtensionsNegotiated) |
Markus Handell | 755c65d | 2020-06-24 01:06:10 +0200 | [diff] [blame] | 310 | PROXY_METHOD1(webrtc::RTCError, |
| 311 | SetOfferedRtpHeaderExtensions, |
| 312 | rtc::ArrayView<const RtpHeaderExtensionCapability>) |
Nico Weber | 22f9925 | 2019-02-20 10:13:16 -0500 | [diff] [blame] | 313 | END_PROXY_MAP() |
Steve Anton | 6e634bf | 2017-11-13 10:44:53 -0800 | [diff] [blame] | 314 | |
| 315 | } // namespace webrtc |
| 316 | |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 317 | #endif // PC_RTP_TRANSCEIVER_H_ |