blob: ac8f33c7059b4f4d88742de996bc2bb0e79f7b8e [file] [log] [blame]
Henrik Kjellanderbd0ae452016-02-10 09:53:121/*
kjellander95ed4e62016-02-10 15:54:432 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
Henrik Kjellanderbd0ae452016-02-10 09:53:123 *
kjellander95ed4e62016-02-10 15:54:434 * 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.
Henrik Kjellanderbd0ae452016-02-10 09:53:129 */
10
ossu25e4ac72017-01-23 12:56:2511#ifndef WEBRTC_PC_PEERCONNECTION_H_
12#define WEBRTC_PC_PEERCONNECTION_H_
Henrik Kjellanderbd0ae452016-02-10 09:53:1213
14#include <string>
perkj3c013b32016-03-24 10:16:1915#include <map>
kwibergb4bfca42016-04-27 13:47:2916#include <memory>
perkj3c013b32016-03-24 10:16:1917#include <vector>
Henrik Kjellanderbd0ae452016-02-10 09:53:1218
Henrik Kjellanderbd0ae452016-02-10 09:53:1219#include "webrtc/api/peerconnectioninterface.h"
ossu25e4ac72017-01-23 12:56:2520#include "webrtc/pc/peerconnectionfactory.h"
21#include "webrtc/pc/rtcstatscollector.h"
22#include "webrtc/pc/rtpreceiver.h"
23#include "webrtc/pc/rtpsender.h"
24#include "webrtc/pc/statscollector.h"
25#include "webrtc/pc/streamcollection.h"
26#include "webrtc/pc/webrtcsession.h"
Henrik Kjellanderbd0ae452016-02-10 09:53:1227
28namespace webrtc {
29
30class MediaStreamObserver;
perkj3cf02c52016-03-10 17:32:0031class VideoRtpReceiver;
skvlad14ccce82016-10-07 18:53:0532class RtcEventLog;
Henrik Kjellanderbd0ae452016-02-10 09:53:1233
34// Populates |session_options| from |rtc_options|, and returns true if options
35// are valid.
deadbeef516d5362016-02-24 01:24:5236// |session_options|->transport_options map entries must exist in order for
37// them to be populated from |rtc_options|.
htadbc360d2016-03-04 10:51:3938bool ExtractMediaSessionOptions(
Henrik Kjellanderbd0ae452016-02-10 09:53:1239 const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options,
hta7436f8c2016-03-10 21:35:5540 bool is_offer,
Henrik Kjellanderbd0ae452016-02-10 09:53:1241 cricket::MediaSessionOptions* session_options);
42
43// Populates |session_options| from |constraints|, and returns true if all
44// mandatory constraints are satisfied.
deadbeef516d5362016-02-24 01:24:5245// Assumes that |session_options|->transport_options map entries exist.
htadbc360d2016-03-04 10:51:3946// Will also set defaults if corresponding constraints are not present:
47// recv_audio=true, recv_video=true, bundle_enabled=true.
48// Other fields will be left with existing values.
49//
50// Deprecated. Will be removed once callers that use constraints are gone.
51// TODO(hta): Remove when callers are gone.
52// https://bugs.chromium.org/p/webrtc/issues/detail?id=5617
Henrik Kjellanderbd0ae452016-02-10 09:53:1253bool ParseConstraintsForAnswer(const MediaConstraintsInterface* constraints,
54 cricket::MediaSessionOptions* session_options);
55
56// Parses the URLs for each server in |servers| to build |stun_servers| and
deadbeefa496afa2017-01-11 20:28:3057// |turn_servers|. Can return SYNTAX_ERROR if the URL is malformed, or
58// INVALID_PARAMETER if a TURN server is missing |username| or |password|.
59RTCErrorType ParseIceServers(
60 const PeerConnectionInterface::IceServers& servers,
61 cricket::ServerAddresses* stun_servers,
62 std::vector<cricket::RelayServerConfig>* turn_servers);
Henrik Kjellanderbd0ae452016-02-10 09:53:1263
64// PeerConnection implements the PeerConnectionInterface interface.
65// It uses WebRtcSession to implement the PeerConnection functionality.
66class PeerConnection : public PeerConnectionInterface,
67 public IceObserver,
68 public rtc::MessageHandler,
69 public sigslot::has_slots<> {
70 public:
71 explicit PeerConnection(PeerConnectionFactory* factory);
72
73 bool Initialize(
74 const PeerConnectionInterface::RTCConfiguration& configuration,
kwibergb4bfca42016-04-27 13:47:2975 std::unique_ptr<cricket::PortAllocator> allocator,
Henrik Boströmb8942012016-06-01 09:44:1876 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator,
Henrik Kjellanderbd0ae452016-02-10 09:53:1277 PeerConnectionObserver* observer);
78
79 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override;
80 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override;
81 bool AddStream(MediaStreamInterface* local_stream) override;
82 void RemoveStream(MediaStreamInterface* local_stream) override;
83
84 rtc::scoped_refptr<RtpSenderInterface> AddTrack(
85 MediaStreamTrackInterface* track,
86 std::vector<MediaStreamInterface*> streams) override;
87 bool RemoveTrack(RtpSenderInterface* sender) override;
88
89 virtual WebRtcSession* session() { return session_.get(); }
90
91 rtc::scoped_refptr<DtmfSenderInterface> CreateDtmfSender(
92 AudioTrackInterface* track) override;
93
94 rtc::scoped_refptr<RtpSenderInterface> CreateSender(
95 const std::string& kind,
96 const std::string& stream_id) override;
97
98 std::vector<rtc::scoped_refptr<RtpSenderInterface>> GetSenders()
99 const override;
100 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> GetReceivers()
101 const override;
102
103 rtc::scoped_refptr<DataChannelInterface> CreateDataChannel(
104 const std::string& label,
105 const DataChannelInit* config) override;
106 bool GetStats(StatsObserver* observer,
107 webrtc::MediaStreamTrackInterface* track,
108 StatsOutputLevel level) override;
hbos42204212016-09-16 06:33:01109 void GetStats(RTCStatsCollectorCallback* callback) override;
Henrik Kjellanderbd0ae452016-02-10 09:53:12110
111 SignalingState signaling_state() override;
112
Henrik Kjellanderbd0ae452016-02-10 09:53:12113 IceConnectionState ice_connection_state() override;
114 IceGatheringState ice_gathering_state() override;
115
116 const SessionDescriptionInterface* local_description() const override;
117 const SessionDescriptionInterface* remote_description() const override;
deadbeefc7d4f492016-12-21 01:56:17118 const SessionDescriptionInterface* current_local_description() const override;
119 const SessionDescriptionInterface* current_remote_description()
120 const override;
121 const SessionDescriptionInterface* pending_local_description() const override;
122 const SessionDescriptionInterface* pending_remote_description()
123 const override;
Henrik Kjellanderbd0ae452016-02-10 09:53:12124
125 // JSEP01
htadbc360d2016-03-04 10:51:39126 // Deprecated, use version without constraints.
Henrik Kjellanderbd0ae452016-02-10 09:53:12127 void CreateOffer(CreateSessionDescriptionObserver* observer,
128 const MediaConstraintsInterface* constraints) override;
129 void CreateOffer(CreateSessionDescriptionObserver* observer,
130 const RTCOfferAnswerOptions& options) override;
htadbc360d2016-03-04 10:51:39131 // Deprecated, use version without constraints.
Henrik Kjellanderbd0ae452016-02-10 09:53:12132 void CreateAnswer(CreateSessionDescriptionObserver* observer,
133 const MediaConstraintsInterface* constraints) override;
htadbc360d2016-03-04 10:51:39134 void CreateAnswer(CreateSessionDescriptionObserver* observer,
135 const RTCOfferAnswerOptions& options) override;
Henrik Kjellanderbd0ae452016-02-10 09:53:12136 void SetLocalDescription(SetSessionDescriptionObserver* observer,
137 SessionDescriptionInterface* desc) override;
138 void SetRemoteDescription(SetSessionDescriptionObserver* observer,
139 SessionDescriptionInterface* desc) override;
deadbeef4d0d0122016-11-17 03:42:04140 PeerConnectionInterface::RTCConfiguration GetConfiguration() override;
Henrik Kjellanderbd0ae452016-02-10 09:53:12141 bool SetConfiguration(
deadbeefa496afa2017-01-11 20:28:30142 const PeerConnectionInterface::RTCConfiguration& configuration,
143 RTCError* error) override;
144 bool SetConfiguration(
145 const PeerConnectionInterface::RTCConfiguration& configuration) override {
146 return SetConfiguration(configuration, nullptr);
147 }
Henrik Kjellanderbd0ae452016-02-10 09:53:12148 bool AddIceCandidate(const IceCandidateInterface* candidate) override;
Honghai Zhang615cf0b2016-03-14 18:59:18149 bool RemoveIceCandidates(
150 const std::vector<cricket::Candidate>& candidates) override;
Henrik Kjellanderbd0ae452016-02-10 09:53:12151
152 void RegisterUMAObserver(UMAObserver* observer) override;
153
ivoc23ea12e2016-07-04 14:06:55154 bool StartRtcEventLog(rtc::PlatformFile file,
155 int64_t max_size_bytes) override;
156 void StopRtcEventLog() override;
157
Henrik Kjellanderbd0ae452016-02-10 09:53:12158 void Close() override;
159
hbos0177daa2016-11-14 09:41:09160 sigslot::signal1<DataChannel*> SignalDataChannelCreated;
161
Henrik Kjellanderbd0ae452016-02-10 09:53:12162 // Virtual for unit tests.
163 virtual const std::vector<rtc::scoped_refptr<DataChannel>>&
164 sctp_data_channels() const {
165 return sctp_data_channels_;
perkj3c013b32016-03-24 10:16:19166 }
Henrik Kjellanderbd0ae452016-02-10 09:53:12167
168 protected:
169 ~PeerConnection() override;
170
171 private:
172 struct TrackInfo {
173 TrackInfo() : ssrc(0) {}
174 TrackInfo(const std::string& stream_label,
175 const std::string track_id,
176 uint32_t ssrc)
177 : stream_label(stream_label), track_id(track_id), ssrc(ssrc) {}
178 bool operator==(const TrackInfo& other) {
179 return this->stream_label == other.stream_label &&
180 this->track_id == other.track_id && this->ssrc == other.ssrc;
181 }
182 std::string stream_label;
183 std::string track_id;
184 uint32_t ssrc;
185 };
186 typedef std::vector<TrackInfo> TrackInfos;
187
188 // Implements MessageHandler.
189 void OnMessage(rtc::Message* msg) override;
190
191 void CreateAudioReceiver(MediaStreamInterface* stream,
perkj3c013b32016-03-24 10:16:19192 const std::string& track_id,
Henrik Kjellanderbd0ae452016-02-10 09:53:12193 uint32_t ssrc);
perkj3cf02c52016-03-10 17:32:00194
Henrik Kjellanderbd0ae452016-02-10 09:53:12195 void CreateVideoReceiver(MediaStreamInterface* stream,
perkj3cf02c52016-03-10 17:32:00196 const std::string& track_id,
Henrik Kjellanderbd0ae452016-02-10 09:53:12197 uint32_t ssrc);
perkj3c013b32016-03-24 10:16:19198 void DestroyReceiver(const std::string& track_id);
Henrik Kjellanderbd0ae452016-02-10 09:53:12199 void DestroyAudioSender(MediaStreamInterface* stream,
200 AudioTrackInterface* audio_track,
201 uint32_t ssrc);
202 void DestroyVideoSender(MediaStreamInterface* stream,
203 VideoTrackInterface* video_track);
204
205 // Implements IceObserver
206 void OnIceConnectionChange(IceConnectionState new_state) override;
207 void OnIceGatheringChange(IceGatheringState new_state) override;
208 void OnIceCandidate(const IceCandidateInterface* candidate) override;
Honghai Zhang615cf0b2016-03-14 18:59:18209 void OnIceCandidatesRemoved(
210 const std::vector<cricket::Candidate>& candidates) override;
Henrik Kjellanderbd0ae452016-02-10 09:53:12211 void OnIceConnectionReceivingChange(bool receiving) override;
212
213 // Signals from WebRtcSession.
214 void OnSessionStateChange(WebRtcSession* session, WebRtcSession::State state);
215 void ChangeSignalingState(SignalingState signaling_state);
216
217 // Signals from MediaStreamObserver.
218 void OnAudioTrackAdded(AudioTrackInterface* track,
219 MediaStreamInterface* stream);
220 void OnAudioTrackRemoved(AudioTrackInterface* track,
221 MediaStreamInterface* stream);
222 void OnVideoTrackAdded(VideoTrackInterface* track,
223 MediaStreamInterface* stream);
224 void OnVideoTrackRemoved(VideoTrackInterface* track,
225 MediaStreamInterface* stream);
226
227 rtc::Thread* signaling_thread() const {
228 return factory_->signaling_thread();
229 }
230
deadbeefe0e24f92016-05-18 23:55:30231 rtc::Thread* network_thread() const { return factory_->network_thread(); }
Taylor Brandstettera52f9db2016-05-13 15:15:11232
Henrik Kjellanderbd0ae452016-02-10 09:53:12233 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer,
234 const std::string& error);
235 void PostCreateSessionDescriptionFailure(
236 CreateSessionDescriptionObserver* observer,
237 const std::string& error);
238
239 bool IsClosed() const {
240 return signaling_state_ == PeerConnectionInterface::kClosed;
241 }
242
243 // Returns a MediaSessionOptions struct with options decided by |options|,
244 // the local MediaStreams and DataChannels.
245 virtual bool GetOptionsForOffer(
246 const PeerConnectionInterface::RTCOfferAnswerOptions& rtc_options,
247 cricket::MediaSessionOptions* session_options);
248
249 // Returns a MediaSessionOptions struct with options decided by
250 // |constraints|, the local MediaStreams and DataChannels.
htadbc360d2016-03-04 10:51:39251 // Deprecated, use version without constraints.
Henrik Kjellanderbd0ae452016-02-10 09:53:12252 virtual bool GetOptionsForAnswer(
253 const MediaConstraintsInterface* constraints,
254 cricket::MediaSessionOptions* session_options);
htadbc360d2016-03-04 10:51:39255 virtual bool GetOptionsForAnswer(
256 const RTCOfferAnswerOptions& options,
257 cricket::MediaSessionOptions* session_options);
258
Honghai Zhang774bc412016-08-31 15:18:11259 void InitializeOptionsForAnswer(
260 cricket::MediaSessionOptions* session_options);
261
htadbc360d2016-03-04 10:51:39262 // Helper function for options processing.
263 // Deprecated.
264 virtual void FinishOptionsForAnswer(
265 cricket::MediaSessionOptions* session_options);
Henrik Kjellanderbd0ae452016-02-10 09:53:12266
267 // Remove all local and remote tracks of type |media_type|.
268 // Called when a media type is rejected (m-line set to port 0).
269 void RemoveTracks(cricket::MediaType media_type);
270
271 // Makes sure a MediaStreamTrack is created for each StreamParam in |streams|,
272 // and existing MediaStreamTracks are removed if there is no corresponding
273 // StreamParam. If |default_track_needed| is true, a default MediaStreamTrack
274 // is created if it doesn't exist; if false, it's removed if it exists.
275 // |media_type| is the type of the |streams| and can be either audio or video.
276 // If a new MediaStream is created it is added to |new_streams|.
277 void UpdateRemoteStreamsList(
278 const std::vector<cricket::StreamParams>& streams,
279 bool default_track_needed,
280 cricket::MediaType media_type,
281 StreamCollection* new_streams);
282
283 // Triggered when a remote track has been seen for the first time in a remote
284 // session description. It creates a remote MediaStreamTrackInterface
285 // implementation and triggers CreateAudioReceiver or CreateVideoReceiver.
286 void OnRemoteTrackSeen(const std::string& stream_label,
287 const std::string& track_id,
288 uint32_t ssrc,
289 cricket::MediaType media_type);
290
291 // Triggered when a remote track has been removed from a remote session
292 // description. It removes the remote track with id |track_id| from a remote
293 // MediaStream and triggers DestroyAudioReceiver or DestroyVideoReceiver.
294 void OnRemoteTrackRemoved(const std::string& stream_label,
295 const std::string& track_id,
296 cricket::MediaType media_type);
297
298 // Finds remote MediaStreams without any tracks and removes them from
299 // |remote_streams_| and notifies the observer that the MediaStreams no longer
300 // exist.
301 void UpdateEndedRemoteMediaStreams();
302
Henrik Kjellanderbd0ae452016-02-10 09:53:12303 // Loops through the vector of |streams| and finds added and removed
304 // StreamParams since last time this method was called.
305 // For each new or removed StreamParam, OnLocalTrackSeen or
306 // OnLocalTrackRemoved is invoked.
307 void UpdateLocalTracks(const std::vector<cricket::StreamParams>& streams,
308 cricket::MediaType media_type);
309
310 // Triggered when a local track has been seen for the first time in a local
311 // session description.
312 // This method triggers CreateAudioSender or CreateVideoSender if the rtp
313 // streams in the local SessionDescription can be mapped to a MediaStreamTrack
314 // in a MediaStream in |local_streams_|
315 void OnLocalTrackSeen(const std::string& stream_label,
316 const std::string& track_id,
317 uint32_t ssrc,
318 cricket::MediaType media_type);
319
320 // Triggered when a local track has been removed from a local session
321 // description.
322 // This method triggers DestroyAudioSender or DestroyVideoSender if a stream
323 // has been removed from the local SessionDescription and the stream can be
324 // mapped to a MediaStreamTrack in a MediaStream in |local_streams_|.
325 void OnLocalTrackRemoved(const std::string& stream_label,
326 const std::string& track_id,
327 uint32_t ssrc,
328 cricket::MediaType media_type);
329
330 void UpdateLocalRtpDataChannels(const cricket::StreamParamsVec& streams);
331 void UpdateRemoteRtpDataChannels(const cricket::StreamParamsVec& streams);
332 void UpdateClosingRtpDataChannels(
333 const std::vector<std::string>& active_channels,
334 bool is_local_update);
335 void CreateRemoteRtpDataChannel(const std::string& label,
336 uint32_t remote_ssrc);
337
338 // Creates channel and adds it to the collection of DataChannels that will
339 // be offered in a SessionDescription.
340 rtc::scoped_refptr<DataChannel> InternalCreateDataChannel(
341 const std::string& label,
342 const InternalDataChannelInit* config);
343
344 // Checks if any data channel has been added.
345 bool HasDataChannels() const;
346
347 void AllocateSctpSids(rtc::SSLRole role);
348 void OnSctpDataChannelClosed(DataChannel* channel);
349
350 // Notifications from WebRtcSession relating to BaseChannels.
Taylor Brandstetterbc1f6bd2016-06-27 23:30:35351 void OnVoiceChannelCreated();
Henrik Kjellanderbd0ae452016-02-10 09:53:12352 void OnVoiceChannelDestroyed();
Taylor Brandstetterbc1f6bd2016-06-27 23:30:35353 void OnVideoChannelCreated();
Henrik Kjellanderbd0ae452016-02-10 09:53:12354 void OnVideoChannelDestroyed();
355 void OnDataChannelCreated();
356 void OnDataChannelDestroyed();
357 // Called when the cricket::DataChannel receives a message indicating that a
358 // webrtc::DataChannel should be opened.
359 void OnDataChannelOpenMessage(const std::string& label,
360 const InternalDataChannelInit& config);
361
deadbeef0fec2142016-06-06 21:27:39362 RtpSenderInternal* FindSenderById(const std::string& id);
Henrik Kjellanderbd0ae452016-02-10 09:53:12363
deadbeef0fec2142016-06-06 21:27:39364 std::vector<rtc::scoped_refptr<
365 RtpSenderProxyWithInternal<RtpSenderInternal>>>::iterator
Henrik Kjellanderbd0ae452016-02-10 09:53:12366 FindSenderForTrack(MediaStreamTrackInterface* track);
deadbeef0fec2142016-06-06 21:27:39367 std::vector<rtc::scoped_refptr<
368 RtpReceiverProxyWithInternal<RtpReceiverInternal>>>::iterator
perkj3c013b32016-03-24 10:16:19369 FindReceiverForTrack(const std::string& track_id);
Henrik Kjellanderbd0ae452016-02-10 09:53:12370
371 TrackInfos* GetRemoteTracks(cricket::MediaType media_type);
372 TrackInfos* GetLocalTracks(cricket::MediaType media_type);
373 const TrackInfo* FindTrackInfo(const TrackInfos& infos,
374 const std::string& stream_label,
375 const std::string track_id) const;
376
377 // Returns the specified SCTP DataChannel in sctp_data_channels_,
378 // or nullptr if not found.
379 DataChannel* FindDataChannelBySid(int sid) const;
380
Taylor Brandstettera52f9db2016-05-13 15:15:11381 // Called when first configuring the port allocator.
deadbeefe0e24f92016-05-18 23:55:30382 bool InitializePortAllocator_n(const RTCConfiguration& configuration);
deadbeefa496afa2017-01-11 20:28:30383 // Called when SetConfiguration is called to apply the supported subset
384 // of the configuration on the network thread.
385 bool ReconfigurePortAllocator_n(
386 const cricket::ServerAddresses& stun_servers,
387 const std::vector<cricket::RelayServerConfig>& turn_servers,
388 IceTransportsType type,
389 int candidate_pool_size,
390 bool prune_turn_ports);
Taylor Brandstettera52f9db2016-05-13 15:15:11391
ivoc23ea12e2016-07-04 14:06:55392 // Starts recording an Rtc EventLog using the supplied platform file.
393 // This function should only be called from the worker thread.
394 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes);
395 // Starts recording an Rtc EventLog using the supplied platform file.
396 // This function should only be called from the worker thread.
397 void StopRtcEventLog_w();
398
Henrik Kjellanderbd0ae452016-02-10 09:53:12399 // Storing the factory as a scoped reference pointer ensures that the memory
400 // in the PeerConnectionFactoryImpl remains available as long as the
401 // PeerConnection is running. It is passed to PeerConnection as a raw pointer.
402 // However, since the reference counting is done in the
403 // PeerConnectionFactoryInterface all instances created using the raw pointer
404 // will refer to the same reference count.
405 rtc::scoped_refptr<PeerConnectionFactory> factory_;
406 PeerConnectionObserver* observer_;
407 UMAObserver* uma_observer_;
408 SignalingState signaling_state_;
Henrik Kjellanderbd0ae452016-02-10 09:53:12409 IceConnectionState ice_connection_state_;
410 IceGatheringState ice_gathering_state_;
deadbeef4d0d0122016-11-17 03:42:04411 PeerConnectionInterface::RTCConfiguration configuration_;
Henrik Kjellanderbd0ae452016-02-10 09:53:12412
kwibergb4bfca42016-04-27 13:47:29413 std::unique_ptr<cricket::PortAllocator> port_allocator_;
skvlad14ccce82016-10-07 18:53:05414 // The EventLog needs to outlive the media controller.
415 std::unique_ptr<RtcEventLog> event_log_;
kwibergb4bfca42016-04-27 13:47:29416 std::unique_ptr<MediaControllerInterface> media_controller_;
Henrik Kjellanderbd0ae452016-02-10 09:53:12417
zhihuang8b8f8ff2016-05-07 01:40:30418 // One PeerConnection has only one RTCP CNAME.
419 // https://tools.ietf.org/html/draft-ietf-rtcweb-rtp-usage-26#section-4.9
420 std::string rtcp_cname_;
421
Henrik Kjellanderbd0ae452016-02-10 09:53:12422 // Streams added via AddStream.
423 rtc::scoped_refptr<StreamCollection> local_streams_;
424 // Streams created as a result of SetRemoteDescription.
425 rtc::scoped_refptr<StreamCollection> remote_streams_;
426
kwibergb4bfca42016-04-27 13:47:29427 std::vector<std::unique_ptr<MediaStreamObserver>> stream_observers_;
Henrik Kjellanderbd0ae452016-02-10 09:53:12428
429 // These lists store track info seen in local/remote descriptions.
430 TrackInfos remote_audio_tracks_;
431 TrackInfos remote_video_tracks_;
432 TrackInfos local_audio_tracks_;
433 TrackInfos local_video_tracks_;
434
435 SctpSidAllocator sid_allocator_;
436 // label -> DataChannel
437 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_;
438 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_;
439 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_;
440
441 bool remote_peer_supports_msid_ = false;
Henrik Kjellanderbd0ae452016-02-10 09:53:12442
deadbeef0fec2142016-06-06 21:27:39443 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>>
444 senders_;
445 std::vector<
446 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>>
447 receivers_;
kwibergb4bfca42016-04-27 13:47:29448 std::unique_ptr<WebRtcSession> session_;
kwibergb4bfca42016-04-27 13:47:29449 std::unique_ptr<StatsCollector> stats_;
hbos42204212016-09-16 06:33:01450 rtc::scoped_refptr<RTCStatsCollector> stats_collector_;
Henrik Kjellanderbd0ae452016-02-10 09:53:12451};
452
453} // namespace webrtc
454
ossu25e4ac72017-01-23 12:56:25455#endif // WEBRTC_PC_PEERCONNECTION_H_