Use webrtc/base/logging.h for voice_engine.

BUG=webrtc:5118
R=henrika@webrtc.org

Review URL: https://codereview.webrtc.org/1474363002

Cr-Commit-Position: refs/heads/master@{#10827}
This commit is contained in:
pbos 2015-11-27 09:48:36 -08:00 committed by Commit bot
parent def58203a1
commit ad856229a7
6 changed files with 18 additions and 21 deletions

View File

@ -14,6 +14,7 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/format_macros.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/timeutils.h"
#include "webrtc/common.h"
#include "webrtc/config.h"
@ -27,7 +28,6 @@
#include "webrtc/modules/utility/include/audio_frame_operations.h"
#include "webrtc/modules/utility/include/process_thread.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/logging.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/voice_engine/include/voe_base.h"
#include "webrtc/voice_engine/include/voe_external_media.h"
@ -1020,11 +1020,11 @@ Channel::Init()
}
if (rx_audioproc_->noise_suppression()->set_level(kDefaultNsMode) != 0) {
LOG_FERR1(LS_ERROR, noise_suppression()->set_level, kDefaultNsMode);
LOG(LS_ERROR) << "noise_suppression()->set_level(kDefaultNsMode) failed.";
return -1;
}
if (rx_audioproc_->gain_control()->set_mode(kDefaultRxAgcMode) != 0) {
LOG_FERR1(LS_ERROR, gain_control()->set_mode, kDefaultRxAgcMode);
LOG(LS_ERROR) << "gain_control()->set_mode(kDefaultRxAgcMode) failed.";
return -1;
}

View File

@ -11,10 +11,10 @@
#include "webrtc/voice_engine/transmit_mixer.h"
#include "webrtc/base/format_macros.h"
#include "webrtc/base/logging.h"
#include "webrtc/modules/utility/include/audio_frame_operations.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/event_wrapper.h"
#include "webrtc/system_wrappers/include/logging.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/voice_engine/channel.h"
#include "webrtc/voice_engine/channel_manager.h"
@ -1241,15 +1241,13 @@ int32_t TransmitMixer::MixOrReplaceAudioWithFile(
void TransmitMixer::ProcessAudio(int delay_ms, int clock_drift,
int current_mic_level, bool key_pressed) {
if (audioproc_->set_stream_delay_ms(delay_ms) != 0) {
// A redundant warning is reported in AudioDevice, which we've throttled
// to avoid flooding the logs. Relegate this one to LS_VERBOSE to avoid
// repeating the problem here.
LOG_FERR1(LS_VERBOSE, set_stream_delay_ms, delay_ms);
// Silently ignore this failure to avoid flooding the logs.
}
GainControl* agc = audioproc_->gain_control();
if (agc->set_stream_analog_level(current_mic_level) != 0) {
LOG_FERR1(LS_ERROR, set_stream_analog_level, current_mic_level);
LOG(LS_ERROR) << "set_stream_analog_level failed: current_mic_level = "
<< current_mic_level;
assert(false);
}

View File

@ -10,12 +10,12 @@
#include "webrtc/voice_engine/utility.h"
#include "webrtc/base/logging.h"
#include "webrtc/common_audio/resampler/include/push_resampler.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/modules/utility/include/audio_frame_operations.h"
#include "webrtc/system_wrappers/include/logging.h"
#include "webrtc/voice_engine/voice_engine_defines.h"
namespace webrtc {
@ -52,8 +52,10 @@ void RemixAndResample(const int16_t* src_data,
if (resampler->InitializeIfNeeded(sample_rate_hz, dst_frame->sample_rate_hz_,
audio_ptr_num_channels) == -1) {
LOG_FERR3(LS_ERROR, InitializeIfNeeded, sample_rate_hz,
dst_frame->sample_rate_hz_, audio_ptr_num_channels);
LOG(LS_ERROR) << "InitializeIfNeeded failed: sample_rate_hz = "
<< sample_rate_hz << ", dst_frame->sample_rate_hz_ = "
<< dst_frame->sample_rate_hz_
<< ", audio_ptr_num_channels = " << audio_ptr_num_channels;
assert(false);
}
@ -61,7 +63,9 @@ void RemixAndResample(const int16_t* src_data,
int out_length = resampler->Resample(audio_ptr, src_length, dst_frame->data_,
AudioFrame::kMaxDataSizeSamples);
if (out_length == -1) {
LOG_FERR3(LS_ERROR, Resample, audio_ptr, src_length, dst_frame->data_);
LOG(LS_ERROR) << "Resample failed: audio_ptr = " << audio_ptr
<< ", src_length = " << src_length
<< ", dst_frame->data_ = " << dst_frame->data_;
assert(false);
}
dst_frame->samples_per_channel_ =

View File

@ -10,9 +10,9 @@
#include "webrtc/voice_engine/voe_audio_processing_impl.h"
#include "webrtc/base/logging.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/logging.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/voice_engine/channel.h"
#include "webrtc/voice_engine/include/voe_errors.h"
@ -317,7 +317,6 @@ int VoEAudioProcessingImpl::GetAgcConfig(AgcConfig& config) {
int VoEAudioProcessingImpl::SetRxNsStatus(int channel,
bool enable,
NsModes mode) {
LOG_API3(channel, enable, mode);
#ifdef WEBRTC_VOICE_ENGINE_NR
if (!_shared->statistics().Initialized()) {
_shared->SetLastError(VE_NOT_INITED, kTraceError);
@ -469,7 +468,6 @@ bool VoEAudioProcessing::DriftCompensationSupported() {
}
int VoEAudioProcessingImpl::EnableDriftCompensation(bool enable) {
LOG_API1(enable);
WEBRTC_VOICE_INIT_CHECK();
if (!DriftCompensationSupported()) {
@ -489,7 +487,6 @@ int VoEAudioProcessingImpl::EnableDriftCompensation(bool enable) {
}
bool VoEAudioProcessingImpl::DriftCompensationEnabled() {
LOG_API0();
WEBRTC_VOICE_INIT_CHECK_BOOL();
EchoCancellation* aec = _shared->audio_processing()->echo_cancellation();
@ -1038,12 +1035,10 @@ int VoEAudioProcessingImpl::SetTypingDetectionParameters(int timeWindow,
}
void VoEAudioProcessingImpl::EnableStereoChannelSwapping(bool enable) {
LOG_API1(enable);
_shared->transmit_mixer()->EnableStereoChannelSwapping(enable);
}
bool VoEAudioProcessingImpl::IsStereoChannelSwappingEnabled() {
LOG_API0();
return _shared->transmit_mixer()->IsStereoChannelSwappingEnabled();
}

View File

@ -11,6 +11,7 @@
#include "webrtc/voice_engine/voe_base_impl.h"
#include "webrtc/base/format_macros.h"
#include "webrtc/base/logging.h"
#include "webrtc/common.h"
#include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
@ -18,7 +19,6 @@
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/file_wrapper.h"
#include "webrtc/system_wrappers/include/logging.h"
#include "webrtc/voice_engine/channel.h"
#include "webrtc/voice_engine/include/voe_errors.h"
#include "webrtc/voice_engine/output_mixer.h"

View File

@ -12,8 +12,8 @@
#include "webrtc/base/checks.h"
#include "webrtc/base/format_macros.h"
#include "webrtc/base/logging.h"
#include "webrtc/system_wrappers/include/critical_section_wrapper.h"
#include "webrtc/system_wrappers/include/logging.h"
#include "webrtc/system_wrappers/include/trace.h"
#include "webrtc/voice_engine/channel.h"
#include "webrtc/voice_engine/include/voe_errors.h"