OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/media/media_stream_dependency_factory.h" | 5 #include "content/renderer/media/media_stream_dependency_factory.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 | 232 |
233 WebRtcVideoCapturerAdapter* MediaStreamDependencyFactory::CreateVideoCapturer( | 233 WebRtcVideoCapturerAdapter* MediaStreamDependencyFactory::CreateVideoCapturer( |
234 bool is_screeencast) { | 234 bool is_screeencast) { |
235 // We need to make sure the libjingle thread wrappers have been created | 235 // We need to make sure the libjingle thread wrappers have been created |
236 // before we can use an instance of a WebRtcVideoCapturerAdapter. This is | 236 // before we can use an instance of a WebRtcVideoCapturerAdapter. This is |
237 // since the base class of WebRtcVideoCapturerAdapter is a | 237 // since the base class of WebRtcVideoCapturerAdapter is a |
238 // cricket::VideoCapturer and it uses the libjingle thread wrappers. | 238 // cricket::VideoCapturer and it uses the libjingle thread wrappers. |
239 if (!GetPcFactory()) | 239 if (!GetPcFactory()) |
240 return NULL; | 240 return NULL; |
241 return new WebRtcVideoCapturerAdapter(is_screeencast); | 241 return new WebRtcVideoCapturerAdapter(worker_thread_proxy(), |
| 242 is_screeencast); |
242 } | 243 } |
243 | 244 |
244 scoped_refptr<webrtc::VideoSourceInterface> | 245 scoped_refptr<webrtc::VideoSourceInterface> |
245 MediaStreamDependencyFactory::CreateVideoSource( | 246 MediaStreamDependencyFactory::CreateVideoSource( |
246 cricket::VideoCapturer* capturer, | 247 cricket::VideoCapturer* capturer, |
247 const blink::WebMediaConstraints& constraints) { | 248 const blink::WebMediaConstraints& constraints) { |
248 RTCMediaConstraints webrtc_constraints(constraints); | 249 RTCMediaConstraints webrtc_constraints(constraints); |
249 scoped_refptr<webrtc::VideoSourceInterface> source = | 250 scoped_refptr<webrtc::VideoSourceInterface> source = |
250 GetPcFactory()->CreateVideoSource(capturer, &webrtc_constraints).get(); | 251 GetPcFactory()->CreateVideoSource(capturer, &webrtc_constraints).get(); |
251 return source; | 252 return source; |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 } | 655 } |
655 | 656 |
656 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 657 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
657 if (audio_device_) | 658 if (audio_device_) |
658 return; | 659 return; |
659 | 660 |
660 audio_device_ = new WebRtcAudioDeviceImpl(); | 661 audio_device_ = new WebRtcAudioDeviceImpl(); |
661 } | 662 } |
662 | 663 |
663 } // namespace content | 664 } // namespace content |
OLD | NEW |