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

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

Issue 2653883002: Set the start bitrate to the delay-based BWE. (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 | webrtc/call/rampup_tests.h » ('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) 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 this, 296 this,
297 &remb_, 297 &remb_,
298 event_log_, 298 event_log_,
299 &packet_router_)), 299 &packet_router_)),
300 video_send_delay_stats_(new SendDelayStats(clock_)), 300 video_send_delay_stats_(new SendDelayStats(clock_)),
301 start_ms_(clock_->TimeInMilliseconds()), 301 start_ms_(clock_->TimeInMilliseconds()),
302 worker_queue_("call_worker_queue") { 302 worker_queue_("call_worker_queue") {
303 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 303 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
304 RTC_DCHECK(config.event_log != nullptr); 304 RTC_DCHECK(config.event_log != nullptr);
305 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0); 305 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
306 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps, 306 RTC_DCHECK_GT(config.bitrate_config.start_bitrate_bps,
307 config.bitrate_config.min_bitrate_bps); 307 config.bitrate_config.min_bitrate_bps);
308 if (config.bitrate_config.max_bitrate_bps != -1) { 308 if (config.bitrate_config.max_bitrate_bps != -1) {
309 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps, 309 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps,
310 config.bitrate_config.start_bitrate_bps); 310 config.bitrate_config.start_bitrate_bps);
311 } 311 }
312 Trace::CreateTrace(); 312 Trace::CreateTrace();
313 call_stats_->RegisterStatsObserver(congestion_controller_.get()); 313 call_stats_->RegisterStatsObserver(congestion_controller_.get());
314 314
315 congestion_controller_->SignalNetworkState(kNetworkDown); 315 congestion_controller_->SignalNetworkState(kNetworkDown);
316 congestion_controller_->SetBweBitrates( 316 congestion_controller_->SetBweBitrates(
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 bitrate_config.max_bitrate_bps) { 802 bitrate_config.max_bitrate_bps) {
803 // Nothing new to set, early abort to avoid encoder reconfigurations. 803 // Nothing new to set, early abort to avoid encoder reconfigurations.
804 return; 804 return;
805 } 805 }
806 config_.bitrate_config.min_bitrate_bps = bitrate_config.min_bitrate_bps; 806 config_.bitrate_config.min_bitrate_bps = bitrate_config.min_bitrate_bps;
807 // Start bitrate of -1 means we should keep the old bitrate, which there is 807 // Start bitrate of -1 means we should keep the old bitrate, which there is
808 // no point in remembering for the future. 808 // no point in remembering for the future.
809 if (bitrate_config.start_bitrate_bps > 0) 809 if (bitrate_config.start_bitrate_bps > 0)
810 config_.bitrate_config.start_bitrate_bps = bitrate_config.start_bitrate_bps; 810 config_.bitrate_config.start_bitrate_bps = bitrate_config.start_bitrate_bps;
811 config_.bitrate_config.max_bitrate_bps = bitrate_config.max_bitrate_bps; 811 config_.bitrate_config.max_bitrate_bps = bitrate_config.max_bitrate_bps;
812 RTC_DCHECK_NE(bitrate_config.start_bitrate_bps, 0);
812 congestion_controller_->SetBweBitrates(bitrate_config.min_bitrate_bps, 813 congestion_controller_->SetBweBitrates(bitrate_config.min_bitrate_bps,
813 bitrate_config.start_bitrate_bps, 814 bitrate_config.start_bitrate_bps,
814 bitrate_config.max_bitrate_bps); 815 bitrate_config.max_bitrate_bps);
815 } 816 }
816 817
817 void Call::SignalChannelNetworkState(MediaType media, NetworkState state) { 818 void Call::SignalChannelNetworkState(MediaType media, NetworkState state) {
818 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 819 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
819 switch (media) { 820 switch (media) {
820 case MediaType::AUDIO: 821 case MediaType::AUDIO:
821 audio_network_state_ = state; 822 audio_network_state_ = state;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 if (kv->second != network_route) { 899 if (kv->second != network_route) {
899 kv->second = network_route; 900 kv->second = network_route;
900 LOG(LS_INFO) << "Network route changed on transport " << transport_name 901 LOG(LS_INFO) << "Network route changed on transport " << transport_name
901 << ": new local network id " << network_route.local_network_id 902 << ": new local network id " << network_route.local_network_id
902 << " new remote network id " << network_route.remote_network_id 903 << " new remote network id " << network_route.remote_network_id
903 << " Reset bitrates to min: " 904 << " Reset bitrates to min: "
904 << config_.bitrate_config.min_bitrate_bps 905 << config_.bitrate_config.min_bitrate_bps
905 << " bps, start: " << config_.bitrate_config.start_bitrate_bps 906 << " bps, start: " << config_.bitrate_config.start_bitrate_bps
906 << " bps, max: " << config_.bitrate_config.start_bitrate_bps 907 << " bps, max: " << config_.bitrate_config.start_bitrate_bps
907 << " bps."; 908 << " bps.";
909 RTC_DCHECK_GT(config_.bitrate_config.start_bitrate_bps, 0);
908 congestion_controller_->ResetBweAndBitrates( 910 congestion_controller_->ResetBweAndBitrates(
909 config_.bitrate_config.start_bitrate_bps, 911 config_.bitrate_config.start_bitrate_bps,
910 config_.bitrate_config.min_bitrate_bps, 912 config_.bitrate_config.min_bitrate_bps,
911 config_.bitrate_config.max_bitrate_bps); 913 config_.bitrate_config.max_bitrate_bps);
912 } 914 }
913 } 915 }
914 916
915 void Call::UpdateAggregateNetworkState() { 917 void Call::UpdateAggregateNetworkState() {
916 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 918 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
917 919
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 1201
1200 void Call::NotifyBweOfReceivedPacket(const RtpPacketReceived& packet) { 1202 void Call::NotifyBweOfReceivedPacket(const RtpPacketReceived& packet) {
1201 RTPHeader header; 1203 RTPHeader header;
1202 packet.GetHeader(&header); 1204 packet.GetHeader(&header);
1203 congestion_controller_->OnReceivedPacket(packet.arrival_time_ms(), 1205 congestion_controller_->OnReceivedPacket(packet.arrival_time_ms(),
1204 packet.payload_size(), header); 1206 packet.payload_size(), header);
1205 } 1207 }
1206 1208
1207 } // namespace internal 1209 } // namespace internal
1208 } // namespace webrtc 1210 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/call/rampup_tests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698