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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 | 447 |
448 void ReceiveStatisticsImpl::SetMaxReorderingThreshold( | 448 void ReceiveStatisticsImpl::SetMaxReorderingThreshold( |
449 int max_reordering_threshold) { | 449 int max_reordering_threshold) { |
450 CriticalSectionScoped cs(receive_statistics_lock_.get()); | 450 CriticalSectionScoped cs(receive_statistics_lock_.get()); |
451 for (StatisticianImplMap::iterator it = statisticians_.begin(); | 451 for (StatisticianImplMap::iterator it = statisticians_.begin(); |
452 it != statisticians_.end(); ++it) { | 452 it != statisticians_.end(); ++it) { |
453 it->second->SetMaxReorderingThreshold(max_reordering_threshold); | 453 it->second->SetMaxReorderingThreshold(max_reordering_threshold); |
454 } | 454 } |
455 } | 455 } |
456 | 456 |
457 void ReceiveStatisticsImpl::Process() { | 457 int32_t ReceiveStatisticsImpl::Process() { |
458 CriticalSectionScoped cs(receive_statistics_lock_.get()); | 458 CriticalSectionScoped cs(receive_statistics_lock_.get()); |
459 for (StatisticianImplMap::iterator it = statisticians_.begin(); | 459 for (StatisticianImplMap::iterator it = statisticians_.begin(); |
460 it != statisticians_.end(); ++it) { | 460 it != statisticians_.end(); ++it) { |
461 it->second->ProcessBitrate(); | 461 it->second->ProcessBitrate(); |
462 } | 462 } |
463 last_rate_update_ms_ = clock_->TimeInMilliseconds(); | 463 last_rate_update_ms_ = clock_->TimeInMilliseconds(); |
| 464 return 0; |
464 } | 465 } |
465 | 466 |
466 int64_t ReceiveStatisticsImpl::TimeUntilNextProcess() { | 467 int64_t ReceiveStatisticsImpl::TimeUntilNextProcess() { |
467 CriticalSectionScoped cs(receive_statistics_lock_.get()); | 468 CriticalSectionScoped cs(receive_statistics_lock_.get()); |
468 int64_t time_since_last_update = clock_->TimeInMilliseconds() - | 469 int64_t time_since_last_update = clock_->TimeInMilliseconds() - |
469 last_rate_update_ms_; | 470 last_rate_update_ms_; |
470 return std::max<int64_t>( | 471 return std::max<int64_t>( |
471 kStatisticsProcessIntervalMs - time_since_last_update, 0); | 472 kStatisticsProcessIntervalMs - time_since_last_update, 0); |
472 } | 473 } |
473 | 474 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 StreamStatistician* NullReceiveStatistics::GetStatistician( | 523 StreamStatistician* NullReceiveStatistics::GetStatistician( |
523 uint32_t ssrc) const { | 524 uint32_t ssrc) const { |
524 return NULL; | 525 return NULL; |
525 } | 526 } |
526 | 527 |
527 void NullReceiveStatistics::SetMaxReorderingThreshold( | 528 void NullReceiveStatistics::SetMaxReorderingThreshold( |
528 int max_reordering_threshold) {} | 529 int max_reordering_threshold) {} |
529 | 530 |
530 int64_t NullReceiveStatistics::TimeUntilNextProcess() { return 0; } | 531 int64_t NullReceiveStatistics::TimeUntilNextProcess() { return 0; } |
531 | 532 |
532 void NullReceiveStatistics::Process() {} | 533 int32_t NullReceiveStatistics::Process() { return 0; } |
533 | 534 |
534 void NullReceiveStatistics::RegisterRtcpStatisticsCallback( | 535 void NullReceiveStatistics::RegisterRtcpStatisticsCallback( |
535 RtcpStatisticsCallback* callback) {} | 536 RtcpStatisticsCallback* callback) {} |
536 | 537 |
537 void NullReceiveStatistics::RegisterRtpStatisticsCallback( | 538 void NullReceiveStatistics::RegisterRtpStatisticsCallback( |
538 StreamDataCountersCallback* callback) {} | 539 StreamDataCountersCallback* callback) {} |
539 | 540 |
540 } // namespace webrtc | 541 } // namespace webrtc |
OLD | NEW |