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

Side by Side Diff: webrtc/modules/audio_processing/audio_processing_impl.h

Issue 1348903004: Adding APM configuration in AEC dump. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: removing macro and more 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
13 13
14 #include <list> 14 #include <list>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/scoped_ptr.h" 18 #include "webrtc/base/scoped_ptr.h"
19 #include "webrtc/base/thread_annotations.h" 19 #include "webrtc/base/thread_annotations.h"
20 #include "webrtc/modules/audio_processing/include/audio_processing.h" 20 #include "webrtc/modules/audio_processing/include/audio_processing.h"
21 21
22 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
peah-webrtc 2015/10/02 08:34:27 Is this really the correct way to do this? Why not
minyue-webrtc 2015/10/02 09:01:42 problem goes away with new change in Patch set 7
23 // Files generated at build-time by the protobuf compiler.
24 #ifdef WEBRTC_ANDROID_PLATFORM_BUILD
25 #include "external/webrtc/webrtc/modules/audio_processing/debug.pb.h"
26 #else
27 #include "webrtc/audio_processing/debug.pb.h"
28 #endif
29 #endif // WEBRTC_AUDIOPROC_DEBUG_DUMP
30
22 namespace webrtc { 31 namespace webrtc {
23 32
24 class AgcManagerDirect; 33 class AgcManagerDirect;
25 class AudioBuffer; 34 class AudioBuffer;
26 class AudioConverter; 35 class AudioConverter;
27 36
28 template<typename T> 37 template<typename T>
29 class Beamformer; 38 class Beamformer;
30 39
31 class CriticalSectionWrapper; 40 class CriticalSectionWrapper;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 std::list<ProcessingComponent*> component_list_; 169 std::list<ProcessingComponent*> component_list_;
161 CriticalSectionWrapper* crit_; 170 CriticalSectionWrapper* crit_;
162 rtc::scoped_ptr<AudioBuffer> render_audio_; 171 rtc::scoped_ptr<AudioBuffer> render_audio_;
163 rtc::scoped_ptr<AudioBuffer> capture_audio_; 172 rtc::scoped_ptr<AudioBuffer> capture_audio_;
164 rtc::scoped_ptr<AudioConverter> render_converter_; 173 rtc::scoped_ptr<AudioConverter> render_converter_;
165 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP 174 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP
166 // TODO(andrew): make this more graceful. Ideally we would split this stuff 175 // TODO(andrew): make this more graceful. Ideally we would split this stuff
167 // out into a separate class with an "enabled" and "disabled" implementation. 176 // out into a separate class with an "enabled" and "disabled" implementation.
168 int WriteMessageToDebugFile(); 177 int WriteMessageToDebugFile();
169 int WriteInitMessage(); 178 int WriteInitMessage();
179 int WriteConfigMessage();
180
181 // Updates |config_| and returns true if any change is made.
182 bool UpdateCurrentConfig();
183
170 rtc::scoped_ptr<FileWrapper> debug_file_; 184 rtc::scoped_ptr<FileWrapper> debug_file_;
171 rtc::scoped_ptr<audioproc::Event> event_msg_; // Protobuf message. 185 rtc::scoped_ptr<audioproc::Event> event_msg_; // Protobuf message.
172 std::string event_str_; // Memory for protobuf serialization. 186 std::string event_str_; // Memory for protobuf serialization.
187 rtc::scoped_ptr<audioproc::Config> config_;
173 #endif 188 #endif
174 189
175 // Format of processing streams at input/output call sites. 190 // Format of processing streams at input/output call sites.
176 ProcessingConfig api_format_; 191 ProcessingConfig api_format_;
177 192
178 // Only the rate and samples fields of fwd_proc_format_ are used because the 193 // Only the rate and samples fields of fwd_proc_format_ are used because the
179 // forward processing number of channels is mutable and is tracked by the 194 // forward processing number of channels is mutable and is tracked by the
180 // capture_audio_. 195 // capture_audio_.
181 StreamConfig fwd_proc_format_; 196 StreamConfig fwd_proc_format_;
182 StreamConfig rev_proc_format_; 197 StreamConfig rev_proc_format_;
(...skipping 22 matching lines...) Expand all
205 rtc::scoped_ptr<Beamformer<float>> beamformer_; 220 rtc::scoped_ptr<Beamformer<float>> beamformer_;
206 const std::vector<Point> array_geometry_; 221 const std::vector<Point> array_geometry_;
207 222
208 bool intelligibility_enabled_; 223 bool intelligibility_enabled_;
209 rtc::scoped_ptr<IntelligibilityEnhancer> intelligibility_enhancer_; 224 rtc::scoped_ptr<IntelligibilityEnhancer> intelligibility_enhancer_;
210 }; 225 };
211 226
212 } // namespace webrtc 227 } // namespace webrtc
213 228
214 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ 229 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698