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

Unified Diff: webrtc/audio/audio_receive_stream.cc

Issue 2461523002: Remove usage of VoEBase::AssociateSendChannel() from WVoMC. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « webrtc/audio/audio_receive_stream.h ('k') | webrtc/audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698