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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 typedef rtc::RefCountedObject<DtlsIdentityStoreImpl> | 49 typedef rtc::RefCountedObject<DtlsIdentityStoreImpl> |
50 RefCountedDtlsIdentityStore; | 50 RefCountedDtlsIdentityStore; |
51 | 51 |
52 class PeerConnectionFactory : public PeerConnectionFactoryInterface { | 52 class PeerConnectionFactory : public PeerConnectionFactoryInterface { |
53 public: | 53 public: |
54 virtual void SetOptions(const Options& options) { | 54 virtual void SetOptions(const Options& options) { |
55 options_ = options; | 55 options_ = options; |
56 } | 56 } |
57 | 57 |
58 // webrtc::PeerConnectionFactoryInterface override; | |
59 // TODO(deadbeef): Get rid of this overload once clients are moved to the | |
60 // new version. | |
61 rtc::scoped_refptr<PeerConnectionInterface> | |
62 CreatePeerConnection( | |
63 const PeerConnectionInterface::RTCConfiguration& configuration, | |
64 const MediaConstraintsInterface* constraints, | |
65 PortAllocatorFactoryInterface* allocator_factory, | |
66 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | |
67 PeerConnectionObserver* observer) override; | |
68 | |
69 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 58 rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
70 const PeerConnectionInterface::RTCConfiguration& configuration, | 59 const PeerConnectionInterface::RTCConfiguration& configuration, |
71 const MediaConstraintsInterface* constraints, | 60 const MediaConstraintsInterface* constraints, |
72 rtc::scoped_ptr<cricket::PortAllocator> allocator, | 61 rtc::scoped_ptr<cricket::PortAllocator> allocator, |
73 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 62 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
74 PeerConnectionObserver* observer) override; | 63 PeerConnectionObserver* observer) override; |
75 | 64 |
76 bool Initialize(); | 65 bool Initialize(); |
77 | 66 |
78 rtc::scoped_refptr<MediaStreamInterface> | 67 rtc::scoped_refptr<MediaStreamInterface> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 virtual ~PeerConnectionFactory(); | 103 virtual ~PeerConnectionFactory(); |
115 | 104 |
116 private: | 105 private: |
117 cricket::MediaEngineInterface* CreateMediaEngine_w(); | 106 cricket::MediaEngineInterface* CreateMediaEngine_w(); |
118 | 107 |
119 bool owns_ptrs_; | 108 bool owns_ptrs_; |
120 bool wraps_current_thread_; | 109 bool wraps_current_thread_; |
121 rtc::Thread* signaling_thread_; | 110 rtc::Thread* signaling_thread_; |
122 rtc::Thread* worker_thread_; | 111 rtc::Thread* worker_thread_; |
123 Options options_; | 112 Options options_; |
124 rtc::scoped_refptr<PortAllocatorFactoryInterface> default_allocator_factory_; | |
125 // External Audio device used for audio playback. | 113 // External Audio device used for audio playback. |
126 rtc::scoped_refptr<AudioDeviceModule> default_adm_; | 114 rtc::scoped_refptr<AudioDeviceModule> default_adm_; |
127 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; | 115 rtc::scoped_ptr<cricket::ChannelManager> channel_manager_; |
128 // External Video encoder factory. This can be NULL if the client has not | 116 // External Video encoder factory. This can be NULL if the client has not |
129 // injected any. In that case, video engine will use the internal SW encoder. | 117 // injected any. In that case, video engine will use the internal SW encoder. |
130 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> | 118 rtc::scoped_ptr<cricket::WebRtcVideoEncoderFactory> |
131 video_encoder_factory_; | 119 video_encoder_factory_; |
132 // 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 |
133 // 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. |
134 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> | 122 rtc::scoped_ptr<cricket::WebRtcVideoDecoderFactory> |
135 video_decoder_factory_; | 123 video_decoder_factory_; |
136 rtc::scoped_ptr<rtc::BasicNetworkManager> default_network_manager_; | 124 rtc::scoped_ptr<rtc::BasicNetworkManager> default_network_manager_; |
137 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; | 125 rtc::scoped_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; |
138 | 126 |
139 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; | 127 rtc::scoped_refptr<RefCountedDtlsIdentityStore> dtls_identity_store_; |
140 }; | 128 }; |
141 | 129 |
142 } // namespace webrtc | 130 } // namespace webrtc |
143 | 131 |
144 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ | 132 #endif // TALK_APP_WEBRTC_PEERCONNECTIONFACTORY_H_ |
OLD | NEW |