Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: content/renderer/media/webrtc_audio_capturer.cc

Issue 1304173002: Log error instead of CHECKing input audio sequence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.h ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.h ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698