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

Side by Side Diff: webrtc/modules/audio_coding/acm2/audio_coding_module.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
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 return sp->use_codec_fec ? 0 : -1; 894 return sp->use_codec_fec ? 0 : -1;
895 } else { 895 } else {
896 RTC_DCHECK(!sp->use_codec_fec); 896 RTC_DCHECK(!sp->use_codec_fec);
897 return 0; 897 return 0;
898 } 898 }
899 } 899 }
900 900
901 int AudioCodingModuleImpl::SetPacketLossRate(int loss_rate) { 901 int AudioCodingModuleImpl::SetPacketLossRate(int loss_rate) {
902 rtc::CritScope lock(&acm_crit_sect_); 902 rtc::CritScope lock(&acm_crit_sect_);
903 if (HaveValidEncoder("SetPacketLossRate")) { 903 if (HaveValidEncoder("SetPacketLossRate")) {
904 encoder_stack_->OnReceivedUplinkPacketLossFraction(loss_rate / 100.0); 904 encoder_stack_->OnReceivedUplinkPacketLossFraction(
905 rtc::Optional<float>(loss_rate / 100.0f));
905 } 906 }
906 return 0; 907 return 0;
907 } 908 }
908 909
909 ///////////////////////////////////////// 910 /////////////////////////////////////////
910 // (VAD) Voice Activity Detection 911 // (VAD) Voice Activity Detection
911 // 912 //
912 int AudioCodingModuleImpl::SetVAD(bool enable_dtx, 913 int AudioCodingModuleImpl::SetVAD(bool enable_dtx,
913 bool enable_vad, 914 bool enable_vad,
914 ACMVADMode mode) { 915 ACMVADMode mode) {
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 // Checks the validity of the parameters of the given codec 1377 // Checks the validity of the parameters of the given codec
1377 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) { 1378 bool AudioCodingModule::IsCodecValid(const CodecInst& codec) {
1378 bool valid = acm2::RentACodec::IsCodecValid(codec); 1379 bool valid = acm2::RentACodec::IsCodecValid(codec);
1379 if (!valid) 1380 if (!valid)
1380 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1, 1381 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceAudioCoding, -1,
1381 "Invalid codec setting"); 1382 "Invalid codec setting");
1382 return valid; 1383 return valid;
1383 } 1384 }
1384 1385
1385 } // namespace webrtc 1386 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698