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

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

Issue 2504783002: Revert of Start probes only after network is connected. (Closed)
Patch Set: Created 4 years, 1 month 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 | « webrtc/call/bitrate_allocator.cc ('k') | webrtc/media/base/videoengine_unittest.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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 namespace internal { 245 namespace internal {
246 246
247 Call::Call(const Call::Config& config) 247 Call::Call(const Call::Config& config)
248 : clock_(Clock::GetRealTimeClock()), 248 : clock_(Clock::GetRealTimeClock()),
249 num_cpu_cores_(CpuInfo::DetectNumberOfCores()), 249 num_cpu_cores_(CpuInfo::DetectNumberOfCores()),
250 module_process_thread_(ProcessThread::Create("ModuleProcessThread")), 250 module_process_thread_(ProcessThread::Create("ModuleProcessThread")),
251 pacer_thread_(ProcessThread::Create("PacerThread")), 251 pacer_thread_(ProcessThread::Create("PacerThread")),
252 call_stats_(new CallStats(clock_)), 252 call_stats_(new CallStats(clock_)),
253 bitrate_allocator_(new BitrateAllocator(this)), 253 bitrate_allocator_(new BitrateAllocator(this)),
254 config_(config), 254 config_(config),
255 audio_network_state_(kNetworkDown), 255 audio_network_state_(kNetworkUp),
256 video_network_state_(kNetworkDown), 256 video_network_state_(kNetworkUp),
257 receive_crit_(RWLockWrapper::CreateRWLock()), 257 receive_crit_(RWLockWrapper::CreateRWLock()),
258 send_crit_(RWLockWrapper::CreateRWLock()), 258 send_crit_(RWLockWrapper::CreateRWLock()),
259 event_log_(config.event_log), 259 event_log_(config.event_log),
260 first_packet_sent_ms_(-1), 260 first_packet_sent_ms_(-1),
261 received_bytes_per_second_counter_(clock_, nullptr, true), 261 received_bytes_per_second_counter_(clock_, nullptr, true),
262 received_audio_bytes_per_second_counter_(clock_, nullptr, true), 262 received_audio_bytes_per_second_counter_(clock_, nullptr, true),
263 received_video_bytes_per_second_counter_(clock_, nullptr, true), 263 received_video_bytes_per_second_counter_(clock_, nullptr, true),
264 received_rtcp_bytes_per_second_counter_(clock_, nullptr, true), 264 received_rtcp_bytes_per_second_counter_(clock_, nullptr, true),
265 min_allocated_send_bitrate_bps_(0), 265 min_allocated_send_bitrate_bps_(0),
266 configured_max_padding_bitrate_bps_(0), 266 configured_max_padding_bitrate_bps_(0),
(...skipping 10 matching lines...) Expand all
277 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0); 277 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
278 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps, 278 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps,
279 config.bitrate_config.min_bitrate_bps); 279 config.bitrate_config.min_bitrate_bps);
280 if (config.bitrate_config.max_bitrate_bps != -1) { 280 if (config.bitrate_config.max_bitrate_bps != -1) {
281 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps, 281 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps,
282 config.bitrate_config.start_bitrate_bps); 282 config.bitrate_config.start_bitrate_bps);
283 } 283 }
284 Trace::CreateTrace(); 284 Trace::CreateTrace();
285 call_stats_->RegisterStatsObserver(congestion_controller_.get()); 285 call_stats_->RegisterStatsObserver(congestion_controller_.get());
286 286
287 congestion_controller_->SignalNetworkState(kNetworkDown);
288 congestion_controller_->SetBweBitrates( 287 congestion_controller_->SetBweBitrates(
289 config_.bitrate_config.min_bitrate_bps, 288 config_.bitrate_config.min_bitrate_bps,
290 config_.bitrate_config.start_bitrate_bps, 289 config_.bitrate_config.start_bitrate_bps,
291 config_.bitrate_config.max_bitrate_bps); 290 config_.bitrate_config.max_bitrate_bps);
292 291
293 module_process_thread_->Start(); 292 module_process_thread_->Start();
294 module_process_thread_->RegisterModule(call_stats_.get()); 293 module_process_thread_->RegisterModule(call_stats_.get());
295 module_process_thread_->RegisterModule(congestion_controller_.get()); 294 module_process_thread_->RegisterModule(congestion_controller_.get());
296 pacer_thread_->RegisterModule(congestion_controller_->pacer()); 295 pacer_thread_->RegisterModule(congestion_controller_->pacer());
297 pacer_thread_->RegisterModule( 296 pacer_thread_->RegisterModule(
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); 1099 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]);
1101 ReadLockScoped read_lock(*receive_crit_); 1100 ReadLockScoped read_lock(*receive_crit_);
1102 auto it = video_receive_ssrcs_.find(ssrc); 1101 auto it = video_receive_ssrcs_.find(ssrc);
1103 if (it == video_receive_ssrcs_.end()) 1102 if (it == video_receive_ssrcs_.end())
1104 return false; 1103 return false;
1105 return it->second->OnRecoveredPacket(packet, length); 1104 return it->second->OnRecoveredPacket(packet, length);
1106 } 1105 }
1107 1106
1108 } // namespace internal 1107 } // namespace internal
1109 } // namespace webrtc 1108 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/bitrate_allocator.cc ('k') | webrtc/media/base/videoengine_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698