| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ | 28 #ifndef TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ |
| 29 #define TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ | 29 #define TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ |
| 30 | 30 |
| 31 #include <string> | 31 #include <string> |
| 32 | 32 |
| 33 #include "talk/app/webrtc/dtlsidentitystore.h" |
| 33 #include "talk/app/webrtc/mediastreaminterface.h" | 34 #include "talk/app/webrtc/mediastreaminterface.h" |
| 34 #include "talk/app/webrtc/peerconnectioninterface.h" | 35 #include "talk/app/webrtc/peerconnectioninterface.h" |
| 35 #include "talk/session/media/channelmanager.h" | 36 #include "talk/session/media/channelmanager.h" |
| 36 #include "webrtc/base/scoped_ptr.h" | 37 #include "webrtc/base/scoped_ptr.h" |
| 38 #include "webrtc/base/scoped_ref_ptr.h" |
| 37 #include "webrtc/base/thread.h" | 39 #include "webrtc/base/thread.h" |
| 38 | 40 |
| 39 namespace webrtc { | 41 namespace webrtc { |
| 40 | 42 |
| 41 class DtlsIdentityStore; | 43 typedef rtc::RefCountedObject<DtlsIdentityStoreImpl> |
| 44 RefCountedDtlsIdentityStore; |
| 42 | 45 |
| 43 class PeerConnectionFactory : public PeerConnectionFactoryInterface { | 46 class PeerConnectionFactory : public PeerConnectionFactoryInterface { |
| 44 public: | 47 public: |
| 45 virtual void SetOptions(const Options& options) { | 48 virtual void SetOptions(const Options& options) { |
| 46 options_ = options; | 49 options_ = options; |
| 47 } | 50 } |
| 48 | 51 |
| 49 virtual rtc::scoped_refptr<PeerConnectionInterface> | 52 // webrtc::PeerConnectionFactoryInterface override; |
| 53 rtc::scoped_refptr<PeerConnectionInterface> |
| 50 CreatePeerConnection( | 54 CreatePeerConnection( |
| 51 const PeerConnectionInterface::RTCConfiguration& configuration, | 55 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 52 const MediaConstraintsInterface* constraints, | 56 const MediaConstraintsInterface* constraints, |
| 53 PortAllocatorFactoryInterface* allocator_factory, | 57 PortAllocatorFactoryInterface* allocator_factory, |
| 54 DTLSIdentityServiceInterface* dtls_identity_service, | 58 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 55 PeerConnectionObserver* observer); | 59 PeerConnectionObserver* observer) override; |
| 56 | 60 |
| 57 bool Initialize(); | 61 bool Initialize(); |
| 58 | 62 |
| 59 rtc::scoped_refptr<MediaStreamInterface> | 63 rtc::scoped_refptr<MediaStreamInterface> |
| 60 CreateLocalMediaStream(const std::string& label) override; | 64 CreateLocalMediaStream(const std::string& label) override; |
| 61 | 65 |
| 62 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 66 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
| 63 const MediaConstraintsInterface* constraints) override; | 67 const MediaConstraintsInterface* constraints) override; |
| 64 | 68 |
| 65 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( | 69 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; | 109 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; |
| 106 // External Video encoder factory. This can be NULL if the client has not | 110 // External Video encoder factory. This can be NULL if the client has not |
| 107 // injected any. In that case, video engine will use the internal SW encoder. | 111 // injected any. In that case, video engine will use the internal SW encoder. |
| 108 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> | 112 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> |
| 109 video_encoder_factory_; | 113 video_encoder_factory_; |
| 110 // External Video decoder factory. This can be NULL if the client has not | 114 // External Video decoder factory. This can be NULL if the client has not |
| 111 // injected any. In that case, video engine will use the internal SW decoder. | 115 // injected any. In that case, video engine will use the internal SW decoder. |
| 112 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> | 116 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> |
| 113 video_decoder_factory_; | 117 video_decoder_factory_; |
| 114 | 118 |
| 115 rtc::scoped_ptr<webrtc::DtlsIdentityStore> dtls_identity_store_; | 119 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; |
| 116 }; | 120 }; |
| 117 | 121 |
| 118 } // namespace webrtc | 122 } // namespace webrtc |
| 119 | 123 |
| 120 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ | 124 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ |
| OLD | NEW |