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

Side by Side Diff: webrtc/audio/audio_receive_stream.cc

Issue 2383143002: Restarting channel when swapping AudioReceiveStreams in WebrtcVoE. (Closed)
Patch Set: Minor changes in response to comments. Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 congestion_controller->packet_router()); 137 congestion_controller->packet_router());
138 if (UseSendSideBwe(config)) { 138 if (UseSendSideBwe(config)) {
139 remote_bitrate_estimator_ = 139 remote_bitrate_estimator_ =
140 congestion_controller->GetRemoteBitrateEstimator(true); 140 congestion_controller->GetRemoteBitrateEstimator(true);
141 } 141 }
142 } 142 }
143 143
144 AudioReceiveStream::~AudioReceiveStream() { 144 AudioReceiveStream::~AudioReceiveStream() {
145 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 145 RTC_DCHECK(thread_checker_.CalledOnValidThread());
146 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString(); 146 LOG(LS_INFO) << "~AudioReceiveStream: " << config_.ToString();
147 Stop();
147 channel_proxy_->DeRegisterExternalTransport(); 148 channel_proxy_->DeRegisterExternalTransport();
148 channel_proxy_->ResetCongestionControlObjects(); 149 channel_proxy_->ResetCongestionControlObjects();
149 channel_proxy_->SetRtcEventLog(nullptr); 150 channel_proxy_->SetRtcEventLog(nullptr);
150 if (remote_bitrate_estimator_) { 151 if (remote_bitrate_estimator_) {
151 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc); 152 remote_bitrate_estimator_->RemoveStream(config_.rtp.remote_ssrc);
152 } 153 }
153 } 154 }
154 155
155 void AudioReceiveStream::Start() { 156 void AudioReceiveStream::Start() {
156 RTC_DCHECK(thread_checker_.CalledOnValidThread()); 157 RTC_DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 274
274 VoiceEngine* AudioReceiveStream::voice_engine() const { 275 VoiceEngine* AudioReceiveStream::voice_engine() const {
275 internal::AudioState* audio_state = 276 internal::AudioState* audio_state =
276 static_cast<internal::AudioState*>(audio_state_.get()); 277 static_cast<internal::AudioState*>(audio_state_.get());
277 VoiceEngine* voice_engine = audio_state->voice_engine(); 278 VoiceEngine* voice_engine = audio_state->voice_engine();
278 RTC_DCHECK(voice_engine); 279 RTC_DCHECK(voice_engine);
279 return voice_engine; 280 return voice_engine;
280 } 281 }
281 } // namespace internal 282 } // namespace internal
282 } // namespace webrtc 283 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/audio/audio_receive_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698