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

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

Issue 2540703002: Use the new statics interface to get APM stats from WebRTC (Closed)
Patch Set: Created 4 years 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 | « no previous file | content/renderer/media/media_stream_audio_processor_options.h » ('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 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 538
539 void MediaStreamAudioProcessor::OnRenderThreadChanged() { 539 void MediaStreamAudioProcessor::OnRenderThreadChanged() {
540 render_thread_checker_.DetachFromThread(); 540 render_thread_checker_.DetachFromThread();
541 DCHECK(render_thread_checker_.CalledOnValidThread()); 541 DCHECK(render_thread_checker_.CalledOnValidThread());
542 render_fifo_->ReattachThreadChecker(); 542 render_fifo_->ReattachThreadChecker();
543 } 543 }
544 544
545 void MediaStreamAudioProcessor::GetStats(AudioProcessorStats* stats) { 545 void MediaStreamAudioProcessor::GetStats(AudioProcessorStats* stats) {
546 stats->typing_noise_detected = 546 stats->typing_noise_detected =
547 (base::subtle::Acquire_Load(&typing_detected_) != false); 547 (base::subtle::Acquire_Load(&typing_detected_) != false);
548 GetAecStats(audio_processing_.get()->echo_cancellation(), stats); 548 GetAudioProcessingStats(audio_processing_.get(), stats);
549 } 549 }
550 550
551 void MediaStreamAudioProcessor::InitializeAudioProcessingModule( 551 void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
552 const blink::WebMediaConstraints& constraints, 552 const blink::WebMediaConstraints& constraints,
553 const MediaStreamDevice::AudioDeviceParameters& input_params) { 553 const MediaStreamDevice::AudioDeviceParameters& input_params) {
554 DCHECK(main_thread_runner_->BelongsToCurrentThread()); 554 DCHECK(main_thread_runner_->BelongsToCurrentThread());
555 DCHECK(!audio_processing_); 555 DCHECK(!audio_processing_);
556 556
557 MediaAudioConstraints audio_constraints(constraints, input_params.effects); 557 MediaAudioConstraints audio_constraints(constraints, input_params.effects);
558 558
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 0 : agc->stream_analog_level(); 826 0 : agc->stream_analog_level();
827 } 827 }
828 828
829 void MediaStreamAudioProcessor::UpdateAecStats() { 829 void MediaStreamAudioProcessor::UpdateAecStats() {
830 DCHECK(main_thread_runner_->BelongsToCurrentThread()); 830 DCHECK(main_thread_runner_->BelongsToCurrentThread());
831 if (echo_information_) 831 if (echo_information_)
832 echo_information_->UpdateAecStats(audio_processing_->echo_cancellation()); 832 echo_information_->UpdateAecStats(audio_processing_->echo_cancellation());
833 } 833 }
834 834
835 } // namespace content 835 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/media_stream_audio_processor_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698