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

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

Issue 671793004: Clean up the media stream audio track code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month 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 548e74f5a2af18e01da81d976c848fcfb75d73c9..355ca9ac7e097020eaee37838811037c5b38bf2a 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -4,13 +4,11 @@
#include "content/renderer/media/media_stream_audio_processor.h"
-#include "base/command_line.h"
#include "base/debug/trace_event.h"
#if defined(OS_MACOSX)
#include "base/metrics/field_trial.h"
#endif
#include "base/metrics/histogram.h"
-#include "content/public/common/content_switches.h"
#include "content/renderer/media/media_stream_audio_processor_options.h"
#include "content/renderer/media/rtc_media_constraints.h"
#include "content/renderer/media/webrtc_audio_device_impl.h"
@@ -205,11 +203,6 @@ class MediaStreamAudioFifo {
bool data_available_;
};
-bool MediaStreamAudioProcessor::IsAudioTrackProcessingEnabled() {
- return !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableAudioTrackProcessing);
-}
-
MediaStreamAudioProcessor::MediaStreamAudioProcessor(
const blink::WebMediaConstraints& constraints,
int effects,
@@ -222,14 +215,13 @@ MediaStreamAudioProcessor::MediaStreamAudioProcessor(
capture_thread_checker_.DetachFromThread();
render_thread_checker_.DetachFromThread();
InitializeAudioProcessingModule(constraints, effects);
- if (IsAudioTrackProcessingEnabled()) {
- aec_dump_message_filter_ = AecDumpMessageFilter::Get();
- // In unit tests not creating a message filter, |aec_dump_message_filter_|
- // 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);
- }
+
+ aec_dump_message_filter_ = AecDumpMessageFilter::Get();
+ // In unit tests not creating a message filter, |aec_dump_message_filter_|
+ // 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);
}
MediaStreamAudioProcessor::~MediaStreamAudioProcessor() {
@@ -401,11 +393,6 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
audio_mirroring_ = audio_constraints.GetProperty(
MediaAudioConstraints::kGoogAudioMirroring);
- if (!IsAudioTrackProcessingEnabled()) {
- RecordProcessingState(AUDIO_PROCESSING_IN_WEBRTC);
- return;
- }
-
#if defined(OS_IOS)
// On iOS, VPIO provides built-in AGC and AEC.
const bool echo_cancellation = false;
« no previous file with comments | « content/renderer/media/media_stream_audio_processor.h ('k') | content/renderer/media/media_stream_audio_processor_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698