| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 // label -> DataChannel | 388 // label -> DataChannel |
| 387 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; | 389 std::map<std::string, rtc::scoped_refptr<DataChannel>> rtp_data_channels_; |
| 388 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; | 390 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_; |
| 389 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; | 391 std::vector<rtc::scoped_refptr<DataChannel>> sctp_data_channels_to_free_; |
| 390 | 392 |
| 391 bool remote_peer_supports_msid_ = false; | 393 bool remote_peer_supports_msid_ = false; |
| 392 | 394 |
| 393 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; | 395 std::vector<rtc::scoped_refptr<RtpSenderInterface>> senders_; |
| 394 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; | 396 std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers_; |
| 395 | 397 |
| 396 // The session_ unique_ptr is declared at the bottom of PeerConnection | |
| 397 // because its destruction fires signals (such as VoiceChannelDestroyed) | |
| 398 // which will trigger some final actions in PeerConnection... | |
| 399 std::unique_ptr<WebRtcSession> session_; | 398 std::unique_ptr<WebRtcSession> session_; |
| 400 // ... But stats_ depends on session_ so it should be destroyed even earlier. | |
| 401 std::unique_ptr<StatsCollector> stats_; | 399 std::unique_ptr<StatsCollector> stats_; |
| 402 }; | 400 }; |
| 403 | 401 |
| 404 } // namespace webrtc | 402 } // namespace webrtc |
| 405 | 403 |
| 406 #endif // WEBRTC_API_PEERCONNECTION_H_ | 404 #endif // WEBRTC_API_PEERCONNECTION_H_ |
| OLD | NEW |