Index: webrtc/modules/audio_processing/audio_processing_impl.h |
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h |
index 87e2224bbff89f981bc245986b2151c3bb747fd7..a31a6cc21498304a79eb3d89a27e80753fdf90da 100644 |
--- a/webrtc/modules/audio_processing/audio_processing_impl.h |
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h |
@@ -127,6 +127,7 @@ class AudioProcessingImpl : public AudioProcessing { |
EXCLUSIVE_LOCKS_REQUIRED(crit_render_, crit_capture_); |
private: |
+ class ApmSubmoduleStates; |
hlundin-webrtc
2016/09/06 10:41:32
I'm not fond of forward-declaring private subclass
peah-webrtc
2016/09/07 06:28:11
Done.
|
struct ApmPublicSubmodules; |
struct ApmPrivateSubmodules; |
@@ -160,21 +161,19 @@ class AudioProcessingImpl : public AudioProcessing { |
// that the capture thread blocks the render thread. |
// The struct is modified in a single-threaded manner by holding both the |
// render and capture locks. |
- int MaybeInitialize(const ProcessingConfig& config) |
+ int MaybeInitialize(const ProcessingConfig& config, bool force_initialization) |
EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
int MaybeInitializeRender(const ProcessingConfig& processing_config) |
EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
- int MaybeInitializeCapture(const ProcessingConfig& processing_config) |
+ int MaybeInitializeCapture(const ProcessingConfig& processing_config, |
+ bool force_initialization) |
EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
- // Method for checking for the need of conversion. Accesses the formats |
- // structs in a read manner but the requirement for the render lock to be held |
- // was added as it currently anyway is always called in that manner. |
- bool rev_conversion_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
- bool render_check_rev_conversion_needed() const |
- EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
+ // Method for updating the state keeping track of the active submodules. |
+ // Returns a bool indicating whether the state had changed. |
+ bool UpdateActiveSubmoduleStates() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
// Methods requiring APM running in a single-threaded manner. |
// Are called with both the render and capture locks already |
@@ -208,10 +207,6 @@ class AudioProcessingImpl : public AudioProcessing { |
// Capture-side exclusive methods possibly running APM in a multi-threaded |
// manner that are called with the render lock already acquired. |
int ProcessStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
- bool output_copy_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
- bool is_fwd_processed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
- bool fwd_synthesis_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
- bool fwd_analysis_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
void MaybeUpdateHistograms() EXCLUSIVE_LOCKS_REQUIRED(crit_capture_); |
// Render-side exclusive methods possibly running APM in a multi-threaded |
@@ -221,9 +216,6 @@ class AudioProcessingImpl : public AudioProcessing { |
const StreamConfig& input_config, |
const StreamConfig& output_config) |
EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
- bool is_rev_processed() const EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
- bool rev_synthesis_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
- bool rev_analysis_needed() const EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
int ProcessReverseStreamLocked() EXCLUSIVE_LOCKS_REQUIRED(crit_render_); |
// Debug dump methods that are internal and called without locks. |
@@ -254,6 +246,9 @@ class AudioProcessingImpl : public AudioProcessing { |
rtc::CriticalSection crit_render_ ACQUIRED_BEFORE(crit_capture_); |
rtc::CriticalSection crit_capture_; |
+ // Class containing information about what submodules are active. |
+ std::unique_ptr<ApmSubmoduleStates> submodule_states_; |
hlundin-webrtc
2016/09/06 10:41:32
As said above, don't use std::unique_ptr. Let it b
peah-webrtc
2016/09/07 06:28:11
Sounds good!
Done.
|
+ |
// Structs containing the pointers to the submodules. |
std::unique_ptr<ApmPublicSubmodules> public_submodules_; |
std::unique_ptr<ApmPrivateSubmodules> private_submodules_ |