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

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: Rebase. Created 5 years, 2 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 ed94baa3ec0f4b6ad32bd34c04e3fda9157b45fd..fcb2057e265d73ea7ad1b4b39d7a4edee50d1a6f 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -246,12 +246,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);
}
MediaStreamAudioProcessor::~MediaStreamAudioProcessor() {
@@ -326,9 +326,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_ = NULL;
}
if (!audio_processing_.get())
@@ -351,11 +351,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_)
@@ -372,7 +371,7 @@ void MediaStreamAudioProcessor::OnDisableAecDump() {
void MediaStreamAudioProcessor::OnIpcClosing() {
DCHECK(main_thread_checker_.CalledOnValidThread());
- aec_dump_message_filter_ = NULL;
+ audio_debug_recorder_ = NULL;
}
void MediaStreamAudioProcessor::OnPlayoutData(media::AudioBus* audio_bus,

Powered by Google App Engine
This is Rietveld 408576698