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

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

Issue 1987093002: Only use PortAllocator on the network thread. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 MediaStreamInterface* stream); 202 MediaStreamInterface* stream);
203 void OnVideoTrackAdded(VideoTrackInterface* track, 203 void OnVideoTrackAdded(VideoTrackInterface* track,
204 MediaStreamInterface* stream); 204 MediaStreamInterface* stream);
205 void OnVideoTrackRemoved(VideoTrackInterface* track, 205 void OnVideoTrackRemoved(VideoTrackInterface* track,
206 MediaStreamInterface* stream); 206 MediaStreamInterface* stream);
207 207
208 rtc::Thread* signaling_thread() const { 208 rtc::Thread* signaling_thread() const {
209 return factory_->signaling_thread(); 209 return factory_->signaling_thread();
210 } 210 }
211 211
212 rtc::Thread* worker_thread() const { return factory_->worker_thread(); } 212 rtc::Thread* network_thread() const { return factory_->network_thread(); }
213 213
214 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer, 214 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer,
215 const std::string& error); 215 const std::string& error);
216 void PostCreateSessionDescriptionFailure( 216 void PostCreateSessionDescriptionFailure(
217 CreateSessionDescriptionObserver* observer, 217 CreateSessionDescriptionObserver* observer,
218 const std::string& error); 218 const std::string& error);
219 219
220 bool IsClosed() const { 220 bool IsClosed() const {
221 return signaling_state_ == PeerConnectionInterface::kClosed; 221 return signaling_state_ == PeerConnectionInterface::kClosed;
222 } 222 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 TrackInfos* GetLocalTracks(cricket::MediaType media_type); 346 TrackInfos* GetLocalTracks(cricket::MediaType media_type);
347 const TrackInfo* FindTrackInfo(const TrackInfos& infos, 347 const TrackInfo* FindTrackInfo(const TrackInfos& infos,
348 const std::string& stream_label, 348 const std::string& stream_label,
349 const std::string track_id) const; 349 const std::string track_id) const;
350 350
351 // Returns the specified SCTP DataChannel in sctp_data_channels_, 351 // Returns the specified SCTP DataChannel in sctp_data_channels_,
352 // or nullptr if not found. 352 // or nullptr if not found.
353 DataChannel* FindDataChannelBySid(int sid) const; 353 DataChannel* FindDataChannelBySid(int sid) const;
354 354
355 // Called when first configuring the port allocator. 355 // Called when first configuring the port allocator.
356 bool InitializePortAllocator_w(const RTCConfiguration& configuration); 356 bool InitializePortAllocator_n(const RTCConfiguration& configuration);
357 // Called when SetConfiguration is called. Only a subset of the configuration 357 // Called when SetConfiguration is called. Only a subset of the configuration
358 // is applied. 358 // is applied.
359 bool ReconfigurePortAllocator_w(const RTCConfiguration& configuration); 359 bool ReconfigurePortAllocator_n(const RTCConfiguration& configuration);
360 360
361 // Storing the factory as a scoped reference pointer ensures that the memory 361 // Storing the factory as a scoped reference pointer ensures that the memory
362 // in the PeerConnectionFactoryImpl remains available as long as the 362 // in the PeerConnectionFactoryImpl remains available as long as the
363 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. 363 // PeerConnection is running. It is passed to PeerConnection as a raw pointer.
364 // However, since the reference counting is done in the 364 // However, since the reference counting is done in the
365 // PeerConnectionFactoryInterface all instances created using the raw pointer 365 // PeerConnectionFactoryInterface all instances created using the raw pointer
366 // will refer to the same reference count. 366 // will refer to the same reference count.
367 rtc::scoped_refptr<PeerConnectionFactory> factory_; 367 rtc::scoped_refptr<PeerConnectionFactory> factory_;
368 PeerConnectionObserver* observer_; 368 PeerConnectionObserver* observer_;
369 UMAObserver* uma_observer_; 369 UMAObserver* uma_observer_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; 404 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_;
405 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; 405 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_;
406 406
407 std::unique_ptr<WebRtcSession> session_; 407 std::unique_ptr<WebRtcSession> session_;
408 std::unique_ptr<StatsCollector> stats_; 408 std::unique_ptr<StatsCollector> stats_;
409 }; 409 };
410 410
411 } // namespace webrtc 411 } // namespace webrtc
412 412
413 #endif // WEBRTC_API_PEERCONNECTION_H_ 413 #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