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

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

Issue 1647773002: MediaStream audio sourcing: Bypass audio processing for non-WebRTC cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NOT FOR REVIEW -- This will be broken-up across multiple CLs. Created 4 years, 10 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 unified diff | Download patch
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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
7 7
8 #include "base/atomicops.h" 8 #include "base/atomicops.h"
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Accessor to check if the audio processing is enabled or not. 104 // Accessor to check if the audio processing is enabled or not.
105 bool has_audio_processing() const { return audio_processing_ != NULL; } 105 bool has_audio_processing() const { return audio_processing_ != NULL; }
106 106
107 // AecDumpMessageFilter::AecDumpDelegate implementation. 107 // AecDumpMessageFilter::AecDumpDelegate implementation.
108 // Called on the main render thread. 108 // Called on the main render thread.
109 void OnAecDumpFile(const IPC::PlatformFileForTransit& file_handle) override; 109 void OnAecDumpFile(const IPC::PlatformFileForTransit& file_handle) override;
110 void OnDisableAecDump() override; 110 void OnDisableAecDump() override;
111 void OnIpcClosing() override; 111 void OnIpcClosing() override;
112 112
113 // Returns true if there are constraints or effects flags set to indicate that
114 // audio needs to be processed by MediaStreamAudioProcessor. Returns false if
115 // audio data should be directly delivered, unmodified, to all media stream
116 // sinks. See media::AudioParameters::PlatformEffectsMask for interpretation
117 // of |effects_flags|.
118 static bool ShouldRouteAudioThroughProcessor(
119 const blink::WebMediaConstraints& constraints,
120 int effects_flags);
121
113 protected: 122 protected:
114 ~MediaStreamAudioProcessor() override; 123 ~MediaStreamAudioProcessor() override;
115 124
116 private: 125 private:
117 friend class MediaStreamAudioProcessorTest; 126 friend class MediaStreamAudioProcessorTest;
118 127
119 FRIEND_TEST_ALL_PREFIXES(MediaStreamAudioProcessorTest, 128 FRIEND_TEST_ALL_PREFIXES(MediaStreamAudioProcessorTest,
120 GetAecDumpMessageFilter); 129 GetAecDumpMessageFilter);
121 130
122 // WebRtcPlayoutDataSource::Sink implementation. 131 // WebRtcPlayoutDataSource::Sink implementation.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 // Object for logging echo information when the AEC is enabled. Accessible by 216 // Object for logging echo information when the AEC is enabled. Accessible by
208 // the libjingle thread through GetStats(). 217 // the libjingle thread through GetStats().
209 scoped_ptr<EchoInformation> echo_information_; 218 scoped_ptr<EchoInformation> echo_information_;
210 219
211 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioProcessor); 220 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioProcessor);
212 }; 221 };
213 222
214 } // namespace content 223 } // namespace content
215 224
216 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ 225 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_audio_level_calculator.cc ('k') | content/renderer/media/media_stream_audio_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698