Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: webrtc/api/peerconnection.h

Issue 1956453003: Relanding: Implement RTCConfiguration.iceCandidatePoolSize. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing uninitialized variable (noticed by msan) Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // Deprecated, use version without constraints. 124 // Deprecated, use version without constraints.
125 void CreateAnswer(CreateSessionDescriptionObserver* observer, 125 void CreateAnswer(CreateSessionDescriptionObserver* observer,
126 const MediaConstraintsInterface* constraints) override; 126 const MediaConstraintsInterface* constraints) override;
127 void CreateAnswer(CreateSessionDescriptionObserver* observer, 127 void CreateAnswer(CreateSessionDescriptionObserver* observer,
128 const RTCOfferAnswerOptions& options) override; 128 const RTCOfferAnswerOptions& options) override;
129 void SetLocalDescription(SetSessionDescriptionObserver* observer, 129 void SetLocalDescription(SetSessionDescriptionObserver* observer,
130 SessionDescriptionInterface* desc) override; 130 SessionDescriptionInterface* desc) override;
131 void SetRemoteDescription(SetSessionDescriptionObserver* observer, 131 void SetRemoteDescription(SetSessionDescriptionObserver* observer,
132 SessionDescriptionInterface* desc) override; 132 SessionDescriptionInterface* desc) override;
133 bool SetConfiguration( 133 bool SetConfiguration(
134 const PeerConnectionInterface::RTCConfiguration& config) override; 134 const PeerConnectionInterface::RTCConfiguration& configuration) override;
135 bool AddIceCandidate(const IceCandidateInterface* candidate) override; 135 bool AddIceCandidate(const IceCandidateInterface* candidate) override;
136 bool RemoveIceCandidates( 136 bool RemoveIceCandidates(
137 const std::vector<cricket::Candidate>& candidates) override; 137 const std::vector<cricket::Candidate>& candidates) override;
138 138
139 void RegisterUMAObserver(UMAObserver* observer) override; 139 void RegisterUMAObserver(UMAObserver* observer) override;
140 140
141 void Close() override; 141 void Close() override;
142 142
143 // Virtual for unit tests. 143 // Virtual for unit tests.
144 virtual const std::vector<rtc::scoped_refptr<DataChannel>>& 144 virtual const std::vector<rtc::scoped_refptr<DataChannel>>&
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 MediaStreamInterface* stream); 203 MediaStreamInterface* stream);
204 void OnVideoTrackAdded(VideoTrackInterface* track, 204 void OnVideoTrackAdded(VideoTrackInterface* track,
205 MediaStreamInterface* stream); 205 MediaStreamInterface* stream);
206 void OnVideoTrackRemoved(VideoTrackInterface* track, 206 void OnVideoTrackRemoved(VideoTrackInterface* track,
207 MediaStreamInterface* stream); 207 MediaStreamInterface* stream);
208 208
209 rtc::Thread* signaling_thread() const { 209 rtc::Thread* signaling_thread() const {
210 return factory_->signaling_thread(); 210 return factory_->signaling_thread();
211 } 211 }
212 212
213 rtc::Thread* worker_thread() const { return factory_->worker_thread(); }
214
213 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer, 215 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer,
214 const std::string& error); 216 const std::string& error);
215 void PostCreateSessionDescriptionFailure( 217 void PostCreateSessionDescriptionFailure(
216 CreateSessionDescriptionObserver* observer, 218 CreateSessionDescriptionObserver* observer,
217 const std::string& error); 219 const std::string& error);
218 220
219 bool IsClosed() const { 221 bool IsClosed() const {
220 return signaling_state_ == PeerConnectionInterface::kClosed; 222 return signaling_state_ == PeerConnectionInterface::kClosed;
221 } 223 }
222 224
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 TrackInfos* GetRemoteTracks(cricket::MediaType media_type); 346 TrackInfos* GetRemoteTracks(cricket::MediaType media_type);
345 TrackInfos* GetLocalTracks(cricket::MediaType media_type); 347 TrackInfos* GetLocalTracks(cricket::MediaType media_type);
346 const TrackInfo* FindTrackInfo(const TrackInfos& infos, 348 const TrackInfo* FindTrackInfo(const TrackInfos& infos,
347 const std::string& stream_label, 349 const std::string& stream_label,
348 const std::string track_id) const; 350 const std::string track_id) const;
349 351
350 // Returns the specified SCTP DataChannel in sctp_data_channels_, 352 // Returns the specified SCTP DataChannel in sctp_data_channels_,
351 // or nullptr if not found. 353 // or nullptr if not found.
352 DataChannel* FindDataChannelBySid(int sid) const; 354 DataChannel* FindDataChannelBySid(int sid) const;
353 355
356 // Called when first configuring the port allocator.
357 bool InitializePortAllocator_w(const RTCConfiguration& configuration);
358 // Called when SetConfiguration is called. Only a subset of the configuration
359 // is applied.
360 bool ReconfigurePortAllocator_w(const RTCConfiguration& configuration);
361
354 // Storing the factory as a scoped reference pointer ensures that the memory 362 // Storing the factory as a scoped reference pointer ensures that the memory
355 // in the PeerConnectionFactoryImpl remains available as long as the 363 // in the PeerConnectionFactoryImpl remains available as long as the
356 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. 364 // PeerConnection is running. It is passed to PeerConnection as a raw pointer.
357 // However, since the reference counting is done in the 365 // However, since the reference counting is done in the
358 // PeerConnectionFactoryInterface all instances created using the raw pointer 366 // PeerConnectionFactoryInterface all instances created using the raw pointer
359 // will refer to the same reference count. 367 // will refer to the same reference count.
360 rtc::scoped_refptr<PeerConnectionFactory> factory_; 368 rtc::scoped_refptr<PeerConnectionFactory> factory_;
361 PeerConnectionObserver* observer_; 369 PeerConnectionObserver* observer_;
362 UMAObserver* uma_observer_; 370 UMAObserver* uma_observer_;
363 SignalingState signaling_state_; 371 SignalingState signaling_state_;
(...skipping 26 matching lines...) Expand all
390 // label -> DataChannel 398 // label -> DataChannel
391 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; 399 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_;
392 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; 400 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_;
393 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; 401 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_;
394 402
395 bool remote_peer_supports_msid_ = false; 403 bool remote_peer_supports_msid_ = false;
396 404
397 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; 405 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_;
398 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; 406 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_;
399 407
400 // The session_ unique_ptr is declared at the bottom of PeerConnection
401 // because its destruction fires signals (such as VoiceChannelDestroyed)
402 // which will trigger some final actions in PeerConnection...
403 std::unique_ptr<WebRtcSession> session_; 408 std::unique_ptr<WebRtcSession> session_;
404 // ... But stats_ depends on session_ so it should be destroyed even earlier.
405 std::unique_ptr<StatsCollector> stats_; 409 std::unique_ptr<StatsCollector> stats_;
406 }; 410 };
407 411
408 } // namespace webrtc 412 } // namespace webrtc
409 413
410 #endif // WEBRTC_API_PEERCONNECTION_H_ 414 #endif // WEBRTC_API_PEERCONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698