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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 channel_layout, 0, sample_rate, | 303 channel_layout, 0, sample_rate, |
304 16, buffer_size, | 304 16, buffer_size, |
305 device_info_.device.input.effects); | 305 device_info_.device.input.effects); |
306 | 306 |
307 { | 307 { |
308 base::AutoLock auto_lock(lock_); | 308 base::AutoLock auto_lock(lock_); |
309 // Notify the |audio_processor_| of the new format. | 309 // Notify the |audio_processor_| of the new format. |
310 audio_processor_->OnCaptureFormatChanged(params); | 310 audio_processor_->OnCaptureFormatChanged(params); |
311 | 311 |
312 need_audio_processing_ = NeedsAudioProcessing( | 312 need_audio_processing_ = NeedsAudioProcessing( |
313 constraints_, device_info_.device.input.effects); | 313 constraints_, device_info_.device.input.effects, |
| 314 device_info_.device.type); |
314 // Notify all tracks about the new format. | 315 // Notify all tracks about the new format. |
315 tracks_.TagAll(); | 316 tracks_.TagAll(); |
316 } | 317 } |
317 | 318 |
318 if (source.get()) | 319 if (source.get()) |
319 source->Initialize(params, this, session_id()); | 320 source->Initialize(params, this, session_id()); |
320 | 321 |
321 if (restart_source) | 322 if (restart_source) |
322 Start(); | 323 Start(); |
323 } | 324 } |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue); | 581 DCHECK_NE(aec_dump_file, base::kInvalidPlatformFileValue); |
581 audio_processor_->StartAecDump(aec_dump_file); | 582 audio_processor_->StartAecDump(aec_dump_file); |
582 } | 583 } |
583 | 584 |
584 void WebRtcAudioCapturer::StopAecDump() { | 585 void WebRtcAudioCapturer::StopAecDump() { |
585 DCHECK(thread_checker_.CalledOnValidThread()); | 586 DCHECK(thread_checker_.CalledOnValidThread()); |
586 audio_processor_->StopAecDump(); | 587 audio_processor_->StopAecDump(); |
587 } | 588 } |
588 | 589 |
589 } // namespace content | 590 } // namespace content |
OLD | NEW |