| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 } | 72 } |
| 73 | 73 |
| 74 int AudioEncoderCng::SampleRateHz() const { | 74 int AudioEncoderCng::SampleRateHz() const { |
| 75 return speech_encoder_->SampleRateHz(); | 75 return speech_encoder_->SampleRateHz(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 int AudioEncoderCng::RtpTimestampRateHz() const { | 78 int AudioEncoderCng::RtpTimestampRateHz() const { |
| 79 return speech_encoder_->RtpTimestampRateHz(); | 79 return speech_encoder_->RtpTimestampRateHz(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 int AudioEncoderCng::NumChannels() const { | 82 size_t AudioEncoderCng::NumChannels() const { |
| 83 return 1; | 83 return 1; |
| 84 } | 84 } |
| 85 | 85 |
| 86 size_t AudioEncoderCng::MaxEncodedBytes() const { | 86 size_t AudioEncoderCng::MaxEncodedBytes() const { |
| 87 const size_t max_encoded_bytes_active = speech_encoder_->MaxEncodedBytes(); | 87 const size_t max_encoded_bytes_active = speech_encoder_->MaxEncodedBytes(); |
| 88 const size_t max_encoded_bytes_passive = | 88 const size_t max_encoded_bytes_passive = |
| 89 rtc::CheckedDivExact(kMaxFrameSizeMs, 10) * SamplesPer10msFrame(); | 89 rtc::CheckedDivExact(kMaxFrameSizeMs, 10) * SamplesPer10msFrame(); |
| 90 return std::max(max_encoded_bytes_active, max_encoded_bytes_passive); | 90 return std::max(max_encoded_bytes_active, max_encoded_bytes_passive); |
| 91 } | 91 } |
| 92 | 92 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 } | 233 } |
| 234 } | 234 } |
| 235 return info; | 235 return info; |
| 236 } | 236 } |
| 237 | 237 |
| 238 size_t AudioEncoderCng::SamplesPer10msFrame() const { | 238 size_t AudioEncoderCng::SamplesPer10msFrame() const { |
| 239 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); | 239 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } // namespace webrtc | 242 } // namespace webrtc |
| OLD | NEW |