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

Unified Diff: webrtc/modules/audio_processing/gain_control_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: 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/gain_control_impl.h
diff --git a/webrtc/modules/audio_processing/gain_control_impl.h b/webrtc/modules/audio_processing/gain_control_impl.h
index 898683b07bad6e56214624c1469fa85030771c79..3deaf1078611f2734516cd806735472eddcdc2dd 100644
--- a/webrtc/modules/audio_processing/gain_control_impl.h
+++ b/webrtc/modules/audio_processing/gain_control_impl.h
@@ -13,6 +13,7 @@
#include <vector>
+#include "webrtc/base/criticalsection.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_checker.h"
#include "webrtc/common_audio/swap_queue.h"
@@ -49,7 +50,8 @@ class GainControlImpl : public GainControl,
public ProcessingComponent {
public:
GainControlImpl(const AudioProcessing* apm,
- CriticalSectionWrapper* crit,
+ rtc::CriticalSection* crit_render,
+ rtc::CriticalSection* crit_capture,
rtc::ThreadChecker* render_thread,
rtc::ThreadChecker* capture_thread);
virtual ~GainControlImpl();
@@ -102,7 +104,9 @@ class GainControlImpl : public GainControl,
void AllocateRenderQueue();
const AudioProcessing* apm_;
- CriticalSectionWrapper* crit_;
+ rtc::CriticalSection* const crit_render_;
+ rtc::CriticalSection* const crit_capture_;
+ rtc::CriticalSection crit_queue_;
kwiberg-webrtc 2015/10/27 13:15:57 What do you use crit_queue_ for?
peah-webrtc 2015/11/05 11:47:58 Good find! That is a leftover from a fix for a pro
const rtc::ThreadChecker* const render_thread_;
const rtc::ThreadChecker* const capture_thread_;
Mode mode_;

Powered by Google App Engine
This is Rietveld 408576698