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

Unified Diff: webrtc/audio/audio_receive_stream.cc

Issue 1403363003: Move VoiceEngineObserver into AudioSendStream so that we detect typing noises and return properly i… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: missing file 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/audio/audio_receive_stream.cc
diff --git a/webrtc/audio/audio_receive_stream.cc b/webrtc/audio/audio_receive_stream.cc
index 34197c3ff7fd011b02864e91dc9c6e29d425753f..4621f7ed9ebcfa087055f1774f671293fa5feb64 100644
--- a/webrtc/audio/audio_receive_stream.cc
+++ b/webrtc/audio/audio_receive_stream.cc
@@ -12,6 +12,7 @@
#include <string>
+#include "webrtc/audio/audio_state.h"
#include "webrtc/audio/conversion.h"
#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
@@ -62,17 +63,16 @@ namespace internal {
AudioReceiveStream::AudioReceiveStream(
RemoteBitrateEstimator* remote_bitrate_estimator,
const webrtc::AudioReceiveStream::Config& config,
- VoiceEngine* voice_engine)
+ AudioState* audio_state)
: remote_bitrate_estimator_(remote_bitrate_estimator),
config_(config),
- voice_engine_(voice_engine),
- voe_base_(voice_engine),
+ audio_state_(audio_state),
rtp_header_parser_(RtpHeaderParser::Create()) {
LOG(LS_INFO) << "AudioReceiveStream: " << config_.ToString();
- RTC_DCHECK(config.voe_channel_id != -1);
- RTC_DCHECK(remote_bitrate_estimator_ != nullptr);
- RTC_DCHECK(voice_engine_ != nullptr);
- RTC_DCHECK(rtp_header_parser_ != nullptr);
+ RTC_DCHECK_NE(config_.voe_channel_id, -1);
+ RTC_DCHECK(remote_bitrate_estimator_);
+ RTC_DCHECK(audio_state_);
+ RTC_DCHECK(rtp_header_parser_);
for (const auto& ext : config.rtp.extensions) {
// One-byte-extension local identifiers are in the range 1-14 inclusive.
RTC_DCHECK_GE(ext.id, 1);
@@ -101,11 +101,12 @@ webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const {
RTC_DCHECK(thread_checker_.CalledOnValidThread());
webrtc::AudioReceiveStream::Stats stats;
stats.remote_ssrc = config_.rtp.remote_ssrc;
- ScopedVoEInterface<VoECodec> codec(voice_engine_);
- ScopedVoEInterface<VoENetEqStats> neteq(voice_engine_);
- ScopedVoEInterface<VoERTP_RTCP> rtp(voice_engine_);
- ScopedVoEInterface<VoEVideoSync> sync(voice_engine_);
- ScopedVoEInterface<VoEVolumeControl> volume(voice_engine_);
+ VoiceEngine* voice_engine = audio_state_->voice_engine();
+ ScopedVoEInterface<VoECodec> codec(voice_engine);
+ ScopedVoEInterface<VoENetEqStats> neteq(voice_engine);
+ ScopedVoEInterface<VoERTP_RTCP> rtp(voice_engine);
+ ScopedVoEInterface<VoEVideoSync> sync(voice_engine);
+ ScopedVoEInterface<VoEVolumeControl> volume(voice_engine);
unsigned int ssrc = 0;
webrtc::CallStatistics call_stats = {0};
webrtc::CodecInst codec_inst = {0};

Powered by Google App Engine
This is Rietveld 408576698