| 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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 } | 487 } |
| 488 | 488 |
| 489 void ReceiveStatisticsImpl::DataCountersUpdated(const StreamDataCounters& stats, | 489 void ReceiveStatisticsImpl::DataCountersUpdated(const StreamDataCounters& stats, |
| 490 uint32_t ssrc) { | 490 uint32_t ssrc) { |
| 491 rtc::CritScope cs(&receive_statistics_lock_); | 491 rtc::CritScope cs(&receive_statistics_lock_); |
| 492 if (rtp_stats_callback_) { | 492 if (rtp_stats_callback_) { |
| 493 rtp_stats_callback_->DataCountersUpdated(stats, ssrc); | 493 rtp_stats_callback_->DataCountersUpdated(stats, ssrc); |
| 494 } | 494 } |
| 495 } | 495 } |
| 496 | 496 |
| 497 std::vector<rtcp::ReportBlock> ReceiveStatistics::RtcpReportBlocks( | 497 std::vector<rtcp::ReportBlock> ReceiveStatisticsImpl::RtcpReportBlocks( |
| 498 size_t max_blocks) { | 498 size_t max_blocks) { |
| 499 StatisticianMap statisticians = GetActiveStatisticians(); | 499 StatisticianMap statisticians = GetActiveStatisticians(); |
| 500 std::vector<rtcp::ReportBlock> result; | 500 std::vector<rtcp::ReportBlock> result; |
| 501 result.reserve(std::min(max_blocks, statisticians.size())); | 501 result.reserve(std::min(max_blocks, statisticians.size())); |
| 502 for (auto& statistician : statisticians) { | 502 for (auto& statistician : statisticians) { |
| 503 // TODO(danilchap): Select statistician subset across multiple calls using | 503 // TODO(danilchap): Select statistician subset across multiple calls using |
| 504 // round-robin, as described in rfc3550 section 6.4 when single | 504 // round-robin, as described in rfc3550 section 6.4 when single |
| 505 // rtcp_module/receive_statistics will be used for more rtp streams. | 505 // rtcp_module/receive_statistics will be used for more rtp streams. |
| 506 if (result.size() == max_blocks) | 506 if (result.size() == max_blocks) |
| 507 break; | 507 break; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 519 result.pop_back(); | 519 result.pop_back(); |
| 520 continue; | 520 continue; |
| 521 } | 521 } |
| 522 block.SetExtHighestSeqNum(stats.extended_highest_sequence_number); | 522 block.SetExtHighestSeqNum(stats.extended_highest_sequence_number); |
| 523 block.SetJitter(stats.jitter); | 523 block.SetJitter(stats.jitter); |
| 524 } | 524 } |
| 525 return result; | 525 return result; |
| 526 } | 526 } |
| 527 | 527 |
| 528 } // namespace webrtc | 528 } // namespace webrtc |
| OLD | NEW |