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

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

Issue 2705093002: Injectable audio encoders: WebRtcVoiceEngine and company (Closed)
Patch Set: Moved duplicated configuration from constructor to ConfigureStream (previously 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 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 kTraceError, kTraceVoice, VoEId(_instanceId, _channelId), 1299 kTraceError, kTraceVoice, VoEId(_instanceId, _channelId),
1300 "SetEncoder() failed to register codec to RTP/RTCP module"); 1300 "SetEncoder() failed to register codec to RTP/RTCP module");
1301 return false; 1301 return false;
1302 } 1302 }
1303 } 1303 }
1304 1304
1305 audio_coding_->SetEncoder(std::move(encoder)); 1305 audio_coding_->SetEncoder(std::move(encoder));
1306 return true; 1306 return true;
1307 } 1307 }
1308 1308
1309 void Channel::ModifyEncoder(
1310 rtc::FunctionView<void(std::unique_ptr<AudioEncoder>*)> modifier) {
1311 audio_coding_->ModifyEncoder(modifier);
1312 }
1313
1309 int32_t Channel::RegisterVoiceEngineObserver(VoiceEngineObserver& observer) { 1314 int32_t Channel::RegisterVoiceEngineObserver(VoiceEngineObserver& observer) {
1310 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId), 1315 WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
1311 "Channel::RegisterVoiceEngineObserver()"); 1316 "Channel::RegisterVoiceEngineObserver()");
1312 rtc::CritScope cs(&_callbackCritSect); 1317 rtc::CritScope cs(&_callbackCritSect);
1313 1318
1314 if (_voiceEngineObserverPtr) { 1319 if (_voiceEngineObserverPtr) {
1315 _engineStatisticsPtr->SetLastError( 1320 _engineStatisticsPtr->SetLastError(
1316 VE_INVALID_OPERATION, kTraceError, 1321 VE_INVALID_OPERATION, kTraceError,
1317 "RegisterVoiceEngineObserver() observer already enabled"); 1322 "RegisterVoiceEngineObserver() observer already enabled");
1318 return -1; 1323 return -1;
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
3108 int64_t min_rtt = 0; 3113 int64_t min_rtt = 0;
3109 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) != 3114 if (_rtpRtcpModule->RTT(remoteSSRC, &rtt, &avg_rtt, &min_rtt, &max_rtt) !=
3110 0) { 3115 0) {
3111 return 0; 3116 return 0;
3112 } 3117 }
3113 return rtt; 3118 return rtt;
3114 } 3119 }
3115 3120
3116 } // namespace voe 3121 } // namespace voe
3117 } // namespace webrtc 3122 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698