| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 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 |
| 11 #ifndef WEBRTC_API_PEERCONNECTIONFACTORY_H_ | 11 #ifndef WEBRTC_API_PEERCONNECTIONFACTORY_H_ |
| 12 #define WEBRTC_API_PEERCONNECTIONFACTORY_H_ | 12 #define WEBRTC_API_PEERCONNECTIONFACTORY_H_ |
| 13 | 13 |
| 14 #include <memory> |
| 14 #include <string> | 15 #include <string> |
| 15 | 16 |
| 16 #include "webrtc/api/dtlsidentitystore.h" | 17 #include "webrtc/api/dtlsidentitystore.h" |
| 17 #include "webrtc/api/mediacontroller.h" | 18 #include "webrtc/api/mediacontroller.h" |
| 18 #include "webrtc/api/mediastreaminterface.h" | 19 #include "webrtc/api/mediastreaminterface.h" |
| 19 #include "webrtc/api/peerconnectioninterface.h" | 20 #include "webrtc/api/peerconnectioninterface.h" |
| 20 #include "webrtc/base/scoped_ptr.h" | 21 #include "webrtc/base/scoped_ptr.h" |
| 21 #include "webrtc/base/scoped_ref_ptr.h" | 22 #include "webrtc/base/scoped_ref_ptr.h" |
| 22 #include "webrtc/base/thread.h" | 23 #include "webrtc/base/thread.h" |
| 23 #include "webrtc/pc/channelmanager.h" | 24 #include "webrtc/pc/channelmanager.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 35 class PeerConnectionFactory : public PeerConnectionFactoryInterface { | 36 class PeerConnectionFactory : public PeerConnectionFactoryInterface { |
| 36 public: | 37 public: |
| 37 virtual void SetOptions(const Options& options) { | 38 virtual void SetOptions(const Options& options) { |
| 38 options_ = options; | 39 options_ = options; |
| 39 } | 40 } |
| 40 | 41 |
| 41 // Deprecated, use version without constraints. | 42 // Deprecated, use version without constraints. |
| 42 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 43 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 43 const PeerConnectionInterface::RTCConfiguration& configuration, | 44 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 44 const MediaConstraintsInterface* constraints, | 45 const MediaConstraintsInterface* constraints, |
| 45 rtc::scoped_ptr<cricket::PortAllocator> allocator, | 46 std::unique_ptr<cricket::PortAllocator> allocator, |
| 46 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 47 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 47 PeerConnectionObserver* observer) override; | 48 PeerConnectionObserver* observer) override; |
| 48 | 49 |
| 49 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 50 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 50 const PeerConnectionInterface::RTCConfiguration& configuration, | 51 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 51 rtc::scoped_ptr<cricket::PortAllocator> allocator, | 52 std::unique_ptr<cricket::PortAllocator> allocator, |
| 52 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 53 std::unique_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 53 PeerConnectionObserver* observer) override; | 54 PeerConnectionObserver* observer) override; |
| 54 | 55 |
| 55 bool Initialize(); | 56 bool Initialize(); |
| 56 | 57 |
| 57 rtc::scoped_refptr<MediaStreamInterface> | 58 rtc::scoped_refptr<MediaStreamInterface> |
| 58 CreateLocalMediaStream(const std::string& label) override; | 59 CreateLocalMediaStream(const std::string& label) override; |
| 59 | 60 |
| 60 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 61 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
| 61 const cricket::AudioOptions& options) override; | 62 const cricket::AudioOptions& options) override; |
| 62 // Deprecated, use version without constraints. | 63 // Deprecated, use version without constraints. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 private: | 106 private: |
| 106 cricket::MediaEngineInterface* CreateMediaEngine_w(); | 107 cricket::MediaEngineInterface* CreateMediaEngine_w(); |
| 107 | 108 |
| 108 bool owns_ptrs_; | 109 bool owns_ptrs_; |
| 109 bool wraps_current_thread_; | 110 bool wraps_current_thread_; |
| 110 rtc::Thread* signaling_thread_; | 111 rtc::Thread* signaling_thread_; |
| 111 rtc::Thread* worker_thread_; | 112 rtc::Thread* worker_thread_; |
| 112 Options options_; | 113 Options options_; |
| 113 // External Audio device used for audio playback. | 114 // External Audio device used for audio playback. |
| 114 rtc::scoped_refptr<AudioDeviceModule> default_adm_; | 115 rtc::scoped_refptr<AudioDeviceModule> default_adm_; |
| 115 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; | 116 std::unique_ptr<cricket::ChannelManager> channel_manager_; |
| 116 // External Video encoder factory. This can be NULL if the client has not | 117 // External Video encoder factory. This can be NULL if the client has not |
| 117 // injected any. In that case, video engine will use the internal SW encoder. | 118 // injected any. In that case, video engine will use the internal SW encoder. |
| 118 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> | 119 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_; |
| 119 video_encoder_factory_; | |
| 120 // External Video decoder factory. This can be NULL if the client has not | 120 // External Video decoder factory. This can be NULL if the client has not |
| 121 // injected any. In that case, video engine will use the internal SW decoder. | 121 // injected any. In that case, video engine will use the internal SW decoder. |
| 122 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> | 122 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> video_decoder_factory_; |
| 123 video_decoder_factory_; | 123 std::unique_ptr<rtc::BasicNetworkManager> default_network_manager_; |
| 124 rtc::scoped_ptr<rtc::BasicNetworkManager> default_network_manager_; | 124 std::unique_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; |
| 125 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; | |
| 126 | 125 |
| 127 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; | 126 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; |
| 128 }; | 127 }; |
| 129 | 128 |
| 130 } // namespace webrtc | 129 } // namespace webrtc |
| 131 | 130 |
| 132 #endif // WEBRTC_API_PEERCONNECTIONFACTORY_H_ | 131 #endif // WEBRTC_API_PEERCONNECTIONFACTORY_H_ |
| OLD | NEW |