| 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 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 554 |
| 555 if (new_volume) { | 555 if (new_volume) { |
| 556 SetVolume(new_volume); | 556 SetVolume(new_volume); |
| 557 | 557 |
| 558 // Update the |current_volume| to avoid passing the old volume to AGC. | 558 // Update the |current_volume| to avoid passing the old volume to AGC. |
| 559 current_volume = new_volume; | 559 current_volume = new_volume; |
| 560 } | 560 } |
| 561 } | 561 } |
| 562 } | 562 } |
| 563 | 563 |
| 564 void WebRtcAudioCapturer::OnCaptureError() { | 564 void WebRtcAudioCapturer::OnCaptureError(const std::string& message) { |
| 565 NOTIMPLEMENTED(); | 565 WebRtcLogMessage("WAC::OnCaptureError: " + message); |
| 566 } | 566 } |
| 567 | 567 |
| 568 media::AudioParameters WebRtcAudioCapturer::source_audio_parameters() const { | 568 media::AudioParameters WebRtcAudioCapturer::source_audio_parameters() const { |
| 569 base::AutoLock auto_lock(lock_); | 569 base::AutoLock auto_lock(lock_); |
| 570 return audio_processor_.get() ? audio_processor_->InputFormat() | 570 return audio_processor_.get() ? audio_processor_->InputFormat() |
| 571 : media::AudioParameters(); | 571 : media::AudioParameters(); |
| 572 } | 572 } |
| 573 | 573 |
| 574 bool WebRtcAudioCapturer::GetPairedOutputParameters( | 574 bool WebRtcAudioCapturer::GetPairedOutputParameters( |
| 575 int* session_id, | 575 int* session_id, |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 const scoped_refptr<media::AudioCapturerSource>& source, | 619 const scoped_refptr<media::AudioCapturerSource>& source, |
| 620 media::AudioParameters params) { | 620 media::AudioParameters params) { |
| 621 // Create a new audio stream as source which uses the new source. | 621 // Create a new audio stream as source which uses the new source. |
| 622 SetCapturerSourceInternal(source, | 622 SetCapturerSourceInternal(source, |
| 623 params.channel_layout(), | 623 params.channel_layout(), |
| 624 params.sample_rate(), | 624 params.sample_rate(), |
| 625 0); | 625 0); |
| 626 } | 626 } |
| 627 | 627 |
| 628 } // namespace content | 628 } // namespace content |
| OLD | NEW |