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

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

Issue 1422013002: Preparational work for an upcoming addition of a threadchecking scheme for APM (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@bundling_of_state_CL
Patch Set: Fixed the conditional thread-checking scheme" 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/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 72dfbf419b27ee264d870c22ef5a71330ae4d7e0..76b640323dd89ecfe08b01a90b27e28e522755f5 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h
@@ -17,6 +17,7 @@
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_annotations.h"
+#include "webrtc/base/thread_checker.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
namespace webrtc {
@@ -122,6 +123,10 @@ class AudioProcessingImpl : public AudioProcessing {
private:
int InitializeLocked(const ProcessingConfig& config)
EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ int MaybeInitializeLockedRender(const ProcessingConfig& config)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ int MaybeInitializeLockedCapture(const ProcessingConfig& config)
+ EXCLUSIVE_LOCKS_REQUIRED(crit_);
int MaybeInitializeLocked(const ProcessingConfig& config)
EXCLUSIVE_LOCKS_REQUIRED(crit_);
// TODO(ekm): Remove once all clients updated to new interface.
@@ -137,6 +142,8 @@ class AudioProcessingImpl : public AudioProcessing {
bool analysis_needed(bool is_data_processed) const;
bool is_rev_processed() const;
bool rev_conversion_needed() const;
+ // TODO(peah): Add EXCLUSIVE_LOCKS_REQUIRED for the method below.
+ bool render_check_rev_conversion_needed() const;
void InitializeExperimentalAgc() EXCLUSIVE_LOCKS_REQUIRED(crit_);
void InitializeTransient() EXCLUSIVE_LOCKS_REQUIRED(crit_);
void InitializeBeamformer() EXCLUSIVE_LOCKS_REQUIRED(crit_);
@@ -154,6 +161,9 @@ class AudioProcessingImpl : public AudioProcessing {
std::list<ProcessingComponent*> component_list_;
CriticalSectionWrapper* crit_;
+ rtc::ThreadChecker render_thread_checker_;
+ rtc::ThreadChecker capture_thread_checker_;
+ rtc::ThreadChecker signal_thread_checker_;
rtc::scoped_ptr<AudioBuffer> render_audio_;
rtc::scoped_ptr<AudioBuffer> capture_audio_;
rtc::scoped_ptr<AudioConverter> render_converter_;

Powered by Google App Engine
This is Rietveld 408576698