| 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 |
| 11 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" | 11 #include "webrtc/modules/audio_coding/neteq/statistics_calculator.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 #include <string.h> // memset | 14 #include <string.h> // memset |
| 15 #include <algorithm> | 15 #include <algorithm> |
| 16 | 16 |
| 17 #include "webrtc/base/checks.h" | 17 #include "webrtc/base/checks.h" |
| 18 #include "webrtc/base/safe_conversions.h" | 18 #include "webrtc/base/safe_conversions.h" |
| 19 #include "webrtc/modules/audio_coding/neteq/decision_logic.h" | 19 #include "webrtc/modules/audio_coding/neteq/decision_logic.h" |
| 20 #include "webrtc/modules/audio_coding/neteq/delay_manager.h" | 20 #include "webrtc/modules/audio_coding/neteq/delay_manager.h" |
| 21 #include "webrtc/system_wrappers/interface/metrics.h" | 21 #include "webrtc/system_wrappers/include/metrics.h" |
| 22 | 22 |
| 23 namespace webrtc { | 23 namespace webrtc { |
| 24 | 24 |
| 25 // Allocating the static const so that it can be passed by reference to | 25 // Allocating the static const so that it can be passed by reference to |
| 26 // RTC_DCHECK. | 26 // RTC_DCHECK. |
| 27 const size_t StatisticsCalculator::kLenWaitingTimes; | 27 const size_t StatisticsCalculator::kLenWaitingTimes; |
| 28 | 28 |
| 29 StatisticsCalculator::PeriodicUmaLogger::PeriodicUmaLogger( | 29 StatisticsCalculator::PeriodicUmaLogger::PeriodicUmaLogger( |
| 30 const std::string& uma_name, | 30 const std::string& uma_name, |
| 31 int report_interval_ms, | 31 int report_interval_ms, |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // Ratio must be smaller than 1 in Q14. | 287 // Ratio must be smaller than 1 in Q14. |
| 288 assert((numerator << 14) / denominator < (1 << 14)); | 288 assert((numerator << 14) / denominator < (1 << 14)); |
| 289 return static_cast<uint16_t>((numerator << 14) / denominator); | 289 return static_cast<uint16_t>((numerator << 14) / denominator); |
| 290 } else { | 290 } else { |
| 291 // Will not produce a ratio larger than 1, since this is probably an error. | 291 // Will not produce a ratio larger than 1, since this is probably an error. |
| 292 return 1 << 14; | 292 return 1 << 14; |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace webrtc | 296 } // namespace webrtc |
| OLD | NEW |