OLD | NEW |
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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 const media::AudioParameters& MediaStreamAudioProcessor::InputFormat() const { | 233 const media::AudioParameters& MediaStreamAudioProcessor::InputFormat() const { |
234 return capture_converter_->source_parameters(); | 234 return capture_converter_->source_parameters(); |
235 } | 235 } |
236 | 236 |
237 const media::AudioParameters& MediaStreamAudioProcessor::OutputFormat() const { | 237 const media::AudioParameters& MediaStreamAudioProcessor::OutputFormat() const { |
238 return capture_converter_->sink_parameters(); | 238 return capture_converter_->sink_parameters(); |
239 } | 239 } |
240 | 240 |
241 void MediaStreamAudioProcessor::StartAecDump(base::File aec_dump_file) { | 241 void MediaStreamAudioProcessor::StartAecDump(base::File aec_dump_file) { |
242 if (audio_processing_) | 242 if (audio_processing_) |
243 StartEchoCancellationDump(audio_processing_.get(), | 243 StartEchoCancellationDump(audio_processing_.get(), aec_dump_file.Pass()); |
244 aec_dump_file.TakePlatformFile()); | |
245 } | 244 } |
246 | 245 |
247 void MediaStreamAudioProcessor::StopAecDump() { | 246 void MediaStreamAudioProcessor::StopAecDump() { |
248 if (audio_processing_) | 247 if (audio_processing_) |
249 StopEchoCancellationDump(audio_processing_.get()); | 248 StopEchoCancellationDump(audio_processing_.get()); |
250 } | 249 } |
251 | 250 |
252 void MediaStreamAudioProcessor::OnPlayoutData(media::AudioBus* audio_bus, | 251 void MediaStreamAudioProcessor::OnPlayoutData(media::AudioBus* audio_bus, |
253 int sample_rate, | 252 int sample_rate, |
254 int audio_delay_milliseconds) { | 253 int audio_delay_milliseconds) { |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 | 496 |
498 StopAecDump(); | 497 StopAecDump(); |
499 | 498 |
500 if (playout_data_source_) | 499 if (playout_data_source_) |
501 playout_data_source_->RemovePlayoutSink(this); | 500 playout_data_source_->RemovePlayoutSink(this); |
502 | 501 |
503 audio_processing_.reset(); | 502 audio_processing_.reset(); |
504 } | 503 } |
505 | 504 |
506 } // namespace content | 505 } // namespace content |
OLD | NEW |