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

Unified Diff: voice_engine/transmit_mixer.h

Issue 3019513002: Remove the VoiceEngineObserver callback interface. (Closed)
Patch Set: rebase + build error Created 3 years, 3 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
« no previous file with comments | « voice_engine/shared_data.cc ('k') | voice_engine/transmit_mixer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: voice_engine/transmit_mixer.h
diff --git a/voice_engine/transmit_mixer.h b/voice_engine/transmit_mixer.h
index a04f92b6bfc6428ffea511842ae6918092d7c68d..f26359553784f71010b521f7d07473d899216275 100644
--- a/voice_engine/transmit_mixer.h
+++ b/voice_engine/transmit_mixer.h
@@ -20,7 +20,6 @@
#include "rtc_base/criticalsection.h"
#include "voice_engine/audio_level.h"
#include "voice_engine/include/voe_base.h"
-#include "voice_engine/monitor_module.h"
#include "voice_engine/voice_engine_defines.h"
#if !defined(WEBRTC_ANDROID) && !defined(WEBRTC_IOS)
@@ -45,12 +44,9 @@ public:
static void Destroy(TransmitMixer*& mixer);
- int32_t SetEngineInformation(ProcessThread& processThread,
- Statistics& engineStatistics,
- ChannelManager& channelManager);
+ void SetEngineInformation(ChannelManager* channelManager);
- int32_t SetAudioProcessingModule(
- AudioProcessing* audioProcessingModule);
+ int32_t SetAudioProcessingModule(AudioProcessing* audioProcessingModule);
int32_t PrepareDemux(const void* audioSamples,
size_t nSamples,
@@ -82,25 +78,17 @@ public:
// 'virtual' to allow mocking.
virtual double GetTotalInputDuration() const;
- int32_t RegisterVoiceEngineObserver(VoiceEngineObserver& observer);
-
virtual ~TransmitMixer();
-#if WEBRTC_VOICE_ENGINE_TYPING_DETECTION
- // Periodic callback from the MonitorModule.
- void OnPeriodicProcess();
-#endif
-
// Virtual to allow mocking.
virtual void EnableStereoChannelSwapping(bool enable);
bool IsStereoChannelSwappingEnabled();
+ // Virtual to allow mocking.
+ virtual bool typing_noise_detected() const;
+
protected:
-#if WEBRTC_VOICE_ENGINE_TYPING_DETECTION
- TransmitMixer() : _monitorModule(this) {}
-#else
TransmitMixer() = default;
-#endif
private:
TransmitMixer(uint32_t instanceId);
@@ -118,31 +106,25 @@ private:
bool key_pressed);
#if WEBRTC_VOICE_ENGINE_TYPING_DETECTION
- void TypingDetection(bool keyPressed);
+ void TypingDetection(bool key_pressed);
#endif
// uses
- Statistics* _engineStatisticsPtr = nullptr;
ChannelManager* _channelManagerPtr = nullptr;
AudioProcessing* audioproc_ = nullptr;
- VoiceEngineObserver* _voiceEngineObserverPtr = nullptr;
- ProcessThread* _processThreadPtr = nullptr;
// owns
AudioFrame _audioFrame;
PushResampler<int16_t> resampler_; // ADM sample rate -> mixing rate
voe::AudioLevel _audioLevel;
- // protect file instances and their variables in MixedParticipants()
- rtc::CriticalSection _critSect;
- rtc::CriticalSection _callbackCritSect;
#if WEBRTC_VOICE_ENGINE_TYPING_DETECTION
- MonitorModule<TransmitMixer> _monitorModule;
- webrtc::TypingDetection _typingDetection;
- bool _typingNoiseWarningPending = false;
- bool _typingNoiseDetected = false;
+ webrtc::TypingDetection typing_detection_;
#endif
+ rtc::CriticalSection lock_;
+ bool typing_noise_detected_ RTC_GUARDED_BY(lock_) = false;
+
int _instanceId = 0;
uint32_t _captureLevel = 0;
bool stereo_codec_ = false;
« no previous file with comments | « voice_engine/shared_data.cc ('k') | voice_engine/transmit_mixer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698