Index: webrtc/audio/audio_receive_stream.cc |
diff --git a/webrtc/audio/audio_receive_stream.cc b/webrtc/audio/audio_receive_stream.cc |
index cc30939b92134af837ce91d76ec350d5ce570258..e2f8f148365dc466d994f7870d747a39c9e56ef8 100644 |
--- a/webrtc/audio/audio_receive_stream.cc |
+++ b/webrtc/audio/audio_receive_stream.cc |
@@ -14,6 +14,7 @@ |
#include <utility> |
#include "webrtc/api/call/audio_sink.h" |
+#include "webrtc/audio/audio_send_stream.h" |
#include "webrtc/audio/audio_state.h" |
#include "webrtc/audio/conversion.h" |
#include "webrtc/base/checks.h" |
@@ -143,6 +144,7 @@ AudioReceiveStream::~AudioReceiveStream() { |
RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString(); |
Stop(); |
+ channel_proxy_->DisassociateSendChannel(); |
channel_proxy_->DeRegisterExternalTransport(); |
channel_proxy_->ResetCongestionControlObjects(); |
channel_proxy_->SetRtcEventLog(nullptr); |
@@ -230,6 +232,18 @@ const webrtc::AudioReceiveStream::Config& AudioReceiveStream::config() const { |
return config_; |
} |
+void AudioReceiveStream::AssociateSendStream(AudioSendStream* send_stream) { |
+ RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
+ if (send_stream) { |
+ VoiceEngineImpl* voe_impl = static_cast<VoiceEngineImpl*>(voice_engine()); |
+ std::unique_ptr<voe::ChannelProxy> send_channel_proxy = |
+ voe_impl->GetChannelProxy(send_stream->config().voe_channel_id); |
+ channel_proxy_->AssociateSendChannel(*send_channel_proxy.get()); |
+ } else { |
+ channel_proxy_->DisassociateSendChannel(); |
+ } |
+} |
+ |
void AudioReceiveStream::SignalNetworkState(NetworkState state) { |
RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
} |