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