| 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};
|
|
|