Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(204)

Side by Side Diff: webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.cc

Issue 2746333009: OnReceivedUplinkPacketLossFraction() receives [const rtc::Optional<float>&] (Closed)
Patch Set: Rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 void AudioEncoderCng::SetMaxPlaybackRate(int frequency_hz) { 178 void AudioEncoderCng::SetMaxPlaybackRate(int frequency_hz) {
179 speech_encoder_->SetMaxPlaybackRate(frequency_hz); 179 speech_encoder_->SetMaxPlaybackRate(frequency_hz);
180 } 180 }
181 181
182 rtc::ArrayView<std::unique_ptr<AudioEncoder>> 182 rtc::ArrayView<std::unique_ptr<AudioEncoder>>
183 AudioEncoderCng::ReclaimContainedEncoders() { 183 AudioEncoderCng::ReclaimContainedEncoders() {
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 const rtc::Optional<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::OnReceivedUplinkBandwidth( 193 void AudioEncoderCng::OnReceivedUplinkBandwidth(
194 int target_audio_bitrate_bps, 194 int target_audio_bitrate_bps,
195 rtc::Optional<int64_t> probing_interval_ms) { 195 rtc::Optional<int64_t> probing_interval_ms) {
196 speech_encoder_->OnReceivedUplinkBandwidth(target_audio_bitrate_bps, 196 speech_encoder_->OnReceivedUplinkBandwidth(target_audio_bitrate_bps,
197 probing_interval_ms); 197 probing_interval_ms);
198 } 198 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 252 }
253 } 253 }
254 return info; 254 return info;
255 } 255 }
256 256
257 size_t AudioEncoderCng::SamplesPer10msFrame() const { 257 size_t AudioEncoderCng::SamplesPer10msFrame() const {
258 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000); 258 return rtc::CheckedDivExact(10 * SampleRateHz(), 1000);
259 } 259 }
260 260
261 } // namespace webrtc 261 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698