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

Side by Side Diff: webrtc/voice_engine/channel.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 | « webrtc/tools/event_log_visualizer/analyzer.cc ('k') | no next file » | 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 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 (*encoder)->OnReceivedUplinkBandwidth( 1286 (*encoder)->OnReceivedUplinkBandwidth(
1287 bitrate_bps, rtc::Optional<int64_t>(probing_interval_ms)); 1287 bitrate_bps, rtc::Optional<int64_t>(probing_interval_ms));
1288 } 1288 }
1289 }); 1289 });
1290 retransmission_rate_limiter_->SetMaxRate(bitrate_bps); 1290 retransmission_rate_limiter_->SetMaxRate(bitrate_bps);
1291 } 1291 }
1292 1292
1293 void Channel::OnIncomingFractionLoss(int fraction_lost) { 1293 void Channel::OnIncomingFractionLoss(int fraction_lost) {
1294 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) { 1294 audio_coding_->ModifyEncoder([&](std::unique_ptr<AudioEncoder>* encoder) {
1295 if (*encoder) 1295 if (*encoder)
1296 (*encoder)->OnReceivedUplinkPacketLossFraction(fraction_lost / 255.0f); 1296 (*encoder)->OnReceivedUplinkPacketLossFraction(
1297 rtc::Optional<float>(fraction_lost / 255.0f));
1297 }); 1298 });
1298 } 1299 }
1299 1300
1300 int32_t Channel::SetVADStatus(bool enableVAD, 1301 int32_t Channel::SetVADStatus(bool enableVAD,
1301 ACMVADMode mode, 1302 ACMVADMode mode,
1302 bool disableDTX) { 1303 bool disableDTX) {
1303 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), 1304 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
1304 "Channel::SetVADStatus(mode=%d)", mode); 1305 "Channel::SetVADStatus(mode=%d)", mode);
1305 RTC_DCHECK(!(disableDTX && enableVAD)); // disableDTX mode is deprecated. 1306 RTC_DCHECK(!(disableDTX && enableVAD)); // disableDTX mode is deprecated.
1306 if (!codec_manager_.SetVAD(enableVAD, mode) || 1307 if (!codec_manager_.SetVAD(enableVAD, mode) ||
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after
2992 int64_t min_rtt = 0; 2993 int64_t min_rtt = 0;
2993 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 2994 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
2994 0) { 2995 0) {
2995 return 0; 2996 return 0;
2996 } 2997 }
2997 return rtt; 2998 return rtt;
2998 } 2999 }
2999 3000
3000 } // namespace voe 3001 } // namespace voe
3001 } // namespace webrtc 3002 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/tools/event_log_visualizer/analyzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698