| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 bool MediaStreamDependencyFactory::InitializeMediaStreamAudioSource( | 190 bool MediaStreamDependencyFactory::InitializeMediaStreamAudioSource( |
| 191 int render_view_id, | 191 int render_view_id, |
| 192 const blink::WebMediaConstraints& audio_constraints, | 192 const blink::WebMediaConstraints& audio_constraints, |
| 193 MediaStreamAudioSource* source_data) { | 193 MediaStreamAudioSource* source_data) { |
| 194 DVLOG(1) << "InitializeMediaStreamAudioSources()"; | 194 DVLOG(1) << "InitializeMediaStreamAudioSources()"; |
| 195 | 195 |
| 196 // Do additional source initialization if the audio source is a valid | 196 // Do additional source initialization if the audio source is a valid |
| 197 // microphone or tab audio. | 197 // microphone or tab audio. |
| 198 RTCMediaConstraints native_audio_constraints(audio_constraints); | 198 RTCMediaConstraints native_audio_constraints(audio_constraints); |
| 199 ApplyFixedAudioConstraints(&native_audio_constraints); | 199 MediaAudioConstraints::ApplyFixedAudioConstraints(&native_audio_constraints); |
| 200 | 200 |
| 201 StreamDeviceInfo device_info = source_data->device_info(); | 201 StreamDeviceInfo device_info = source_data->device_info(); |
| 202 RTCMediaConstraints constraints = native_audio_constraints; | 202 RTCMediaConstraints constraints = native_audio_constraints; |
| 203 // May modify both |constraints| and |effects|. | 203 // May modify both |constraints| and |effects|. |
| 204 HarmonizeConstraintsAndEffects(&constraints, | 204 HarmonizeConstraintsAndEffects(&constraints, |
| 205 &device_info.device.input.effects); | 205 &device_info.device.input.effects); |
| 206 | 206 |
| 207 scoped_refptr<WebRtcAudioCapturer> capturer( | 207 scoped_refptr<WebRtcAudioCapturer> capturer( |
| 208 CreateAudioCapturer(render_view_id, device_info, audio_constraints)); | 208 CreateAudioCapturer(render_view_id, device_info, audio_constraints)); |
| 209 if (!capturer.get()) { | 209 if (!capturer.get()) { |
| (...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 } | 754 } |
| 755 | 755 |
| 756 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 756 void MediaStreamDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
| 757 if (audio_device_) | 757 if (audio_device_) |
| 758 return; | 758 return; |
| 759 | 759 |
| 760 audio_device_ = new WebRtcAudioDeviceImpl(); | 760 audio_device_ = new WebRtcAudioDeviceImpl(); |
| 761 } | 761 } |
| 762 | 762 |
| 763 } // namespace content | 763 } // namespace content |
| OLD | NEW |