| Index: webrtc/audio/audio_send_stream.cc
|
| diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
|
| index ccfdca546dcf5c9699b85f7745b21c4c2ade671f..08174f5e6bc339133d228a557056398575af4346 100644
|
| --- a/webrtc/audio/audio_send_stream.cc
|
| +++ b/webrtc/audio/audio_send_stream.cc
|
| @@ -13,6 +13,7 @@
|
| #include <string>
|
|
|
| #include "webrtc/audio/conversion.h"
|
| +#include "webrtc/audio/scoped_voe_interface.h"
|
| #include "webrtc/base/checks.h"
|
| #include "webrtc/base/logging.h"
|
| #include "webrtc/voice_engine/include/voe_audio_processing.h"
|
| @@ -48,19 +49,23 @@ std::string AudioSendStream::Config::ToString() const {
|
| }
|
|
|
| namespace internal {
|
| +
|
| +VoiceEngines AudioSendStream::gVoiceEngines;
|
| +
|
| AudioSendStream::AudioSendStream(const webrtc::AudioSendStream::Config& config,
|
| VoiceEngine* voice_engine)
|
| : config_(config),
|
| - voice_engine_(voice_engine),
|
| - voe_base_(voice_engine) {
|
| + voice_engine_(voice_engine) {
|
| LOG(LS_INFO) << "AudioSendStream: " << config_.ToString();
|
| RTC_DCHECK_NE(config.voe_channel_id, -1);
|
| RTC_DCHECK(voice_engine_);
|
| + gVoiceEngines.RegisterVoiceEngine(voice_engine);
|
| }
|
|
|
| AudioSendStream::~AudioSendStream() {
|
| RTC_DCHECK(thread_checker_.CalledOnValidThread());
|
| LOG(LS_INFO) << "~AudioSendStream: " << config_.ToString();
|
| + gVoiceEngines.DeregisterVoiceEngine(voice_engine_);
|
| }
|
|
|
| webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const {
|
| @@ -148,8 +153,8 @@ webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const {
|
| }
|
| }
|
|
|
| - // TODO(solenberg): Collect typing noise warnings here too!
|
| - // bool typing_noise_detected = typing_noise_detected_;
|
| + stats.typing_noise_detected =
|
| + gVoiceEngines.GetTypingNoiseDetected(voice_engine_);
|
|
|
| return stats;
|
| }
|
|
|