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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 rtc::scoped_refptr<MediaStreamInterface> | 54 rtc::scoped_refptr<MediaStreamInterface> |
55 CreateLocalMediaStream(const std::string& label) override; | 55 CreateLocalMediaStream(const std::string& label) override; |
56 | 56 |
57 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 57 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
58 const cricket::AudioOptions& options) override; | 58 const cricket::AudioOptions& options) override; |
59 // Deprecated, use version without constraints. | 59 // Deprecated, use version without constraints. |
60 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 60 rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
61 const MediaConstraintsInterface* constraints) override; | 61 const MediaConstraintsInterface* constraints) override; |
62 | 62 |
63 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( | 63 virtual rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( |
64 cricket::VideoCapturer* capturer) override; | 64 std::unique_ptr<cricket::VideoCapturer> capturer) override; |
65 // This version supports filtering on width, height and frame rate. | 65 // This version supports filtering on width, height and frame rate. |
66 // For the "constraints=null" case, use the version without constraints. | 66 // For the "constraints=null" case, use the version without constraints. |
67 // TODO(hta): Design a version without MediaConstraintsInterface. | 67 // TODO(hta): Design a version without MediaConstraintsInterface. |
68 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 | 68 // https://bugs.chromium.org/p/webrtc/issues/detail?id=5617 |
69 rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( | 69 rtc::scoped_refptr<VideoTrackSourceInterface> CreateVideoSource( |
70 cricket::VideoCapturer* capturer, | 70 std::unique_ptr<cricket::VideoCapturer> capturer, |
71 const MediaConstraintsInterface* constraints) override; | 71 const MediaConstraintsInterface* constraints) override; |
72 | 72 |
73 rtc::scoped_refptr<VideoTrackInterface> CreateVideoTrack( | 73 rtc::scoped_refptr<VideoTrackInterface> CreateVideoTrack( |
74 const std::string& id, | 74 const std::string& id, |
75 VideoTrackSourceInterface* video_source) override; | 75 VideoTrackSourceInterface* video_source) override; |
76 | 76 |
77 rtc::scoped_refptr<AudioTrackInterface> | 77 rtc::scoped_refptr<AudioTrackInterface> |
78 CreateAudioTrack(const std::string& id, | 78 CreateAudioTrack(const std::string& id, |
79 AudioSourceInterface* audio_source) override; | 79 AudioSourceInterface* audio_source) override; |
80 | 80 |
(...skipping 30 matching lines...) Expand all Loading... |
111 rtc::Thread* signaling_thread, | 111 rtc::Thread* signaling_thread, |
112 AudioDeviceModule* default_adm, | 112 AudioDeviceModule* default_adm, |
113 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, | 113 rtc::scoped_refptr<webrtc::AudioEncoderFactory> audio_encoder_factory, |
114 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory, | 114 rtc::scoped_refptr<webrtc::AudioDecoderFactory> audio_decoder_factory, |
115 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, | 115 cricket::WebRtcVideoEncoderFactory* video_encoder_factory, |
116 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, | 116 cricket::WebRtcVideoDecoderFactory* video_decoder_factory, |
117 rtc::scoped_refptr<AudioMixer> audio_mixer); | 117 rtc::scoped_refptr<AudioMixer> audio_mixer); |
118 virtual ~PeerConnectionFactory(); | 118 virtual ~PeerConnectionFactory(); |
119 | 119 |
120 private: | 120 private: |
121 cricket::MediaEngineInterface* CreateMediaEngine_w(); | 121 std::unique_ptr<cricket::MediaEngineInterface> CreateMediaEngine_w(); |
122 | 122 |
123 bool owns_ptrs_; | 123 bool owns_ptrs_; |
124 bool wraps_current_thread_; | 124 bool wraps_current_thread_; |
125 rtc::Thread* network_thread_; | 125 rtc::Thread* network_thread_; |
126 rtc::Thread* worker_thread_; | 126 rtc::Thread* worker_thread_; |
127 rtc::Thread* signaling_thread_; | 127 rtc::Thread* signaling_thread_; |
128 Options options_; | 128 Options options_; |
129 // External Audio device used for audio playback. | 129 // External Audio device used for audio playback. |
130 rtc::scoped_refptr<AudioDeviceModule> default_adm_; | 130 rtc::scoped_refptr<AudioDeviceModule> default_adm_; |
131 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory_; | 131 rtc::scoped_refptr<AudioDecoderFactory> audio_decoder_factory_; |
132 std::unique_ptr<cricket::ChannelManager> channel_manager_; | 132 std::unique_ptr<cricket::ChannelManager> channel_manager_; |
133 // External Video encoder factory. This can be NULL if the client has not | 133 // External Video encoder factory. This can be NULL if the client has not |
134 // injected any. In that case, video engine will use the internal SW encoder. | 134 // injected any. In that case, video engine will use the internal SW encoder. |
135 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_; | 135 std::unique_ptr<cricket::WebRtcVideoEncoderFactory> video_encoder_factory_; |
136 // External Video decoder factory. This can be NULL if the client has not | 136 // External Video decoder factory. This can be NULL if the client has not |
137 // injected any. In that case, video engine will use the internal SW decoder. | 137 // injected any. In that case, video engine will use the internal SW decoder. |
138 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> video_decoder_factory_; | 138 std::unique_ptr<cricket::WebRtcVideoDecoderFactory> video_decoder_factory_; |
139 std::unique_ptr<rtc::BasicNetworkManager> default_network_manager_; | 139 std::unique_ptr<rtc::BasicNetworkManager> default_network_manager_; |
140 std::unique_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; | 140 std::unique_ptr<rtc::BasicPacketSocketFactory> default_socket_factory_; |
141 // External audio mixer. This can be NULL. In that case, internal audio mixer | 141 // External audio mixer. This can be NULL. In that case, internal audio mixer |
142 // will be created and used. | 142 // will be created and used. |
143 rtc::scoped_refptr<AudioMixer> external_audio_mixer_; | 143 rtc::scoped_refptr<AudioMixer> external_audio_mixer_; |
144 }; | 144 }; |
145 | 145 |
146 } // namespace webrtc | 146 } // namespace webrtc |
147 | 147 |
148 #endif // WEBRTC_PC_PEERCONNECTIONFACTORY_H_ | 148 #endif // WEBRTC_PC_PEERCONNECTIONFACTORY_H_ |
OLD | NEW |