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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 #include "talk/app/webrtc/dtlsidentitystore.h" | 33 #include "talk/app/webrtc/dtlsidentitystore.h" |
34 #include "talk/app/webrtc/mediacontroller.h" | 34 #include "talk/app/webrtc/mediacontroller.h" |
35 #include "talk/app/webrtc/mediastreaminterface.h" | 35 #include "talk/app/webrtc/mediastreaminterface.h" |
36 #include "talk/app/webrtc/peerconnectioninterface.h" | 36 #include "talk/app/webrtc/peerconnectioninterface.h" |
37 #include "talk/session/media/channelmanager.h" | 37 #include "talk/session/media/channelmanager.h" |
38 #include "webrtc/base/scoped_ptr.h" | 38 #include "webrtc/base/scoped_ptr.h" |
39 #include "webrtc/base/scoped_ref_ptr.h" | 39 #include "webrtc/base/scoped_ref_ptr.h" |
40 #include "webrtc/base/thread.h" | 40 #include "webrtc/base/thread.h" |
41 | 41 |
| 42 namespace rtc { |
| 43 class BasicNetworkManager; |
| 44 class BasicPacketSocketFactory; |
| 45 } |
| 46 |
42 namespace webrtc { | 47 namespace webrtc { |
43 | 48 |
44 typedef rtc::RefCountedObject<DtlsIdentityStoreImpl> | 49 typedef rtc::RefCountedObject<DtlsIdentityStoreImpl> |
45 RefCountedDtlsIdentityStore; | 50 RefCountedDtlsIdentityStore; |
46 | 51 |
47 class PeerConnectionFactory : public PeerConnectionFactoryInterface { | 52 class PeerConnectionFactory : public PeerConnectionFactoryInterface { |
48 public: | 53 public: |
49 virtual void SetOptions(const Options& options) { | 54 virtual void SetOptions(const Options& options) { |
50 options_ = options; | 55 options_ = options; |
51 } | 56 } |
52 | 57 |
53 // webrtc::PeerConnectionFactoryInterface override; | 58 // webrtc::PeerConnectionFactoryInterface override; |
| 59 // TODO(deadbeef): Get rid of this overload once clients are moved to the |
| 60 // new version. |
54 rtc::scoped_refptr<PeerConnectionInterface> | 61 rtc::scoped_refptr<PeerConnectionInterface> |
55 CreatePeerConnection( | 62 CreatePeerConnection( |
56 const PeerConnectionInterface::RTCConfiguration& configuration, | 63 const PeerConnectionInterface::RTCConfiguration& configuration, |
57 const MediaConstraintsInterface* constraints, | 64 const MediaConstraintsInterface* constraints, |
58 PortAllocatorFactoryInterface* allocator_factory, | 65 PortAllocatorFactoryInterface* allocator_factory, |
59 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 66 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
60 PeerConnectionObserver* observer) override; | 67 PeerConnectionObserver* observer) override; |
61 | 68 |
| 69 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
| 70 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 71 const MediaConstraintsInterface* constraints, |
| 72 rtc::scoped_ptr<cricket::PortAllocator> allocator, |
| 73 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 74 PeerConnectionObserver* observer) override; |
| 75 |
62 bool Initialize(); | 76 bool Initialize(); |
63 | 77 |
64 rtc::scoped_refptr<MediaStreamInterface> | 78 rtc::scoped_refptr<MediaStreamInterface> |
65 CreateLocalMediaStream(const std::string& label) override; | 79 CreateLocalMediaStream(const std::string& label) override; |
66 | 80 |
67 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 81 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
68 const MediaConstraintsInterface* constraints) override; | 82 const MediaConstraintsInterface* constraints) override; |
69 | 83 |
70 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( | 84 rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( |
71 cricket::VideoCapturer* capturer, | 85 cricket::VideoCapturer* capturer, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 rtc::scoped_refptr<AudioDeviceModule> default_adm_; | 126 rtc::scoped_refptr<AudioDeviceModule> default_adm_; |
113 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; | 127 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; |
114 // External Video encoder factory. This can be NULL if the client has not | 128 // External Video encoder factory. This can be NULL if the client has not |
115 // injected any. In that case, video engine will use the internal SW encoder. | 129 // injected any. In that case, video engine will use the internal SW encoder. |
116 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> | 130 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> |
117 video_encoder_factory_; | 131 video_encoder_factory_; |
118 // External Video decoder factory. This can be NULL if the client has not | 132 // External Video decoder factory. This can be NULL if the client has not |
119 // injected any. In that case, video engine will use the internal SW decoder. | 133 // injected any. In that case, video engine will use the internal SW decoder. |
120 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> | 134 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> |
121 video_decoder_factory_; | 135 video_decoder_factory_; |
| 136 rtc::scoped_ptr<rtc::BasicNetworkManager> default_network_manager_; |
| 137 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; |
122 | 138 |
123 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; | 139 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; |
124 }; | 140 }; |
125 | 141 |
126 } // namespace webrtc | 142 } // namespace webrtc |
127 | 143 |
128 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ | 144 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ |
OLD | NEW |