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

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

Issue 1891163002: Fix bug causing audio to stop being sent when AudioSendStreams are recreated. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@51
Patch Set: 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 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 const std::vector<webrtc::RtpExtension>& extensions) { 1109 const std::vector<webrtc::RtpExtension>& extensions) {
1110 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1110 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1111 if (stream_) { 1111 if (stream_) {
1112 call_->DestroyAudioSendStream(stream_); 1112 call_->DestroyAudioSendStream(stream_);
1113 stream_ = nullptr; 1113 stream_ = nullptr;
1114 } 1114 }
1115 config_.rtp.extensions = extensions; 1115 config_.rtp.extensions = extensions;
1116 RTC_DCHECK(!stream_); 1116 RTC_DCHECK(!stream_);
1117 stream_ = call_->CreateAudioSendStream(config_); 1117 stream_ = call_->CreateAudioSendStream(config_);
1118 RTC_CHECK(stream_); 1118 RTC_CHECK(stream_);
1119 UpdateSendState();
1119 } 1120 }
1120 1121
1121 bool SendTelephoneEvent(int payload_type, int event, int duration_ms) { 1122 bool SendTelephoneEvent(int payload_type, int event, int duration_ms) {
1122 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1123 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
1123 RTC_DCHECK(stream_); 1124 RTC_DCHECK(stream_);
1124 return stream_->SendTelephoneEvent(payload_type, event, duration_ms); 1125 return stream_->SendTelephoneEvent(payload_type, event, duration_ms);
1125 } 1126 }
1126 1127
1127 void SetSend(bool send) { 1128 void SetSend(bool send) {
1128 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 1129 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 } 2493 }
2493 } else { 2494 } else {
2494 LOG(LS_INFO) << "Stopping playout for channel #" << channel; 2495 LOG(LS_INFO) << "Stopping playout for channel #" << channel;
2495 engine()->voe()->base()->StopPlayout(channel); 2496 engine()->voe()->base()->StopPlayout(channel);
2496 } 2497 }
2497 return true; 2498 return true;
2498 } 2499 }
2499 } // namespace cricket 2500 } // namespace cricket
2500 2501
2501 #endif // HAVE_WEBRTC_VOICE 2502 #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