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

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

Issue 1474363002: Use webrtc/base/logging.h for voice_engine. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: ist -> dst Created 5 years 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/voice_engine/channel.cc ('k') | webrtc/voice_engine/utility.cc » ('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
11 #include "webrtc/voice_engine/transmit_mixer.h" 11 #include "webrtc/voice_engine/transmit_mixer.h"
12 12
13 #include "webrtc/base/format_macros.h" 13 #include "webrtc/base/format_macros.h"
14 #include "webrtc/base/logging.h"
14 #include "webrtc/modules/utility/include/audio_frame_operations.h" 15 #include "webrtc/modules/utility/include/audio_frame_operations.h"
15 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 16 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
16 #include "webrtc/system_wrappers/include/event_wrapper.h" 17 #include "webrtc/system_wrappers/include/event_wrapper.h"
17 #include "webrtc/system_wrappers/include/logging.h"
18 #include "webrtc/system_wrappers/include/trace.h" 18 #include "webrtc/system_wrappers/include/trace.h"
19 #include "webrtc/voice_engine/channel.h" 19 #include "webrtc/voice_engine/channel.h"
20 #include "webrtc/voice_engine/channel_manager.h" 20 #include "webrtc/voice_engine/channel_manager.h"
21 #include "webrtc/voice_engine/include/voe_external_media.h" 21 #include "webrtc/voice_engine/include/voe_external_media.h"
22 #include "webrtc/voice_engine/statistics.h" 22 #include "webrtc/voice_engine/statistics.h"
23 #include "webrtc/voice_engine/utility.h" 23 #include "webrtc/voice_engine/utility.h"
24 #include "webrtc/voice_engine/voe_base_impl.h" 24 #include "webrtc/voice_engine/voe_base_impl.h"
25 25
26 namespace webrtc { 26 namespace webrtc {
27 namespace voe { 27 namespace voe {
(...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 AudioFrame::kNormalSpeech, 1234 AudioFrame::kNormalSpeech,
1235 AudioFrame::kVadUnknown, 1235 AudioFrame::kVadUnknown,
1236 1); 1236 1);
1237 } 1237 }
1238 return 0; 1238 return 0;
1239 } 1239 }
1240 1240
1241 void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift, 1241 void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift,
1242 int current_mic_level, bool key_pressed) { 1242 int current_mic_level, bool key_pressed) {
1243 if (audioproc_->set_stream_delay_ms(delay_ms) != 0) { 1243 if (audioproc_->set_stream_delay_ms(delay_ms) != 0) {
1244 // A redundant warning is reported in AudioDevice, which we've throttled 1244 // Silently ignore this failure to avoid flooding the logs.
1245 // to avoid flooding the logs. Relegate this one to LS_VERBOSE to avoid
1246 // repeating the problem here.
1247 LOG_FERR1(LS_VERBOSE, set_stream_delay_ms, delay_ms);
1248 } 1245 }
1249 1246
1250 GainControl* agc = audioproc_->gain_control(); 1247 GainControl* agc = audioproc_->gain_control();
1251 if (agc->set_stream_analog_level(current_mic_level) != 0) { 1248 if (agc->set_stream_analog_level(current_mic_level) != 0) {
1252 LOG_FERR1(LS_ERROR, set_stream_analog_level, current_mic_level); 1249 LOG(LS_ERROR) << "set_stream_analog_level failed: current_mic_level = "
1250 << current_mic_level;
1253 assert(false); 1251 assert(false);
1254 } 1252 }
1255 1253
1256 EchoCancellation* aec = audioproc_->echo_cancellation(); 1254 EchoCancellation* aec = audioproc_->echo_cancellation();
1257 if (aec->is_drift_compensation_enabled()) { 1255 if (aec->is_drift_compensation_enabled()) {
1258 aec->set_stream_drift_samples(clock_drift); 1256 aec->set_stream_drift_samples(clock_drift);
1259 } 1257 }
1260 1258
1261 audioproc_->set_stream_key_pressed(key_pressed); 1259 audioproc_->set_stream_key_pressed(key_pressed);
1262 1260
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 void TransmitMixer::EnableStereoChannelSwapping(bool enable) { 1333 void TransmitMixer::EnableStereoChannelSwapping(bool enable) {
1336 swap_stereo_channels_ = enable; 1334 swap_stereo_channels_ = enable;
1337 } 1335 }
1338 1336
1339 bool TransmitMixer::IsStereoChannelSwappingEnabled() { 1337 bool TransmitMixer::IsStereoChannelSwappingEnabled() {
1340 return swap_stereo_channels_; 1338 return swap_stereo_channels_;
1341 } 1339 }
1342 1340
1343 } // namespace voe 1341 } // namespace voe
1344 } // namespace webrtc 1342 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/voice_engine/channel.cc ('k') | webrtc/voice_engine/utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698