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

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

Issue 2685573003: Be less pessimistic about turning "default" receive streams into signaled streams. (Closed)
Patch Set: Created 3 years, 10 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 | no next file » | 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 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 if (!ValidateStreamParams(sp)) { 2265 if (!ValidateStreamParams(sp)) {
2266 return false; 2266 return false;
2267 } 2267 }
2268 2268
2269 const uint32_t ssrc = sp.first_ssrc(); 2269 const uint32_t ssrc = sp.first_ssrc();
2270 if (ssrc == 0) { 2270 if (ssrc == 0) {
2271 LOG(LS_WARNING) << "AddRecvStream with ssrc==0 is not supported."; 2271 LOG(LS_WARNING) << "AddRecvStream with ssrc==0 is not supported.";
2272 return false; 2272 return false;
2273 } 2273 }
2274 2274
2275 // Remove the default receive stream if one had been created with this ssrc; 2275 // If the default receive stream was created with this ssrc, just unmark it as
2276 // we'll recreate it then. 2276 // being the default stream.
2277 if (IsDefaultRecvStream(ssrc)) { 2277 if (IsDefaultRecvStream(ssrc)) {
2278 RemoveRecvStream(ssrc); 2278 default_recv_ssrc_ = -1;
Taylor Brandstetter 2017/02/08 17:49:33 If you do this, does the default stream get sp.syn
2279 return true;
2279 } 2280 }
2280 2281
2281 if (GetReceiveChannelId(ssrc) != -1) { 2282 if (GetReceiveChannelId(ssrc) != -1) {
2282 LOG(LS_ERROR) << "Stream already exists with ssrc " << ssrc; 2283 LOG(LS_ERROR) << "Stream already exists with ssrc " << ssrc;
2283 return false; 2284 return false;
2284 } 2285 }
2285 2286
2286 // Create a new channel for receiving audio data. 2287 // Create a new channel for receiving audio data.
2287 const int channel = CreateVoEChannel(); 2288 const int channel = CreateVoEChannel();
2288 if (channel == -1) { 2289 if (channel == -1) {
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
2719 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread()); 2720 RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
2720 const auto it = send_streams_.find(ssrc); 2721 const auto it = send_streams_.find(ssrc);
2721 if (it != send_streams_.end()) { 2722 if (it != send_streams_.end()) {
2722 return it->second->channel(); 2723 return it->second->channel();
2723 } 2724 }
2724 return -1; 2725 return -1;
2725 } 2726 }
2726 } // namespace cricket 2727 } // namespace cricket
2727 2728
2728 #endif // HAVE_WEBRTC_VOICE 2729 #endif // HAVE_WEBRTC_VOICE
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698