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

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

Issue 2806163003: Fix two invalid DCHECKs related to audio BWE. (Closed)
Patch Set: Add comment. Created 3 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/call/call.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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // calls on the worker thread. We should move towards always using a network 239 // calls on the worker thread. We should move towards always using a network
240 // thread. Then this check can be enabled. 240 // thread. Then this check can be enabled.
241 // RTC_DCHECK(!worker_thread_checker_.CalledOnValidThread()); 241 // RTC_DCHECK(!worker_thread_checker_.CalledOnValidThread());
242 return channel_proxy_->ReceivedRTCPPacket(packet, length); 242 return channel_proxy_->ReceivedRTCPPacket(packet, length);
243 } 243 }
244 244
245 uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps, 245 uint32_t AudioSendStream::OnBitrateUpdated(uint32_t bitrate_bps,
246 uint8_t fraction_loss, 246 uint8_t fraction_loss,
247 int64_t rtt, 247 int64_t rtt,
248 int64_t probing_interval_ms) { 248 int64_t probing_interval_ms) {
249 // A send stream may be allocated a bitrate of zero if the allocator decides
250 // to disable it. For now we ignore this decision and keep sending on min
251 // bitrate.
252 if (bitrate_bps == 0) {
253 bitrate_bps = config_.min_bitrate_bps;
254 }
249 RTC_DCHECK_GE(bitrate_bps, 255 RTC_DCHECK_GE(bitrate_bps,
250 static_cast<uint32_t>(config_.min_bitrate_bps)); 256 static_cast<uint32_t>(config_.min_bitrate_bps));
251 // The bitrate allocator might allocate an higher than max configured bitrate 257 // The bitrate allocator might allocate an higher than max configured bitrate
252 // if there is room, to allow for, as example, extra FEC. Ignore that for now. 258 // if there is room, to allow for, as example, extra FEC. Ignore that for now.
253 const uint32_t max_bitrate_bps = config_.max_bitrate_bps; 259 const uint32_t max_bitrate_bps = config_.max_bitrate_bps;
254 if (bitrate_bps > max_bitrate_bps) 260 if (bitrate_bps > max_bitrate_bps)
255 bitrate_bps = max_bitrate_bps; 261 bitrate_bps = max_bitrate_bps;
256 262
257 channel_proxy_->SetBitrate(bitrate_bps, probing_interval_ms); 263 channel_proxy_->SetBitrate(bitrate_bps, probing_interval_ms);
258 264
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 LOG(LS_WARNING) << "SetVADStatus() failed."; 430 LOG(LS_WARNING) << "SetVADStatus() failed.";
425 return false; 431 return false;
426 } 432 }
427 } 433 }
428 } 434 }
429 return true; 435 return true;
430 } 436 }
431 437
432 } // namespace internal 438 } // namespace internal
433 } // namespace webrtc 439 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698