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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 return rtc::ArrayView<std::unique_ptr<AudioEncoder>>(&speech_encoder_, 1); | 184 return rtc::ArrayView<std::unique_ptr<AudioEncoder>>(&speech_encoder_, 1); |
185 } | 185 } |
186 | 186 |
187 void AudioEncoderCng::OnReceivedUplinkPacketLossFraction( | 187 void AudioEncoderCng::OnReceivedUplinkPacketLossFraction( |
188 float uplink_packet_loss_fraction) { | 188 float uplink_packet_loss_fraction) { |
189 speech_encoder_->OnReceivedUplinkPacketLossFraction( | 189 speech_encoder_->OnReceivedUplinkPacketLossFraction( |
190 uplink_packet_loss_fraction); | 190 uplink_packet_loss_fraction); |
191 } | 191 } |
192 | 192 |
193 void AudioEncoderCng::OnReceivedTargetAudioBitrate( | 193 void AudioEncoderCng::OnReceivedTargetAudioBitrate( |
194 int target_audio_bitrate_bps) { | 194 int target_audio_bitrate_bps, |
195 speech_encoder_->OnReceivedTargetAudioBitrate(target_audio_bitrate_bps); | 195 rtc::Optional<int64_t> probing_interval_ms) { |
| 196 speech_encoder_->OnReceivedTargetAudioBitrate(target_audio_bitrate_bps, |
| 197 probing_interval_ms); |
196 } | 198 } |
197 | 199 |
198 AudioEncoder::EncodedInfo AudioEncoderCng::EncodePassive( | 200 AudioEncoder::EncodedInfo AudioEncoderCng::EncodePassive( |
199 size_t frames_to_encode, | 201 size_t frames_to_encode, |
200 rtc::Buffer* encoded) { | 202 rtc::Buffer* encoded) { |
201 bool force_sid = last_frame_active_; | 203 bool force_sid = last_frame_active_; |
202 bool output_produced = false; | 204 bool output_produced = false; |
203 const size_t samples_per_10ms_frame = SamplesPer10msFrame(); | 205 const size_t samples_per_10ms_frame = SamplesPer10msFrame(); |
204 AudioEncoder::EncodedInfo info; | 206 AudioEncoder::EncodedInfo info; |
205 | 207 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 } | 252 } |
251 } | 253 } |
252 return info; | 254 return info; |
253 } | 255 } |
254 | 256 |
255 size_t AudioEncoderCng::SamplesPer10msFrame() const { | 257 size_t AudioEncoderCng::SamplesPer10msFrame() const { |
256 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); | 258 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); |
257 } | 259 } |
258 | 260 |
259 } // namespace webrtc | 261 } // namespace webrtc |
OLD | NEW |