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

Unified Diff: webrtc/modules/audio_processing/noise_suppression_impl.h

Issue 1424663003: Lock scheme #8: Introduced the new locking scheme (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@add_threadcheckers_CL
Patch Set: Merged changes from Lock scheme #9: WIP:Adding lock and thread annotations to the APM submodules in… Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/noise_suppression_impl.h
diff --git a/webrtc/modules/audio_processing/noise_suppression_impl.h b/webrtc/modules/audio_processing/noise_suppression_impl.h
index 76a39b8e09cfc4ea0690464798091a6f7b90d2eb..e83d9f4a8a29b6be8c90f0814d788e3a07dc78c2 100644
--- a/webrtc/modules/audio_processing/noise_suppression_impl.h
+++ b/webrtc/modules/audio_processing/noise_suppression_impl.h
@@ -11,19 +11,19 @@
#ifndef WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
#define WEBRTC_MODULES_AUDIO_PROCESSING_NOISE_SUPPRESSION_IMPL_H_
+#include "webrtc/base/criticalsection.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/audio_processing/processing_component.h"
namespace webrtc {
class AudioBuffer;
-class CriticalSectionWrapper;
class NoiseSuppressionImpl : public NoiseSuppression,
public ProcessingComponent {
public:
NoiseSuppressionImpl(const AudioProcessing* apm,
- CriticalSectionWrapper* crit);
+ rtc::CriticalSection* crit);
virtual ~NoiseSuppressionImpl();
int AnalyzeCaptureAudio(AudioBuffer* audio);
@@ -47,9 +47,12 @@ class NoiseSuppressionImpl : public NoiseSuppression,
int num_handles_required() const override;
int GetHandleError(void* handle) const override;
+ // Not guarded as its public API is thread safe.
const AudioProcessing* apm_;
- CriticalSectionWrapper* crit_;
- Level level_;
+
+ rtc::CriticalSection* const crit_;
+
+ Level level_ GUARDED_BY(crit_);
};
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698