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 #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/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 int audio_delay_milliseconds) override; | 119 int audio_delay_milliseconds) override; |
120 void OnPlayoutDataSourceChanged() override; | 120 void OnPlayoutDataSourceChanged() override; |
121 | 121 |
122 // webrtc::AudioProcessorInterface implementation. | 122 // webrtc::AudioProcessorInterface implementation. |
123 // This method is called on the libjingle thread. | 123 // This method is called on the libjingle thread. |
124 void GetStats(AudioProcessorStats* stats) override; | 124 void GetStats(AudioProcessorStats* stats) override; |
125 | 125 |
126 // Helper to initialize the WebRtc AudioProcessing. | 126 // Helper to initialize the WebRtc AudioProcessing. |
127 void InitializeAudioProcessingModule( | 127 void InitializeAudioProcessingModule( |
128 const blink::WebMediaConstraints& constraints, int effects); | 128 const blink::WebMediaConstraints& constraints, int effects); |
129 void ConfigureBeamforming(webrtc::Config* config, | |
130 const std::string& geometry_str) const; | |
131 | |
132 // Parses the array geometry from the URL string formatted as | |
133 // "x1 y1 z1 ... xn yn zn" for an n-microphone array. | |
134 // Returns a zero-sized vector if |geometry_str| isn't a parseable geometry. | |
135 std::vector<webrtc::Point> ParseArrayGeometry( | |
136 const std::string& geometry_str) const; | |
137 | 129 |
138 // Helper to initialize the capture converter. | 130 // Helper to initialize the capture converter. |
139 void InitializeCaptureFifo(const media::AudioParameters& input_format); | 131 void InitializeCaptureFifo(const media::AudioParameters& input_format); |
140 | 132 |
141 // Helper to initialize the render converter. | 133 // Helper to initialize the render converter. |
142 void InitializeRenderFifoIfNeeded(int sample_rate, | 134 void InitializeRenderFifoIfNeeded(int sample_rate, |
143 int number_of_channels, | 135 int number_of_channels, |
144 int frames_per_buffer); | 136 int frames_per_buffer); |
145 | 137 |
146 // Called by ProcessAndConsumeData(). | 138 // Called by ProcessAndConsumeData(). |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // Object for logging echo information when the AEC is enabled. Accessible by | 197 // Object for logging echo information when the AEC is enabled. Accessible by |
206 // the libjingle thread through GetStats(). | 198 // the libjingle thread through GetStats(). |
207 scoped_ptr<EchoInformation> echo_information_; | 199 scoped_ptr<EchoInformation> echo_information_; |
208 | 200 |
209 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioProcessor); | 201 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioProcessor); |
210 }; | 202 }; |
211 | 203 |
212 } // namespace content | 204 } // namespace content |
213 | 205 |
214 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ | 206 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_H_ |
OLD | NEW |