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

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

Issue 2777423002: Let Call register ReceiveSideCongestionController as CallStatsObserver. (Closed)
Patch Set: 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/modules/congestion_controller/include/receive_side_congestion_controller.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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps, 385 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps,
386 config.bitrate_config.start_bitrate_bps); 386 config.bitrate_config.start_bitrate_bps);
387 } 387 }
388 Trace::CreateTrace(); 388 Trace::CreateTrace();
389 transport_send_->InitCongestionControl(this); 389 transport_send_->InitCongestionControl(this);
390 transport_send_->send_side_cc()->SignalNetworkState(kNetworkDown); 390 transport_send_->send_side_cc()->SignalNetworkState(kNetworkDown);
391 transport_send_->send_side_cc()->SetBweBitrates( 391 transport_send_->send_side_cc()->SetBweBitrates(
392 config_.bitrate_config.min_bitrate_bps, 392 config_.bitrate_config.min_bitrate_bps,
393 config_.bitrate_config.start_bitrate_bps, 393 config_.bitrate_config.start_bitrate_bps,
394 config_.bitrate_config.max_bitrate_bps); 394 config_.bitrate_config.max_bitrate_bps);
395 call_stats_->RegisterStatsObserver(&receive_side_cc_);
395 call_stats_->RegisterStatsObserver(transport_send_->send_side_cc()); 396 call_stats_->RegisterStatsObserver(transport_send_->send_side_cc());
396 397
397 module_process_thread_->Start(); 398 module_process_thread_->Start();
398 module_process_thread_->RegisterModule(call_stats_.get(), RTC_FROM_HERE); 399 module_process_thread_->RegisterModule(call_stats_.get(), RTC_FROM_HERE);
399 module_process_thread_->RegisterModule(&receive_side_cc_, RTC_FROM_HERE); 400 module_process_thread_->RegisterModule(&receive_side_cc_, RTC_FROM_HERE);
400 module_process_thread_->RegisterModule(transport_send_->send_side_cc(), 401 module_process_thread_->RegisterModule(transport_send_->send_side_cc(),
401 RTC_FROM_HERE); 402 RTC_FROM_HERE);
402 pacer_thread_->RegisterModule(transport_send_->send_side_cc()->pacer(), 403 pacer_thread_->RegisterModule(transport_send_->send_side_cc()->pacer(),
403 RTC_FROM_HERE); 404 RTC_FROM_HERE);
404 pacer_thread_->RegisterModule( 405 pacer_thread_->RegisterModule(
(...skipping 14 matching lines...) Expand all
419 RTC_CHECK(video_receive_streams_.empty()); 420 RTC_CHECK(video_receive_streams_.empty());
420 421
421 pacer_thread_->Stop(); 422 pacer_thread_->Stop();
422 pacer_thread_->DeRegisterModule(transport_send_->send_side_cc()->pacer()); 423 pacer_thread_->DeRegisterModule(transport_send_->send_side_cc()->pacer());
423 pacer_thread_->DeRegisterModule( 424 pacer_thread_->DeRegisterModule(
424 receive_side_cc_.GetRemoteBitrateEstimator(true)); 425 receive_side_cc_.GetRemoteBitrateEstimator(true));
425 module_process_thread_->DeRegisterModule(transport_send_->send_side_cc()); 426 module_process_thread_->DeRegisterModule(transport_send_->send_side_cc());
426 module_process_thread_->DeRegisterModule(&receive_side_cc_); 427 module_process_thread_->DeRegisterModule(&receive_side_cc_);
427 module_process_thread_->DeRegisterModule(call_stats_.get()); 428 module_process_thread_->DeRegisterModule(call_stats_.get());
428 module_process_thread_->Stop(); 429 module_process_thread_->Stop();
430 call_stats_->DeregisterStatsObserver(&receive_side_cc_);
429 call_stats_->DeregisterStatsObserver(transport_send_->send_side_cc()); 431 call_stats_->DeregisterStatsObserver(transport_send_->send_side_cc());
430 432
431 // Only update histograms after process threads have been shut down, so that 433 // Only update histograms after process threads have been shut down, so that
432 // they won't try to concurrently update stats. 434 // they won't try to concurrently update stats.
433 { 435 {
434 rtc::CritScope lock(&bitrate_crit_); 436 rtc::CritScope lock(&bitrate_crit_);
435 UpdateSendHistograms(); 437 UpdateSendHistograms();
436 } 438 }
437 UpdateReceiveHistograms(); 439 UpdateReceiveHistograms();
438 UpdateHistograms(); 440 UpdateHistograms();
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) { 1327 (use_send_side_bwe && header.extension.hasTransportSequenceNumber)) {
1326 receive_side_cc_.OnReceivedPacket( 1328 receive_side_cc_.OnReceivedPacket(
1327 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(), 1329 packet.arrival_time_ms(), packet.payload_size() + packet.padding_size(),
1328 header); 1330 header);
1329 } 1331 }
1330 } 1332 }
1331 1333
1332 } // namespace internal 1334 } // namespace internal
1333 1335
1334 } // namespace webrtc 1336 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/include/receive_side_congestion_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698