| 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/webrtc_audio_capturer.h" | 5 #include "content/renderer/media/webrtc_audio_capturer.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 | 206 |
| 207 WebRtcAudioCapturer::WebRtcAudioCapturer( | 207 WebRtcAudioCapturer::WebRtcAudioCapturer( |
| 208 int render_view_id, | 208 int render_view_id, |
| 209 const StreamDeviceInfo& device_info, | 209 const StreamDeviceInfo& device_info, |
| 210 const blink::WebMediaConstraints& constraints, | 210 const blink::WebMediaConstraints& constraints, |
| 211 WebRtcAudioDeviceImpl* audio_device) | 211 WebRtcAudioDeviceImpl* audio_device) |
| 212 : constraints_(constraints), | 212 : constraints_(constraints), |
| 213 audio_processor_( | 213 audio_processor_( |
| 214 new talk_base::RefCountedObject<MediaStreamAudioProcessor>( | 214 new talk_base::RefCountedObject<MediaStreamAudioProcessor>( |
| 215 constraints, device_info.device.input.effects, audio_device)), | 215 constraints, device_info.device.input.effects, |
| 216 device_info.device.type, audio_device)), |
| 216 running_(false), | 217 running_(false), |
| 217 render_view_id_(render_view_id), | 218 render_view_id_(render_view_id), |
| 218 device_info_(device_info), | 219 device_info_(device_info), |
| 219 volume_(0), | 220 volume_(0), |
| 220 peer_connection_mode_(false), | 221 peer_connection_mode_(false), |
| 221 key_pressed_(false), | 222 key_pressed_(false), |
| 222 need_audio_processing_(false), | 223 need_audio_processing_(false), |
| 223 audio_device_(audio_device) { | 224 audio_device_(audio_device) { |
| 224 DVLOG(1) << "WebRtcAudioCapturer::WebRtcAudioCapturer()"; | 225 DVLOG(1) << "WebRtcAudioCapturer::WebRtcAudioCapturer()"; |
| 225 } | 226 } |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue); | 580 DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue); |
| 580 audio_processor_->StartAecDump(aec_dump_file); | 581 audio_processor_->StartAecDump(aec_dump_file); |
| 581 } | 582 } |
| 582 | 583 |
| 583 void WebRtcAudioCapturer::StopAecDump() { | 584 void WebRtcAudioCapturer::StopAecDump() { |
| 584 DCHECK(thread_checker_.CalledOnValidThread()); | 585 DCHECK(thread_checker_.CalledOnValidThread()); |
| 585 audio_processor_->StopAecDump(); | 586 audio_processor_->StopAecDump(); |
| 586 } | 587 } |
| 587 | 588 |
| 588 } // namespace content | 589 } // namespace content |
| OLD | NEW |