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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 | 91 |
92 int AudioEncoderCng::Num10MsFramesInNextPacket() const { | 92 int AudioEncoderCng::Num10MsFramesInNextPacket() const { |
93 return speech_encoder_->Num10MsFramesInNextPacket(); | 93 return speech_encoder_->Num10MsFramesInNextPacket(); |
94 } | 94 } |
95 | 95 |
96 int AudioEncoderCng::Max10MsFramesInAPacket() const { | 96 int AudioEncoderCng::Max10MsFramesInAPacket() const { |
97 return speech_encoder_->Max10MsFramesInAPacket(); | 97 return speech_encoder_->Max10MsFramesInAPacket(); |
98 } | 98 } |
99 | 99 |
| 100 int AudioEncoderCng::GetTargetBitrate() const { |
| 101 return speech_encoder_->GetTargetBitrate(); |
| 102 } |
| 103 |
100 void AudioEncoderCng::SetTargetBitrate(int bits_per_second) { | 104 void AudioEncoderCng::SetTargetBitrate(int bits_per_second) { |
101 speech_encoder_->SetTargetBitrate(bits_per_second); | 105 speech_encoder_->SetTargetBitrate(bits_per_second); |
102 } | 106 } |
103 | 107 |
104 void AudioEncoderCng::SetProjectedPacketLossRate(double fraction) { | 108 void AudioEncoderCng::SetProjectedPacketLossRate(double fraction) { |
105 DCHECK_GE(fraction, 0.0); | 109 DCHECK_GE(fraction, 0.0); |
106 DCHECK_LE(fraction, 1.0); | 110 DCHECK_LE(fraction, 1.0); |
107 speech_encoder_->SetProjectedPacketLossRate(fraction); | 111 speech_encoder_->SetProjectedPacketLossRate(fraction); |
108 } | 112 } |
109 | 113 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 } | 228 } |
225 } | 229 } |
226 return info; | 230 return info; |
227 } | 231 } |
228 | 232 |
229 size_t AudioEncoderCng::SamplesPer10msFrame() const { | 233 size_t AudioEncoderCng::SamplesPer10msFrame() const { |
230 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); | 234 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); |
231 } | 235 } |
232 | 236 |
233 } // namespace webrtc | 237 } // namespace webrtc |
OLD | NEW |