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 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 virtual cricket::TransportController* CreateTransportController( | 98 virtual cricket::TransportController* CreateTransportController( |
99 cricket::PortAllocator* port_allocator, | 99 cricket::PortAllocator* port_allocator, |
100 bool redetermine_role_on_ice_restart); | 100 bool redetermine_role_on_ice_restart); |
101 virtual cricket::ChannelManager* channel_manager(); | 101 virtual cricket::ChannelManager* channel_manager(); |
102 virtual rtc::Thread* signaling_thread(); | 102 virtual rtc::Thread* signaling_thread(); |
103 virtual rtc::Thread* worker_thread(); | 103 virtual rtc::Thread* worker_thread(); |
104 virtual rtc::Thread* network_thread(); | 104 virtual rtc::Thread* network_thread(); |
105 const Options& options() const { return options_; } | 105 const Options& options() const { return options_; } |
106 | 106 |
107 protected: | 107 protected: |
108 // Deprecated. Use the method with media_engine, call_factory_, and | |
109 // event_log_factory instead. | |
Taylor Brandstetter
2017/06/14 01:54:16
Same as other comment: is there anything preventin
Zhi Huang
2017/06/14 06:57:01
If no other applications call this method directly
| |
108 PeerConnectionFactory( | 110 PeerConnectionFactory( |
109 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, | 111 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, |
110 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory); | 112 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory); |
113 | |
114 // Deprecated. Use the method with media_engine, call_factory_, and | |
115 // event_log_factory instead. | |
111 PeerConnectionFactory( | 116 PeerConnectionFactory( |
112 rtc::Thread* network_thread, | 117 rtc::Thread* network_thread, |
113 rtc::Thread* worker_thread, | 118 rtc::Thread* worker_thread, |
114 rtc::Thread* signaling_thread, | 119 rtc::Thread* signaling_thread, |
115 AudioDeviceModule* default_adm, | 120 AudioDeviceModule* default_adm, |
116 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, | 121 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, |
117 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory, | 122 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory, |
118 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, | 123 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, |
119 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, | 124 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, |
120 rtc::scoped_refptr<AudioMixer> audio_mixer); | 125 rtc::scoped_refptr<AudioMixer> audio_mixer); |
126 | |
127 PeerConnectionFactory( | |
128 rtc::Thread* network_thread, | |
129 rtc::Thread* worker_thread, | |
130 rtc::Thread* signaling_thread, | |
131 AudioDeviceModule* default_adm, | |
132 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, | |
133 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory, | |
134 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, | |
135 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, | |
136 rtc::scoped_refptr<AudioMixer> audio_mixer, | |
137 std::unique_ptr<cricket::MediaEngineInterface> media_engine, | |
138 std::unique_ptr<webrtc::CallFactoryInterface> call_factory, | |
139 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory); | |
121 virtual ~PeerConnectionFactory(); | 140 virtual ~PeerConnectionFactory(); |
122 | 141 |
123 private: | 142 private: |
124 std::unique_ptr<cricket::MediaEngineInterface> CreateMediaEngine_w(); | 143 std::unique_ptr<Call> CreateCall_w(RtcEventLog* event_log); |
125 | 144 |
126 bool owns_ptrs_; | 145 bool owns_ptrs_; |
127 bool wraps_current_thread_; | 146 bool wraps_current_thread_; |
128 rtc::Thread* network_thread_; | 147 rtc::Thread* network_thread_; |
129 rtc::Thread* worker_thread_; | 148 rtc::Thread* worker_thread_; |
130 rtc::Thread* signaling_thread_; | 149 rtc::Thread* signaling_thread_; |
131 Options options_; | 150 Options options_; |
132 // External Audio device used for audio playback. | 151 // External Audio device used for audio playback. |
133 rtc::scoped_refptr<AudioDeviceModule> default_adm_; | 152 rtc::scoped_refptr<AudioDeviceModule> default_adm_; |
134 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory_; | 153 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory_; |
135 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory_; | 154 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory_; |
136 std::unique_ptr<cricket::ChannelManager> channel_manager_; | 155 std::unique_ptr<cricket::ChannelManager> channel_manager_; |
137 // External Video encoder factory. This can be NULL if the client has not | 156 // External Video encoder factory. This can be NULL if the client has not |
138 // injected any. In that case, video engine will use the internal SW encoder. | 157 // injected any. In that case, video engine will use the internal SW encoder. |
139 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_; | 158 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_; |
140 // External Video decoder factory. This can be NULL if the client has not | 159 // External Video decoder factory. This can be NULL if the client has not |
141 // injected any. In that case, video engine will use the internal SW decoder. | 160 // injected any. In that case, video engine will use the internal SW decoder. |
142 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> video_decoder_factory_; | 161 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> video_decoder_factory_; |
143 std::unique_ptr<rtc::BasicNetworkManager> default_network_manager_; | 162 std::unique_ptr<rtc::BasicNetworkManager> default_network_manager_; |
144 std::unique_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; | 163 std::unique_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; |
145 // External audio mixer. This can be NULL. In that case, internal audio mixer | 164 // External audio mixer. This can be NULL. In that case, internal audio mixer |
146 // will be created and used. | 165 // will be created and used. |
147 rtc::scoped_refptr<AudioMixer> external_audio_mixer_; | 166 rtc::scoped_refptr<AudioMixer> external_audio_mixer_; |
167 std::unique_ptr<cricket::MediaEngineInterface> media_engine_; | |
168 std::unique_ptr<webrtc::CallFactoryInterface> call_factory_; | |
169 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory_; | |
148 }; | 170 }; |
149 | 171 |
150 } // namespace webrtc | 172 } // namespace webrtc |
151 | 173 |
152 #endif // WEBRTC_PC_PEERCONNECTIONFACTORY_H_ | 174 #endif // WEBRTC_PC_PEERCONNECTIONFACTORY_H_ |
OLD | NEW |