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

Side by Side Diff: webrtc/voice_engine/channel.cc

Issue 1406123011: Let AudioCodingModule::SendCodec return Maybe<CodecInst> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: review fix Created 5 years, 1 month 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/modules/audio_coding/main/test/iSACTest.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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 "DeRegisterVoiceEngineObserver() observer already disabled"); 1235 "DeRegisterVoiceEngineObserver() observer already disabled");
1236 return 0; 1236 return 0;
1237 } 1237 }
1238 _voiceEngineObserverPtr = NULL; 1238 _voiceEngineObserverPtr = NULL;
1239 return 0; 1239 return 0;
1240 } 1240 }
1241 1241
1242 int32_t 1242 int32_t
1243 Channel::GetSendCodec(CodecInst& codec) 1243 Channel::GetSendCodec(CodecInst& codec)
1244 { 1244 {
1245 return (audio_coding_->SendCodec(&codec)); 1245 auto send_codec = audio_coding_->SendCodec();
1246 if (send_codec) {
1247 codec = *send_codec;
1248 return 0;
1249 }
1250 return -1;
1246 } 1251 }
1247 1252
1248 int32_t 1253 int32_t
1249 Channel::GetRecCodec(CodecInst& codec) 1254 Channel::GetRecCodec(CodecInst& codec)
1250 { 1255 {
1251 return (audio_coding_->ReceiveCodec(&codec)); 1256 return (audio_coding_->ReceiveCodec(&codec));
1252 } 1257 }
1253 1258
1254 int32_t 1259 int32_t
1255 Channel::SetSendCodec(const CodecInst& codec) 1260 Channel::SetSendCodec(const CodecInst& codec)
(...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after
3930 int64_t min_rtt = 0; 3935 int64_t min_rtt = 0;
3931 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) 3936 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt)
3932 != 0) { 3937 != 0) {
3933 return 0; 3938 return 0;
3934 } 3939 }
3935 return rtt; 3940 return rtt;
3936 } 3941 }
3937 3942
3938 } // namespace voe 3943 } // namespace voe
3939 } // namespace webrtc 3944 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/main/test/iSACTest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698