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

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

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: AudioSendStream::Reconfigure() Created 3 years, 8 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) 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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 kTraceError, kTraceVoice, VoEId(_instanceId, _channelId), 1236 kTraceError, kTraceVoice, VoEId(_instanceId, _channelId),
1237 "SetEncoder() failed to register codec to RTP/RTCP module"); 1237 "SetEncoder() failed to register codec to RTP/RTCP module");
1238 return false; 1238 return false;
1239 } 1239 }
1240 } 1240 }
1241 1241
1242 audio_coding_->SetEncoder(std::move(encoder)); 1242 audio_coding_->SetEncoder(std::move(encoder));
1243 return true; 1243 return true;
1244 } 1244 }
1245 1245
1246 void Channel::ModifyEncoder(
1247 rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) {
1248 audio_coding_->ModifyEncoder(modifier);
1249 }
1250
1246 int32_t Channel::RegisterVoiceEngineObserver(VoiceEngineObserver& observer) { 1251 int32_t Channel::RegisterVoiceEngineObserver(VoiceEngineObserver& observer) {
1247 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), 1252 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
1248 "Channel::RegisterVoiceEngineObserver()"); 1253 "Channel::RegisterVoiceEngineObserver()");
1249 rtc::CritScope cs(&_callbackCritSect); 1254 rtc::CritScope cs(&_callbackCritSect);
1250 1255
1251 if (_voiceEngineObserverPtr) { 1256 if (_voiceEngineObserverPtr) {
1252 _engineStatisticsPtr->SetLastError( 1257 _engineStatisticsPtr->SetLastError(
1253 VE_INVALID_OPERATION, kTraceError, 1258 VE_INVALID_OPERATION, kTraceError,
1254 "RegisterVoiceEngineObserver() observer already enabled"); 1259 "RegisterVoiceEngineObserver() observer already enabled");
1255 return -1; 1260 return -1;
(...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 int64_t min_rtt = 0; 3029 int64_t min_rtt = 0;
3025 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3030 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3026 0) { 3031 0) {
3027 return 0; 3032 return 0;
3028 } 3033 }
3029 return rtt; 3034 return rtt;
3030 } 3035 }
3031 3036
3032 } // namespace voe 3037 } // namespace voe
3033 } // namespace webrtc 3038 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698