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

Side by Side Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 1881793006: Fix bug causing audio to stop being sent when AudioSendStreams are recreated. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Better test case Created 4 years, 8 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/media/engine/webrtcvoiceengine_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) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 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 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 const std::vector<webrtc::RtpExtension>& extensions) { 1114 const std::vector<webrtc::RtpExtension>& extensions) {
1115 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1115 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1116 if (stream_) { 1116 if (stream_) {
1117 call_->DestroyAudioSendStream(stream_); 1117 call_->DestroyAudioSendStream(stream_);
1118 stream_ = nullptr; 1118 stream_ = nullptr;
1119 } 1119 }
1120 config_.rtp.extensions = extensions; 1120 config_.rtp.extensions = extensions;
1121 RTC_DCHECK(!stream_); 1121 RTC_DCHECK(!stream_);
1122 stream_ = call_->CreateAudioSendStream(config_); 1122 stream_ = call_->CreateAudioSendStream(config_);
1123 RTC_CHECK(stream_); 1123 RTC_CHECK(stream_);
1124 UpdateSendState();
1124 } 1125 }
1125 1126
1126 bool SendTelephoneEvent(int payload_type, int event, int duration_ms) { 1127 bool SendTelephoneEvent(int payload_type, int event, int duration_ms) {
1127 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1128 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1128 RTC_DCHECK(stream_); 1129 RTC_DCHECK(stream_);
1129 return stream_->SendTelephoneEvent(payload_type, event, duration_ms); 1130 return stream_->SendTelephoneEvent(payload_type, event, duration_ms);
1130 } 1131 }
1131 1132
1132 void SetSend(bool send) { 1133 void SetSend(bool send) {
1133 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1134 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after
2562 } 2563 }
2563 } else { 2564 } else {
2564 LOG(LS_INFO) << "Stopping playout for channel #" << channel; 2565 LOG(LS_INFO) << "Stopping playout for channel #" << channel;
2565 engine()->voe()->base()->StopPlayout(channel); 2566 engine()->voe()->base()->StopPlayout(channel);
2566 } 2567 }
2567 return true; 2568 return true;
2568 } 2569 }
2569 } // namespace cricket 2570 } // namespace cricket
2570 2571
2571 #endif // HAVE_WEBRTC_VOICE 2572 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvoiceengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698