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

Unified Diff: content/renderer/media/media_stream_audio_processor.cc

Issue 1246283003: Split out audio debug recording from RenderProcessHostImpl. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile. Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/media_stream_audio_processor.cc
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index 2df3604977c8daf5c3695af544c2831ac073210d..a32a6771952b9bcd1b4bb4c9ece0da4c88391a3f 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -282,12 +282,12 @@ MediaStreamAudioProcessor::MediaStreamAudioProcessor(
render_thread_checker_.DetachFromThread();
InitializeAudioProcessingModule(constraints, input_params);
- aec_dump_message_filter_ = AecDumpMessageFilter::Get();
- // In unit tests not creating a message filter, |aec_dump_message_filter_|
+ audio_debug_recorder_ = AudioDebugRecorder::Get();
+ // In unit tests not creating a message filter, |audio_debug_recorder_|
// will be NULL. We can just ignore that. Other unit tests and browser tests
// ensure that we do get the filter when we should.
- if (aec_dump_message_filter_.get())
- aec_dump_message_filter_->AddDelegate(this);
+ if (audio_debug_recorder_.get())
+ audio_debug_recorder_->AddDelegate(this);
// Create and configure |audio_repetition_detector_|.
std::vector<int> look_back_times;
@@ -379,9 +379,9 @@ void MediaStreamAudioProcessor::Stop() {
stopped_ = true;
- if (aec_dump_message_filter_.get()) {
- aec_dump_message_filter_->RemoveDelegate(this);
- aec_dump_message_filter_ = NULL;
+ if (audio_debug_recorder_.get()) {
+ audio_debug_recorder_->RemoveDelegate(this);
+ audio_debug_recorder_ = nullptr;
}
if (!audio_processing_.get())
@@ -392,7 +392,7 @@ void MediaStreamAudioProcessor::Stop() {
if (playout_data_source_) {
playout_data_source_->RemovePlayoutSink(this);
- playout_data_source_ = NULL;
+ playout_data_source_ = nullptr;
}
}
@@ -404,11 +404,10 @@ const media::AudioParameters& MediaStreamAudioProcessor::OutputFormat() const {
return output_format_;
}
-void MediaStreamAudioProcessor::OnAecDumpFile(
- const IPC::PlatformFileForTransit& file_handle) {
+void MediaStreamAudioProcessor::OnAecDumpFile(base::PlatformFile file_handle) {
DCHECK(main_thread_checker_.CalledOnValidThread());
- base::File file = IPC::PlatformFileForTransitToFile(file_handle);
+ base::File file(file_handle);
DCHECK(file.IsValid());
if (audio_processing_)
@@ -425,7 +424,7 @@ void MediaStreamAudioProcessor::OnDisableAecDump() {
void MediaStreamAudioProcessor::OnIpcClosing() {
DCHECK(main_thread_checker_.CalledOnValidThread());
- aec_dump_message_filter_ = NULL;
+ audio_debug_recorder_ = nullptr;
}
void MediaStreamAudioProcessor::OnPlayoutData(media::AudioBus* audio_bus,
« no previous file with comments | « content/renderer/media/media_stream_audio_processor.h ('k') | content/renderer/media/media_stream_audio_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698