| OLD | NEW |
| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 uint32_t send_bandwidth = 0; | 504 uint32_t send_bandwidth = 0; |
| 505 congestion_controller_->GetBitrateController()->AvailableBandwidth( | 505 congestion_controller_->GetBitrateController()->AvailableBandwidth( |
| 506 &send_bandwidth); | 506 &send_bandwidth); |
| 507 std::vector<unsigned int> ssrcs; | 507 std::vector<unsigned int> ssrcs; |
| 508 uint32_t recv_bandwidth = 0; | 508 uint32_t recv_bandwidth = 0; |
| 509 congestion_controller_->GetRemoteBitrateEstimator(false)->LatestEstimate( | 509 congestion_controller_->GetRemoteBitrateEstimator(false)->LatestEstimate( |
| 510 &ssrcs, &recv_bandwidth); | 510 &ssrcs, &recv_bandwidth); |
| 511 stats.send_bandwidth_bps = send_bandwidth; | 511 stats.send_bandwidth_bps = send_bandwidth; |
| 512 stats.recv_bandwidth_bps = recv_bandwidth; | 512 stats.recv_bandwidth_bps = recv_bandwidth; |
| 513 stats.pacer_delay_ms = congestion_controller_->GetPacerQueuingDelayMs(); | 513 stats.pacer_delay_ms = congestion_controller_->GetPacerQueuingDelayMs(); |
| 514 { | 514 stats.rtt_ms = call_stats_->rtcp_rtt_stats()->LastProcessedRtt(); |
| 515 ReadLockScoped read_lock(*send_crit_); | |
| 516 // TODO(solenberg): Add audio send streams. | |
| 517 for (const auto& kv : video_send_ssrcs_) { | |
| 518 int rtt_ms = kv.second->GetRtt(); | |
| 519 if (rtt_ms > 0) | |
| 520 stats.rtt_ms = rtt_ms; | |
| 521 } | |
| 522 } | |
| 523 return stats; | 515 return stats; |
| 524 } | 516 } |
| 525 | 517 |
| 526 void Call::SetBitrateConfig( | 518 void Call::SetBitrateConfig( |
| 527 const webrtc::Call::Config::BitrateConfig& bitrate_config) { | 519 const webrtc::Call::Config::BitrateConfig& bitrate_config) { |
| 528 TRACE_EVENT0("webrtc", "Call::SetBitrateConfig"); | 520 TRACE_EVENT0("webrtc", "Call::SetBitrateConfig"); |
| 529 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); | 521 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); |
| 530 RTC_DCHECK_GE(bitrate_config.min_bitrate_bps, 0); | 522 RTC_DCHECK_GE(bitrate_config.min_bitrate_bps, 0); |
| 531 if (bitrate_config.max_bitrate_bps != -1) | 523 if (bitrate_config.max_bitrate_bps != -1) |
| 532 RTC_DCHECK_GT(bitrate_config.max_bitrate_bps, 0); | 524 RTC_DCHECK_GT(bitrate_config.max_bitrate_bps, 0); |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 // thread. Then this check can be enabled. | 734 // thread. Then this check can be enabled. |
| 743 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); | 735 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); |
| 744 if (RtpHeaderParser::IsRtcp(packet, length)) | 736 if (RtpHeaderParser::IsRtcp(packet, length)) |
| 745 return DeliverRtcp(media_type, packet, length); | 737 return DeliverRtcp(media_type, packet, length); |
| 746 | 738 |
| 747 return DeliverRtp(media_type, packet, length, packet_time); | 739 return DeliverRtp(media_type, packet, length, packet_time); |
| 748 } | 740 } |
| 749 | 741 |
| 750 } // namespace internal | 742 } // namespace internal |
| 751 } // namespace webrtc | 743 } // namespace webrtc |
| OLD | NEW |