Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 class EchoControlMobileImpl; | 32 class EchoControlMobileImpl; |
| 33 class FileWrapper; | 33 class FileWrapper; |
| 34 class GainControlImpl; | 34 class GainControlImpl; |
| 35 class GainControlForNewAgc; | 35 class GainControlForNewAgc; |
| 36 class HighPassFilterImpl; | 36 class HighPassFilterImpl; |
| 37 class LevelEstimatorImpl; | 37 class LevelEstimatorImpl; |
| 38 class NoiseSuppressionImpl; | 38 class NoiseSuppressionImpl; |
| 39 class ProcessingComponent; | 39 class ProcessingComponent; |
| 40 class TransientSuppressor; | 40 class TransientSuppressor; |
| 41 class VoiceDetectionImpl; | 41 class VoiceDetectionImpl; |
| 42 class IntelligibilityEnhancer; | |
| 42 | 43 |
| 43 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP | 44 #ifdef WEBRTC_AUDIOPROC_DEBUG_DUMP |
| 44 namespace audioproc { | 45 namespace audioproc { |
| 45 | 46 |
| 46 class Event; | 47 class Event; |
| 47 | 48 |
| 48 } // namespace audioproc | 49 } // namespace audioproc |
| 49 #endif | 50 #endif |
| 50 | 51 |
| 51 class AudioProcessingImpl : public AudioProcessing { | 52 class AudioProcessingImpl : public AudioProcessing { |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 82 int input_sample_rate_hz, | 83 int input_sample_rate_hz, |
| 83 ChannelLayout input_layout, | 84 ChannelLayout input_layout, |
| 84 int output_sample_rate_hz, | 85 int output_sample_rate_hz, |
| 85 ChannelLayout output_layout, | 86 ChannelLayout output_layout, |
| 86 float* const* dest) override; | 87 float* const* dest) override; |
| 87 int ProcessStream(const float* const* src, | 88 int ProcessStream(const float* const* src, |
| 88 const StreamConfig& input_config, | 89 const StreamConfig& input_config, |
| 89 const StreamConfig& output_config, | 90 const StreamConfig& output_config, |
| 90 float* const* dest) override; | 91 float* const* dest) override; |
| 91 int AnalyzeReverseStream(AudioFrame* frame) override; | 92 int AnalyzeReverseStream(AudioFrame* frame) override; |
| 93 int ProcessReverseStream(AudioFrame* frame) override; | |
| 92 int AnalyzeReverseStream(const float* const* data, | 94 int AnalyzeReverseStream(const float* const* data, |
| 93 int samples_per_channel, | 95 int samples_per_channel, |
| 94 int sample_rate_hz, | 96 int sample_rate_hz, |
| 95 ChannelLayout layout) override; | 97 ChannelLayout layout) override; |
| 96 int AnalyzeReverseStream(const float* const* data, | 98 int ProcessReverseStream(const float* const* src, |
| 97 const StreamConfig& reverse_config) override; | 99 const StreamConfig& reverse_input_config, |
| 100 const StreamConfig& reverse_output_config, | |
| 101 float* const* dest) override; | |
| 98 int set_stream_delay_ms(int delay) override; | 102 int set_stream_delay_ms(int delay) override; |
| 99 int stream_delay_ms() const override; | 103 int stream_delay_ms() const override; |
| 100 bool was_stream_delay_set() const override; | 104 bool was_stream_delay_set() const override; |
| 101 void set_delay_offset_ms(int offset) override; | 105 void set_delay_offset_ms(int offset) override; |
| 102 int delay_offset_ms() const override; | 106 int delay_offset_ms() const override; |
| 103 void set_stream_key_pressed(bool key_pressed) override; | 107 void set_stream_key_pressed(bool key_pressed) override; |
| 104 bool stream_key_pressed() const override; | 108 bool stream_key_pressed() const override; |
| 105 int StartDebugRecording(const char filename[kMaxFilenameSize]) override; | 109 int StartDebugRecording(const char filename[kMaxFilenameSize]) override; |
| 106 int StartDebugRecording(FILE* handle) override; | 110 int StartDebugRecording(FILE* handle) override; |
| 107 int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) override; | 111 int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) override; |
| 108 int StopDebugRecording() override; | 112 int StopDebugRecording() override; |
| 109 void UpdateHistogramsOnCallEnd() override; | 113 void UpdateHistogramsOnCallEnd() override; |
| 110 EchoCancellation* echo_cancellation() const override; | 114 EchoCancellation* echo_cancellation() const override; |
| 111 EchoControlMobile* echo_control_mobile() const override; | 115 EchoControlMobile* echo_control_mobile() const override; |
| 112 GainControl* gain_control() const override; | 116 GainControl* gain_control() const override; |
| 113 HighPassFilter* high_pass_filter() const override; | 117 HighPassFilter* high_pass_filter() const override; |
| 114 LevelEstimator* level_estimator() const override; | 118 LevelEstimator* level_estimator() const override; |
| 115 NoiseSuppression* noise_suppression() const override; | 119 NoiseSuppression* noise_suppression() const override; |
| 116 VoiceDetection* voice_detection() const override; | 120 VoiceDetection* voice_detection() const override; |
| 117 | 121 |
| 118 protected: | 122 protected: |
| 119 // Overridden in a mock. | 123 // Overridden in a mock. |
| 120 virtual int InitializeLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 124 virtual int InitializeLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 121 | 125 |
| 122 private: | 126 private: |
| 123 int InitializeLocked(const ProcessingConfig& config) | 127 int InitializeLocked(const ProcessingConfig& config) |
| 124 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 128 EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 125 int MaybeInitializeLocked(const ProcessingConfig& config) | 129 int MaybeInitializeLocked(const ProcessingConfig& config) |
| 126 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 130 EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 131 int AnalyzeReverseStream(const float* const* src, | |
|
Andrew MacDonald
2015/07/30 18:48:53
Add a TODO for removing this.
ekm
2015/07/30 22:38:44
Done.
| |
| 132 const StreamConfig& input_config, | |
| 133 const StreamConfig& output_config, | |
| 134 const float* const* dest); | |
| 127 int ProcessStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 135 int ProcessStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 128 int AnalyzeReverseStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 136 int ProcessReverseStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 129 | 137 |
| 130 bool is_data_processed() const; | 138 bool is_data_processed() const; |
| 131 bool output_copy_needed(bool is_data_processed) const; | 139 bool output_copy_needed(bool is_data_processed) const; |
| 132 bool synthesis_needed(bool is_data_processed) const; | 140 bool synthesis_needed(bool is_data_processed) const; |
| 133 bool analysis_needed(bool is_data_processed) const; | 141 bool analysis_needed(bool is_data_processed) const; |
| 142 bool is_rev_processed() const; | |
| 134 void InitializeExperimentalAgc() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 143 void InitializeExperimentalAgc() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 135 void InitializeTransient() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 144 void InitializeTransient() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 136 void InitializeBeamformer() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 145 void InitializeBeamformer() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 146 void InitializeIntelligibility() EXCLUSIVE_LOCKS_REQUIRED(crit_); | |
| 137 void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); | 147 void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 138 | 148 |
| 139 EchoCancellationImpl* echo_cancellation_; | 149 EchoCancellationImpl* echo_cancellation_; |
| 140 EchoControlMobileImpl* echo_control_mobile_; | 150 EchoControlMobileImpl* echo_control_mobile_; |
| 141 GainControlImpl* gain_control_; | 151 GainControlImpl* gain_control_; |
| 142 HighPassFilterImpl* high_pass_filter_; | 152 HighPassFilterImpl* high_pass_filter_; |
| 143 LevelEstimatorImpl* level_estimator_; | 153 LevelEstimatorImpl* level_estimator_; |
| 144 NoiseSuppressionImpl* noise_suppression_; | 154 NoiseSuppressionImpl* noise_suppression_; |
| 145 VoiceDetectionImpl* voice_detection_; | 155 VoiceDetectionImpl* voice_detection_; |
| 146 rtc::scoped_ptr<GainControlForNewAgc> gain_control_for_new_agc_; | 156 rtc::scoped_ptr<GainControlForNewAgc> gain_control_for_new_agc_; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 184 // Only set through the constructor's Config parameter. | 194 // Only set through the constructor's Config parameter. |
| 185 const bool use_new_agc_; | 195 const bool use_new_agc_; |
| 186 rtc::scoped_ptr<AgcManagerDirect> agc_manager_ GUARDED_BY(crit_); | 196 rtc::scoped_ptr<AgcManagerDirect> agc_manager_ GUARDED_BY(crit_); |
| 187 int agc_startup_min_volume_; | 197 int agc_startup_min_volume_; |
| 188 | 198 |
| 189 bool transient_suppressor_enabled_; | 199 bool transient_suppressor_enabled_; |
| 190 rtc::scoped_ptr<TransientSuppressor> transient_suppressor_; | 200 rtc::scoped_ptr<TransientSuppressor> transient_suppressor_; |
| 191 const bool beamformer_enabled_; | 201 const bool beamformer_enabled_; |
| 192 rtc::scoped_ptr<Beamformer<float>> beamformer_; | 202 rtc::scoped_ptr<Beamformer<float>> beamformer_; |
| 193 const std::vector<Point> array_geometry_; | 203 const std::vector<Point> array_geometry_; |
| 204 | |
| 205 bool intelligibility_enabled_; | |
| 206 rtc::scoped_ptr<IntelligibilityEnhancer> intelligibility_enhancer_; | |
| 194 }; | 207 }; |
| 195 | 208 |
| 196 } // namespace webrtc | 209 } // namespace webrtc |
| 197 | 210 |
| 198 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ | 211 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_PROCESSING_IMPL_H_ |
| OLD | NEW |