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

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

Issue 2103483002: Add UMA stats for AEC filter divergence metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix (minyue@). Created 4 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_audio_processor.h" 5 #include "content/renderer/media/media_stream_audio_processor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 if (!audio_processing_.get()) 402 if (!audio_processing_.get())
403 return; 403 return;
404 404
405 audio_processing_.get()->UpdateHistogramsOnCallEnd(); 405 audio_processing_.get()->UpdateHistogramsOnCallEnd();
406 StopEchoCancellationDump(audio_processing_.get()); 406 StopEchoCancellationDump(audio_processing_.get());
407 407
408 if (playout_data_source_) { 408 if (playout_data_source_) {
409 playout_data_source_->RemovePlayoutSink(this); 409 playout_data_source_->RemovePlayoutSink(this);
410 playout_data_source_ = NULL; 410 playout_data_source_ = NULL;
411 } 411 }
412
413 if (echo_information_)
414 echo_information_->ReportAndResetAecDivergentFilterStats();
412 } 415 }
413 416
414 const media::AudioParameters& MediaStreamAudioProcessor::InputFormat() const { 417 const media::AudioParameters& MediaStreamAudioProcessor::InputFormat() const {
415 return input_format_; 418 return input_format_;
416 } 419 }
417 420
418 const media::AudioParameters& MediaStreamAudioProcessor::OutputFormat() const { 421 const media::AudioParameters& MediaStreamAudioProcessor::OutputFormat() const {
419 return output_format_; 422 return output_format_;
420 } 423 }
421 424
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 753
751 if (typing_detector_) { 754 if (typing_detector_) {
752 webrtc::VoiceDetection* vad = ap->voice_detection(); 755 webrtc::VoiceDetection* vad = ap->voice_detection();
753 DCHECK(vad->is_enabled()); 756 DCHECK(vad->is_enabled());
754 bool detected = typing_detector_->Process(key_pressed, 757 bool detected = typing_detector_->Process(key_pressed,
755 vad->stream_has_voice()); 758 vad->stream_has_voice());
756 base::subtle::Release_Store(&typing_detected_, detected); 759 base::subtle::Release_Store(&typing_detected_, detected);
757 } 760 }
758 761
759 if (echo_information_) { 762 if (echo_information_) {
760 echo_information_.get()->UpdateAecDelayStats(ap->echo_cancellation()); 763 echo_information_->UpdateAecDelayStats(ap->echo_cancellation());
764 echo_information_->UpdateAecDivergentFilterStats(ap->echo_cancellation());
761 } 765 }
762 766
763 // Return 0 if the volume hasn't been changed, and otherwise the new volume. 767 // Return 0 if the volume hasn't been changed, and otherwise the new volume.
764 return (agc->stream_analog_level() == volume) ? 768 return (agc->stream_analog_level() == volume) ?
765 0 : agc->stream_analog_level(); 769 0 : agc->stream_analog_level();
766 } 770 }
767 771
768 } // namespace content 772 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698