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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // PeerConnection implements the PeerConnectionInterface interface. | 61 // PeerConnection implements the PeerConnectionInterface interface. |
62 // It uses WebRtcSession to implement the PeerConnection functionality. | 62 // It uses WebRtcSession to implement the PeerConnection functionality. |
63 class PeerConnection : public PeerConnectionInterface, | 63 class PeerConnection : public PeerConnectionInterface, |
64 public IceObserver, | 64 public IceObserver, |
65 public rtc::MessageHandler, | 65 public rtc::MessageHandler, |
66 public sigslot::has_slots<> { | 66 public sigslot::has_slots<> { |
67 public: | 67 public: |
68 explicit PeerConnection(PeerConnectionFactory* factory); | 68 explicit PeerConnection(PeerConnectionFactory* factory); |
69 | 69 |
70 bool Initialize( | 70 bool Initialize( |
71 const cricket::MediaConfig& media_config, | |
72 const PeerConnectionInterface::RTCConfiguration& configuration, | 71 const PeerConnectionInterface::RTCConfiguration& configuration, |
73 rtc::scoped_ptr<cricket::PortAllocator> allocator, | 72 rtc::scoped_ptr<cricket::PortAllocator> allocator, |
74 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 73 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
75 PeerConnectionObserver* observer); | 74 PeerConnectionObserver* observer); |
76 | 75 |
77 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; | 76 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; |
78 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; | 77 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; |
79 bool AddStream(MediaStreamInterface* local_stream) override; | 78 bool AddStream(MediaStreamInterface* local_stream) override; |
80 void RemoveStream(MediaStreamInterface* local_stream) override; | 79 void RemoveStream(MediaStreamInterface* local_stream) override; |
81 | 80 |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 // because its destruction fires signals (such as VoiceChannelDestroyed) | 396 // because its destruction fires signals (such as VoiceChannelDestroyed) |
398 // which will trigger some final actions in PeerConnection... | 397 // which will trigger some final actions in PeerConnection... |
399 rtc::scoped_ptr<WebRtcSession> session_; | 398 rtc::scoped_ptr<WebRtcSession> session_; |
400 // ... But stats_ depends on session_ so it should be destroyed even earlier. | 399 // ... But stats_ depends on session_ so it should be destroyed even earlier. |
401 rtc::scoped_ptr<StatsCollector> stats_; | 400 rtc::scoped_ptr<StatsCollector> stats_; |
402 }; | 401 }; |
403 | 402 |
404 } // namespace webrtc | 403 } // namespace webrtc |
405 | 404 |
406 #endif // WEBRTC_API_PEERCONNECTION_H_ | 405 #endif // WEBRTC_API_PEERCONNECTION_H_ |
OLD | NEW |