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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 PeerConnectionFactory( | 108 PeerConnectionFactory( |
109 rtc::Thread* network_thread, | 109 rtc::Thread* network_thread, |
110 rtc::Thread* worker_thread, | 110 rtc::Thread* worker_thread, |
111 rtc::Thread* signaling_thread, | 111 rtc::Thread* signaling_thread, |
112 AudioDeviceModule* default_adm, | |
113 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, | |
114 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory, | |
115 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, | 112 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, |
116 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, | 113 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, |
117 rtc::scoped_refptr<AudioMixer> audio_mixer, | |
118 std::unique_ptr<cricket::MediaEngineInterface> media_engine, | 114 std::unique_ptr<cricket::MediaEngineInterface> media_engine, |
119 std::unique_ptr<webrtc::CallFactoryInterface> call_factory, | 115 std::unique_ptr<webrtc::CallFactoryInterface> call_factory, |
120 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory); | 116 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory); |
121 virtual ~PeerConnectionFactory(); | 117 virtual ~PeerConnectionFactory(); |
122 | 118 |
123 private: | 119 private: |
124 std::unique_ptr<RtcEventLog> CreateRtcEventLog_w(); | 120 std::unique_ptr<RtcEventLog> CreateRtcEventLog_w(); |
125 std::unique_ptr<Call> CreateCall_w(RtcEventLog* event_log); | 121 std::unique_ptr<Call> CreateCall_w(RtcEventLog* event_log); |
126 | 122 |
127 bool wraps_current_thread_; | 123 bool wraps_current_thread_; |
128 rtc::Thread* network_thread_; | 124 rtc::Thread* network_thread_; |
129 rtc::Thread* worker_thread_; | 125 rtc::Thread* worker_thread_; |
130 rtc::Thread* signaling_thread_; | 126 rtc::Thread* signaling_thread_; |
131 std::unique_ptr<rtc::Thread> owned_network_thread_; | 127 std::unique_ptr<rtc::Thread> owned_network_thread_; |
132 std::unique_ptr<rtc::Thread> owned_worker_thread_; | 128 std::unique_ptr<rtc::Thread> owned_worker_thread_; |
133 Options options_; | 129 Options options_; |
134 // External Audio device used for audio playback. | |
135 rtc::scoped_refptr<AudioDeviceModule> default_adm_; | |
136 rtc::scoped_refptr<AudioEncoderFactory> audio_encoder_factory_; | |
137 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory_; | |
138 std::unique_ptr<cricket::ChannelManager> channel_manager_; | 130 std::unique_ptr<cricket::ChannelManager> channel_manager_; |
139 // External Video encoder factory. This can be NULL if the client has not | 131 // External Video encoder factory. This can be NULL if the client has not |
140 // injected any. In that case, video engine will use the internal SW encoder. | 132 // injected any. In that case, video engine will use the internal SW encoder. |
141 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_; | 133 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_; |
142 // External Video decoder factory. This can be NULL if the client has not | 134 // External Video decoder factory. This can be NULL if the client has not |
143 // injected any. In that case, video engine will use the internal SW decoder. | 135 // injected any. In that case, video engine will use the internal SW decoder. |
144 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> video_decoder_factory_; | 136 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> video_decoder_factory_; |
145 std::unique_ptr<rtc::BasicNetworkManager> default_network_manager_; | 137 std::unique_ptr<rtc::BasicNetworkManager> default_network_manager_; |
146 std::unique_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; | 138 std::unique_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; |
147 // External audio mixer. This can be NULL. In that case, internal audio mixer | |
148 // will be created and used. | |
149 rtc::scoped_refptr<AudioMixer> external_audio_mixer_; | |
150 std::unique_ptr<cricket::MediaEngineInterface> media_engine_; | 139 std::unique_ptr<cricket::MediaEngineInterface> media_engine_; |
151 std::unique_ptr<webrtc::CallFactoryInterface> call_factory_; | 140 std::unique_ptr<webrtc::CallFactoryInterface> call_factory_; |
152 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory_; | 141 std::unique_ptr<RtcEventLogFactoryInterface> event_log_factory_; |
153 }; | 142 }; |
154 | 143 |
155 } // namespace webrtc | 144 } // namespace webrtc |
156 | 145 |
157 #endif // PC_PEERCONNECTIONFACTORY_H_ | 146 #endif // PC_PEERCONNECTIONFACTORY_H_ |
OLD | NEW |