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

Side by Side Diff: webrtc/call/call.cc

Issue 2243823002: Added ProbeBitrate(bitrate_bps, num_probes) to BitrateProber. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Clean up api Created 4 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 stats.max_padding_bitrate_bps = configured_max_padding_bitrate_bps_; 586 stats.max_padding_bitrate_bps = configured_max_padding_bitrate_bps_;
587 } 587 }
588 return stats; 588 return stats;
589 } 589 }
590 590
591 void Call::SetBitrateConfig( 591 void Call::SetBitrateConfig(
592 const webrtc::Call::Config::BitrateConfig& bitrate_config) { 592 const webrtc::Call::Config::BitrateConfig& bitrate_config) {
593 TRACE_EVENT0("webrtc", "Call::SetBitrateConfig"); 593 TRACE_EVENT0("webrtc", "Call::SetBitrateConfig");
594 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 594 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
595 RTC_DCHECK_GE(bitrate_config.min_bitrate_bps, 0); 595 RTC_DCHECK_GE(bitrate_config.min_bitrate_bps, 0);
596 if (bitrate_config.max_bitrate_bps != -1) 596 if (bitrate_config.max_bitrate_bps < -1)
597 RTC_DCHECK_GT(bitrate_config.max_bitrate_bps, 0); 597 return;
stefan-webrtc 2016/08/12 13:19:58 Is there a reason not to DCHECK?
philipel 2016/08/12 14:08:06 Thought this might be user input, but i haven't lo
598 if (config_.bitrate_config.min_bitrate_bps == 598 if (config_.bitrate_config.min_bitrate_bps ==
599 bitrate_config.min_bitrate_bps && 599 bitrate_config.min_bitrate_bps &&
600 (bitrate_config.start_bitrate_bps <= 0 || 600 (bitrate_config.start_bitrate_bps <= 0 ||
601 config_.bitrate_config.start_bitrate_bps == 601 config_.bitrate_config.start_bitrate_bps ==
602 bitrate_config.start_bitrate_bps) && 602 bitrate_config.start_bitrate_bps) &&
603 config_.bitrate_config.max_bitrate_bps == 603 config_.bitrate_config.max_bitrate_bps ==
604 bitrate_config.max_bitrate_bps) { 604 bitrate_config.max_bitrate_bps) {
605 // Nothing new to set, early abort to avoid encoder reconfigurations. 605 // Nothing new to set, early abort to avoid encoder reconfigurations.
606 return; 606 return;
607 } 607 }
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 // thread. Then this check can be enabled. 901 // thread. Then this check can be enabled.
902 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); 902 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread());
903 if (RtpHeaderParser::IsRtcp(packet, length)) 903 if (RtpHeaderParser::IsRtcp(packet, length))
904 return DeliverRtcp(media_type, packet, length); 904 return DeliverRtcp(media_type, packet, length);
905 905
906 return DeliverRtp(media_type, packet, length, packet_time); 906 return DeliverRtp(media_type, packet, length, packet_time);
907 } 907 }
908 908
909 } // namespace internal 909 } // namespace internal
910 } // namespace webrtc 910 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/pacing/bitrate_prober.h » ('j') | webrtc/modules/pacing/bitrate_prober.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698