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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 bool MediaStreamDependencyFactory::InitializeMediaStreamAudioSource( | 187 bool MediaStreamDependencyFactory::InitializeMediaStreamAudioSource( |
188 int render_view_id, | 188 int render_view_id, |
189 const blink::WebMediaConstraints& audio_constraints, | 189 const blink::WebMediaConstraints& audio_constraints, |
190 MediaStreamAudioSource* source_data) { | 190 MediaStreamAudioSource* source_data) { |
191 DVLOG(1) << "InitializeMediaStreamAudioSources()"; | 191 DVLOG(1) << "InitializeMediaStreamAudioSources()"; |
192 | 192 |
193 // Do additional source initialization if the audio source is a valid | 193 // Do additional source initialization if the audio source is a valid |
194 // microphone or tab audio. | 194 // microphone or tab audio. |
195 RTCMediaConstraints native_audio_constraints(audio_constraints); | 195 RTCMediaConstraints native_audio_constraints(audio_constraints); |
196 ApplyFixedAudioConstraints(&native_audio_constraints); | 196 MediaAudioConstraints::ApplyFixedAudioConstraints(&native_audio_constraints); |
197 | 197 |
198 StreamDeviceInfo device_info = source_data->device_info(); | 198 StreamDeviceInfo device_info = source_data->device_info(); |
199 RTCMediaConstraints constraints = native_audio_constraints; | 199 RTCMediaConstraints constraints = native_audio_constraints; |
200 // May modify both |constraints| and |effects|. | 200 // May modify both |constraints| and |effects|. |
201 HarmonizeConstraintsAndEffects(&constraints, | 201 HarmonizeConstraintsAndEffects(&constraints, |
202 &device_info.device.input.effects); | 202 &device_info.device.input.effects); |
203 | 203 |
204 scoped_refptr<WebRtcAudioCapturer> capturer( | 204 scoped_refptr<WebRtcAudioCapturer> capturer( |
205 CreateAudioCapturer(render_view_id, device_info, audio_constraints, | 205 CreateAudioCapturer(render_view_id, device_info, audio_constraints, |
206 source_data)); | 206 source_data)); |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 } | 660 } |
661 | 661 |
662 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 662 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
663 if (audio_device_) | 663 if (audio_device_) |
664 return; | 664 return; |
665 | 665 |
666 audio_device_ = new WebRtcAudioDeviceImpl(); | 666 audio_device_ = new WebRtcAudioDeviceImpl(); |
667 } | 667 } |
668 | 668 |
669 } // namespace content | 669 } // namespace content |
OLD | NEW |