| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // PeerConnection implements the PeerConnectionInterface interface. | 57 // PeerConnection implements the PeerConnectionInterface interface. |
| 58 // It uses WebRtcSession to implement the PeerConnection functionality. | 58 // It uses WebRtcSession to implement the PeerConnection functionality. |
| 59 class PeerConnection : public PeerConnectionInterface, | 59 class PeerConnection : public PeerConnectionInterface, |
| 60 public IceObserver, | 60 public IceObserver, |
| 61 public rtc::MessageHandler, | 61 public rtc::MessageHandler, |
| 62 public sigslot::has_slots<> { | 62 public sigslot::has_slots<> { |
| 63 public: | 63 public: |
| 64 explicit PeerConnection(PeerConnectionFactory* factory); | 64 explicit PeerConnection(PeerConnectionFactory* factory); |
| 65 | 65 |
| 66 explicit PeerConnection(PeerConnectionFactory* factory, |
| 67 std::unique_ptr<RtcEventLog> event_log, |
| 68 Call* call); |
| 69 |
| 66 bool Initialize( | 70 bool Initialize( |
| 67 const PeerConnectionInterface::RTCConfiguration& configuration, | 71 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 68 std::unique_ptr<cricket::PortAllocator> allocator, | 72 std::unique_ptr<cricket::PortAllocator> allocator, |
| 69 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, | 73 std::unique_ptr<rtc::RTCCertificateGeneratorInterface> cert_generator, |
| 70 PeerConnectionObserver* observer); | 74 PeerConnectionObserver* observer); |
| 71 | 75 |
| 72 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; | 76 rtc::scoped_refptr<StreamCollectionInterface> local_streams() override; |
| 73 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; | 77 rtc::scoped_refptr<StreamCollectionInterface> remote_streams() override; |
| 74 bool AddStream(MediaStreamInterface* local_stream) override; | 78 bool AddStream(MediaStreamInterface* local_stream) override; |
| 75 void RemoveStream(MediaStreamInterface* local_stream) override; | 79 void RemoveStream(MediaStreamInterface* local_stream) override; |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 int candidate_pool_size, | 389 int candidate_pool_size, |
| 386 bool prune_turn_ports); | 390 bool prune_turn_ports); |
| 387 | 391 |
| 388 // Starts recording an Rtc EventLog using the supplied platform file. | 392 // Starts recording an Rtc EventLog using the supplied platform file. |
| 389 // This function should only be called from the worker thread. | 393 // This function should only be called from the worker thread. |
| 390 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes); | 394 bool StartRtcEventLog_w(rtc::PlatformFile file, int64_t max_size_bytes); |
| 391 // Starts recording an Rtc EventLog using the supplied platform file. | 395 // Starts recording an Rtc EventLog using the supplied platform file. |
| 392 // This function should only be called from the worker thread. | 396 // This function should only be called from the worker thread. |
| 393 void StopRtcEventLog_w(); | 397 void StopRtcEventLog_w(); |
| 394 | 398 |
| 395 // Creates the |*call_| object. Must only be called from the worker thread. | |
| 396 void CreateCall_w(); | |
| 397 | |
| 398 // Storing the factory as a scoped reference pointer ensures that the memory | 399 // Storing the factory as a scoped reference pointer ensures that the memory |
| 399 // in the PeerConnectionFactoryImpl remains available as long as the | 400 // in the PeerConnectionFactoryImpl remains available as long as the |
| 400 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. | 401 // PeerConnection is running. It is passed to PeerConnection as a raw pointer. |
| 401 // However, since the reference counting is done in the | 402 // However, since the reference counting is done in the |
| 402 // PeerConnectionFactoryInterface all instances created using the raw pointer | 403 // PeerConnectionFactoryInterface all instances created using the raw pointer |
| 403 // will refer to the same reference count. | 404 // will refer to the same reference count. |
| 404 rtc::scoped_refptr<PeerConnectionFactory> factory_; | 405 rtc::scoped_refptr<PeerConnectionFactory> factory_; |
| 405 PeerConnectionObserver* observer_; | 406 PeerConnectionObserver* observer_; |
| 406 UMAObserver* uma_observer_; | 407 UMAObserver* uma_observer_; |
| 407 | 408 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> | 449 std::vector<rtc::scoped_refptr<RtpSenderProxyWithInternal<RtpSenderInternal>>> |
| 449 senders_; | 450 senders_; |
| 450 std::vector< | 451 std::vector< |
| 451 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> | 452 rtc::scoped_refptr<RtpReceiverProxyWithInternal<RtpReceiverInternal>>> |
| 452 receivers_; | 453 receivers_; |
| 453 }; | 454 }; |
| 454 | 455 |
| 455 } // namespace webrtc | 456 } // namespace webrtc |
| 456 | 457 |
| 457 #endif // WEBRTC_PC_PEERCONNECTION_H_ | 458 #endif // WEBRTC_PC_PEERCONNECTION_H_ |
| OLD | NEW |