Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script: for m in PLOG \ LOG_TAG \ LOG_GLEM \ LOG_GLE_EX \ LOG_GLE \ LAST_SYSTEM_ERROR \ LOG_ERRNO_EX \ LOG_ERRNO \ LOG_ERR_EX \ LOG_ERR \ LOG_V \ LOG_F \ LOG_T_F \ LOG_E \ LOG_T \ LOG_CHECK_LEVEL_V \ LOG_CHECK_LEVEL \ LOG do git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g" done git checkout rtc_base/logging.h git cl format Bug: webrtc:8452 Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600 Reviewed-on: https://webrtc-review.googlesource.com/21325 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20617}
This commit is contained in:
committed by
Commit Bot
parent
34fa309129
commit
675513b96a
@ -46,14 +46,14 @@ AcmReceiver::~AcmReceiver() = default;
|
||||
int AcmReceiver::SetMinimumDelay(int delay_ms) {
|
||||
if (neteq_->SetMinimumDelay(delay_ms))
|
||||
return 0;
|
||||
LOG(LERROR) << "AcmReceiver::SetExtraDelay " << delay_ms;
|
||||
RTC_LOG(LERROR) << "AcmReceiver::SetExtraDelay " << delay_ms;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int AcmReceiver::SetMaximumDelay(int delay_ms) {
|
||||
if (neteq_->SetMaximumDelay(delay_ms))
|
||||
return 0;
|
||||
LOG(LERROR) << "AcmReceiver::SetExtraDelay " << delay_ms;
|
||||
RTC_LOG(LERROR) << "AcmReceiver::SetExtraDelay " << delay_ms;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -86,9 +86,9 @@ int AcmReceiver::InsertPacket(const WebRtcRTPHeader& rtp_header,
|
||||
const rtc::Optional<CodecInst> ci =
|
||||
RtpHeaderToDecoder(*header, incoming_payload[0]);
|
||||
if (!ci) {
|
||||
LOG_F(LS_ERROR) << "Payload-type "
|
||||
<< static_cast<int>(header->payloadType)
|
||||
<< " is not registered.";
|
||||
RTC_LOG_F(LS_ERROR) << "Payload-type "
|
||||
<< static_cast<int>(header->payloadType)
|
||||
<< " is not registered.";
|
||||
return -1;
|
||||
}
|
||||
receive_timestamp = NowInTimestamp(ci->plfreq);
|
||||
@ -109,9 +109,9 @@ int AcmReceiver::InsertPacket(const WebRtcRTPHeader& rtp_header,
|
||||
|
||||
if (neteq_->InsertPacket(rtp_header.header, incoming_payload,
|
||||
receive_timestamp) < 0) {
|
||||
LOG(LERROR) << "AcmReceiver::InsertPacket "
|
||||
<< static_cast<int>(header->payloadType)
|
||||
<< " Failed to insert packet";
|
||||
RTC_LOG(LERROR) << "AcmReceiver::InsertPacket "
|
||||
<< static_cast<int>(header->payloadType)
|
||||
<< " Failed to insert packet";
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@ -125,7 +125,7 @@ int AcmReceiver::GetAudio(int desired_freq_hz,
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
|
||||
if (neteq_->GetAudio(audio_frame, muted) != NetEq::kOK) {
|
||||
LOG(LERROR) << "AcmReceiver::GetAudio - NetEq Failed.";
|
||||
RTC_LOG(LERROR) << "AcmReceiver::GetAudio - NetEq Failed.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -143,8 +143,8 @@ int AcmReceiver::GetAudio(int desired_freq_hz,
|
||||
audio_frame->num_channels_, AudioFrame::kMaxDataSizeSamples,
|
||||
temp_output);
|
||||
if (samples_per_channel_int < 0) {
|
||||
LOG(LERROR) << "AcmReceiver::GetAudio - "
|
||||
"Resampling last_audio_buffer_ failed.";
|
||||
RTC_LOG(LERROR) << "AcmReceiver::GetAudio - "
|
||||
"Resampling last_audio_buffer_ failed.";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -158,7 +158,8 @@ int AcmReceiver::GetAudio(int desired_freq_hz,
|
||||
audio_frame->num_channels_, AudioFrame::kMaxDataSizeSamples,
|
||||
audio_frame->mutable_data());
|
||||
if (samples_per_channel_int < 0) {
|
||||
LOG(LERROR) << "AcmReceiver::GetAudio - Resampling audio_buffer_ failed.";
|
||||
RTC_LOG(LERROR)
|
||||
<< "AcmReceiver::GetAudio - Resampling audio_buffer_ failed.";
|
||||
return -1;
|
||||
}
|
||||
audio_frame->samples_per_channel_ =
|
||||
@ -218,7 +219,8 @@ int32_t AcmReceiver::AddCodec(int acm_codec_id,
|
||||
}
|
||||
|
||||
if (neteq_->RemovePayloadType(payload_type) != NetEq::kOK) {
|
||||
LOG(LERROR) << "Cannot remove payload " << static_cast<int>(payload_type);
|
||||
RTC_LOG(LERROR) << "Cannot remove payload "
|
||||
<< static_cast<int>(payload_type);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -230,9 +232,9 @@ int32_t AcmReceiver::AddCodec(int acm_codec_id,
|
||||
audio_decoder, neteq_decoder, name, payload_type);
|
||||
}
|
||||
if (ret_val != NetEq::kOK) {
|
||||
LOG(LERROR) << "AcmReceiver::AddCodec " << acm_codec_id
|
||||
<< static_cast<int>(payload_type)
|
||||
<< " channels: " << channels;
|
||||
RTC_LOG(LERROR) << "AcmReceiver::AddCodec " << acm_codec_id
|
||||
<< static_cast<int>(payload_type)
|
||||
<< " channels: " << channels;
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@ -247,17 +249,18 @@ bool AcmReceiver::AddCodec(int rtp_payload_type,
|
||||
}
|
||||
|
||||
if (neteq_->RemovePayloadType(rtp_payload_type) != NetEq::kOK) {
|
||||
LOG(LERROR) << "AcmReceiver::AddCodec: Could not remove existing decoder"
|
||||
" for payload type "
|
||||
<< rtp_payload_type;
|
||||
RTC_LOG(LERROR)
|
||||
<< "AcmReceiver::AddCodec: Could not remove existing decoder"
|
||||
" for payload type "
|
||||
<< rtp_payload_type;
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool success =
|
||||
neteq_->RegisterPayloadType(rtp_payload_type, audio_format);
|
||||
if (!success) {
|
||||
LOG(LERROR) << "AcmReceiver::AddCodec failed for payload type "
|
||||
<< rtp_payload_type << ", decoder format " << audio_format;
|
||||
RTC_LOG(LERROR) << "AcmReceiver::AddCodec failed for payload type "
|
||||
<< rtp_payload_type << ", decoder format " << audio_format;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
@ -277,8 +280,8 @@ void AcmReceiver::RemoveAllCodecs() {
|
||||
int AcmReceiver::RemoveCodec(uint8_t payload_type) {
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
if (neteq_->RemovePayloadType(payload_type) != NetEq::kOK) {
|
||||
LOG(LERROR) << "AcmReceiver::RemoveCodec "
|
||||
<< static_cast<int>(payload_type);
|
||||
RTC_LOG(LERROR) << "AcmReceiver::RemoveCodec "
|
||||
<< static_cast<int>(payload_type);
|
||||
return -1;
|
||||
}
|
||||
if (last_audio_decoder_ && payload_type == last_audio_decoder_->pltype) {
|
||||
@ -348,8 +351,8 @@ int AcmReceiver::DecoderByPayloadType(uint8_t payload_type,
|
||||
*codec = *ci;
|
||||
return 0;
|
||||
} else {
|
||||
LOG(LERROR) << "AcmReceiver::DecoderByPayloadType "
|
||||
<< static_cast<int>(payload_type);
|
||||
RTC_LOG(LERROR) << "AcmReceiver::DecoderByPayloadType "
|
||||
<< static_cast<int>(payload_type);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,16 +43,18 @@ int ACMResampler::Resample10Msec(const int16_t* in_audio,
|
||||
|
||||
if (resampler_.InitializeIfNeeded(in_freq_hz, out_freq_hz,
|
||||
num_audio_channels) != 0) {
|
||||
LOG(LS_ERROR) << "InitializeIfNeeded(" << in_freq_hz << ", " << out_freq_hz
|
||||
<< ", " << num_audio_channels << ") failed.";
|
||||
RTC_LOG(LS_ERROR) << "InitializeIfNeeded(" << in_freq_hz << ", "
|
||||
<< out_freq_hz << ", " << num_audio_channels
|
||||
<< ") failed.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
int out_length =
|
||||
resampler_.Resample(in_audio, in_length, out_audio, out_capacity_samples);
|
||||
if (out_length == -1) {
|
||||
LOG(LS_ERROR) << "Resample(" << in_audio << ", " << in_length << ", "
|
||||
<< out_audio << ", " << out_capacity_samples << ") failed.";
|
||||
RTC_LOG(LS_ERROR) << "Resample(" << in_audio << ", " << in_length << ", "
|
||||
<< out_audio << ", " << out_capacity_samples
|
||||
<< ") failed.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -455,9 +455,9 @@ AudioCodingModuleImpl::AudioCodingModuleImpl(
|
||||
codec_histogram_bins_log_(),
|
||||
number_of_consecutive_empty_packets_(0) {
|
||||
if (InitializeReceiverSafe() < 0) {
|
||||
LOG(LS_ERROR) << "Cannot initialize receiver";
|
||||
RTC_LOG(LS_ERROR) << "Cannot initialize receiver";
|
||||
}
|
||||
LOG(LS_INFO) << "Created";
|
||||
RTC_LOG(LS_INFO) << "Created";
|
||||
}
|
||||
|
||||
AudioCodingModuleImpl::~AudioCodingModuleImpl() = default;
|
||||
@ -629,7 +629,7 @@ int AudioCodingModuleImpl::SendFrequency() const {
|
||||
rtc::CritScope lock(&acm_crit_sect_);
|
||||
|
||||
if (!encoder_stack_) {
|
||||
LOG(LS_ERROR) << "SendFrequency Failed, no codec is registered";
|
||||
RTC_LOG(LS_ERROR) << "SendFrequency Failed, no codec is registered";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -665,26 +665,26 @@ int AudioCodingModuleImpl::Add10MsDataInternal(const AudioFrame& audio_frame,
|
||||
InputData* input_data) {
|
||||
if (audio_frame.samples_per_channel_ == 0) {
|
||||
assert(false);
|
||||
LOG(LS_ERROR) << "Cannot Add 10 ms audio, payload length is zero";
|
||||
RTC_LOG(LS_ERROR) << "Cannot Add 10 ms audio, payload length is zero";
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (audio_frame.sample_rate_hz_ > 48000) {
|
||||
assert(false);
|
||||
LOG(LS_ERROR) << "Cannot Add 10 ms audio, input frequency not valid";
|
||||
RTC_LOG(LS_ERROR) << "Cannot Add 10 ms audio, input frequency not valid";
|
||||
return -1;
|
||||
}
|
||||
|
||||
// If the length and frequency matches. We currently just support raw PCM.
|
||||
if (static_cast<size_t>(audio_frame.sample_rate_hz_ / 100) !=
|
||||
audio_frame.samples_per_channel_) {
|
||||
LOG(LS_ERROR)
|
||||
RTC_LOG(LS_ERROR)
|
||||
<< "Cannot Add 10 ms audio, input frequency and length doesn't match";
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (audio_frame.num_channels_ != 1 && audio_frame.num_channels_ != 2) {
|
||||
LOG(LS_ERROR) << "Cannot Add 10 ms audio, invalid number of channels.";
|
||||
RTC_LOG(LS_ERROR) << "Cannot Add 10 ms audio, invalid number of channels.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -757,8 +757,8 @@ int AudioCodingModuleImpl::PreprocessToAddData(const AudioFrame& in_frame,
|
||||
expected_codec_ts_ = in_frame.timestamp_;
|
||||
first_10ms_data_ = true;
|
||||
} else if (in_frame.timestamp_ != expected_in_ts_) {
|
||||
LOG(LS_WARNING) << "Unexpected input timestamp: " << in_frame.timestamp_
|
||||
<< ", expected: " << expected_in_ts_;
|
||||
RTC_LOG(LS_WARNING) << "Unexpected input timestamp: " << in_frame.timestamp_
|
||||
<< ", expected: " << expected_in_ts_;
|
||||
expected_codec_ts_ +=
|
||||
(in_frame.timestamp_ - expected_in_ts_) *
|
||||
static_cast<uint32_t>(
|
||||
@ -816,7 +816,7 @@ int AudioCodingModuleImpl::PreprocessToAddData(const AudioFrame& in_frame,
|
||||
dest_ptr_audio);
|
||||
|
||||
if (samples_per_channel < 0) {
|
||||
LOG(LS_ERROR) << "Cannot add 10 ms audio, resampling failed";
|
||||
RTC_LOG(LS_ERROR) << "Cannot add 10 ms audio, resampling failed";
|
||||
return -1;
|
||||
}
|
||||
preprocess_frame_.samples_per_channel_ =
|
||||
@ -853,7 +853,7 @@ int AudioCodingModuleImpl::SetREDStatus(bool enable_red) {
|
||||
encoder_stack_ = encoder_factory_->rent_a_codec.RentEncoderStack(sp);
|
||||
return 0;
|
||||
#else
|
||||
LOG(LS_WARNING) << " WEBRTC_CODEC_RED is undefined";
|
||||
RTC_LOG(LS_WARNING) << " WEBRTC_CODEC_RED is undefined";
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -971,8 +971,8 @@ bool AudioCodingModuleImpl::RegisterReceiveCodec(
|
||||
RTC_DCHECK(receiver_initialized_);
|
||||
|
||||
if (!acm2::RentACodec::IsPayloadTypeValid(rtp_payload_type)) {
|
||||
LOG_F(LS_ERROR) << "Invalid payload-type " << rtp_payload_type
|
||||
<< " for decoder.";
|
||||
RTC_LOG_F(LS_ERROR) << "Invalid payload-type " << rtp_payload_type
|
||||
<< " for decoder.";
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -998,14 +998,15 @@ int AudioCodingModuleImpl::RegisterReceiveCodecUnlocked(
|
||||
rtc::FunctionView<std::unique_ptr<AudioDecoder>()> isac_factory) {
|
||||
RTC_DCHECK(receiver_initialized_);
|
||||
if (codec.channels > 2) {
|
||||
LOG_F(LS_ERROR) << "Unsupported number of channels: " << codec.channels;
|
||||
RTC_LOG_F(LS_ERROR) << "Unsupported number of channels: " << codec.channels;
|
||||
return -1;
|
||||
}
|
||||
|
||||
auto codec_id = acm2::RentACodec::CodecIdByParams(codec.plname, codec.plfreq,
|
||||
codec.channels);
|
||||
if (!codec_id) {
|
||||
LOG_F(LS_ERROR) << "Wrong codec params to be registered as receive codec";
|
||||
RTC_LOG_F(LS_ERROR)
|
||||
<< "Wrong codec params to be registered as receive codec";
|
||||
return -1;
|
||||
}
|
||||
auto codec_index = acm2::RentACodec::CodecIndexFromId(*codec_id);
|
||||
@ -1013,8 +1014,8 @@ int AudioCodingModuleImpl::RegisterReceiveCodecUnlocked(
|
||||
|
||||
// Check if the payload-type is valid.
|
||||
if (!acm2::RentACodec::IsPayloadTypeValid(codec.pltype)) {
|
||||
LOG_F(LS_ERROR) << "Invalid payload type " << codec.pltype << " for "
|
||||
<< codec.plname;
|
||||
RTC_LOG_F(LS_ERROR) << "Invalid payload type " << codec.pltype << " for "
|
||||
<< codec.plname;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1040,14 +1041,14 @@ int AudioCodingModuleImpl::RegisterExternalReceiveCodec(
|
||||
rtc::CritScope lock(&acm_crit_sect_);
|
||||
RTC_DCHECK(receiver_initialized_);
|
||||
if (num_channels > 2 || num_channels < 0) {
|
||||
LOG_F(LS_ERROR) << "Unsupported number of channels: " << num_channels;
|
||||
RTC_LOG_F(LS_ERROR) << "Unsupported number of channels: " << num_channels;
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Check if the payload-type is valid.
|
||||
if (!acm2::RentACodec::IsPayloadTypeValid(rtp_payload_type)) {
|
||||
LOG_F(LS_ERROR) << "Invalid payload-type " << rtp_payload_type
|
||||
<< " for external decoder.";
|
||||
RTC_LOG_F(LS_ERROR) << "Invalid payload-type " << rtp_payload_type
|
||||
<< " for external decoder.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1079,7 +1080,7 @@ int AudioCodingModuleImpl::IncomingPacket(const uint8_t* incoming_payload,
|
||||
// Minimum playout delay (Used for lip-sync).
|
||||
int AudioCodingModuleImpl::SetMinimumPlayoutDelay(int time_ms) {
|
||||
if ((time_ms < 0) || (time_ms > 10000)) {
|
||||
LOG(LS_ERROR) << "Delay must be in the range of 0-10000 milliseconds.";
|
||||
RTC_LOG(LS_ERROR) << "Delay must be in the range of 0-10000 milliseconds.";
|
||||
return -1;
|
||||
}
|
||||
return receiver_.SetMinimumDelay(time_ms);
|
||||
@ -1087,7 +1088,7 @@ int AudioCodingModuleImpl::SetMinimumPlayoutDelay(int time_ms) {
|
||||
|
||||
int AudioCodingModuleImpl::SetMaximumPlayoutDelay(int time_ms) {
|
||||
if ((time_ms < 0) || (time_ms > 10000)) {
|
||||
LOG(LS_ERROR) << "Delay must be in the range of 0-10000 milliseconds.";
|
||||
RTC_LOG(LS_ERROR) << "Delay must be in the range of 0-10000 milliseconds.";
|
||||
return -1;
|
||||
}
|
||||
return receiver_.SetMaximumDelay(time_ms);
|
||||
@ -1100,7 +1101,7 @@ int AudioCodingModuleImpl::PlayoutData10Ms(int desired_freq_hz,
|
||||
bool* muted) {
|
||||
// GetAudio always returns 10 ms, at the requested sample rate.
|
||||
if (receiver_.GetAudio(desired_freq_hz, audio_frame, muted) != 0) {
|
||||
LOG(LS_ERROR) << "PlayoutData failed, RecOut Failed";
|
||||
RTC_LOG(LS_ERROR) << "PlayoutData failed, RecOut Failed";
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
@ -1126,7 +1127,7 @@ int AudioCodingModuleImpl::GetNetworkStatistics(NetworkStatistics* statistics) {
|
||||
}
|
||||
|
||||
int AudioCodingModuleImpl::RegisterVADCallback(ACMVADCallback* vad_callback) {
|
||||
LOG(LS_VERBOSE) << "RegisterVADCallback()";
|
||||
RTC_LOG(LS_VERBOSE) << "RegisterVADCallback()";
|
||||
rtc::CritScope lock(&callback_crit_sect_);
|
||||
vad_callback_ = vad_callback;
|
||||
return 0;
|
||||
@ -1196,7 +1197,7 @@ int AudioCodingModuleImpl::FilteredCurrentDelayMs() const {
|
||||
|
||||
bool AudioCodingModuleImpl::HaveValidEncoder(const char* caller_name) const {
|
||||
if (!encoder_stack_) {
|
||||
LOG(LS_ERROR) << caller_name << " failed: No send codec is registered.";
|
||||
RTC_LOG(LS_ERROR) << caller_name << " failed: No send codec is registered.";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -1331,7 +1332,7 @@ int AudioCodingModule::Codec(const char* payload_name,
|
||||
bool AudioCodingModule::IsCodecValid(const CodecInst& codec) {
|
||||
bool valid = acm2::RentACodec::IsCodecValid(codec);
|
||||
if (!valid)
|
||||
LOG(LS_ERROR) << "Invalid codec setting";
|
||||
RTC_LOG(LS_ERROR) << "Invalid codec setting";
|
||||
return valid;
|
||||
}
|
||||
|
||||
|
||||
@ -24,28 +24,28 @@ namespace {
|
||||
// Check if the given codec is a valid to be registered as send codec.
|
||||
int IsValidSendCodec(const CodecInst& send_codec) {
|
||||
if ((send_codec.channels != 1) && (send_codec.channels != 2)) {
|
||||
LOG(LS_ERROR) << "Wrong number of channels (" << send_codec.channels
|
||||
<< "), only mono and stereo are supported)";
|
||||
RTC_LOG(LS_ERROR) << "Wrong number of channels (" << send_codec.channels
|
||||
<< "), only mono and stereo are supported)";
|
||||
return -1;
|
||||
}
|
||||
|
||||
auto maybe_codec_id = RentACodec::CodecIdByInst(send_codec);
|
||||
if (!maybe_codec_id) {
|
||||
LOG(LS_ERROR) << "Invalid codec setting for the send codec.";
|
||||
RTC_LOG(LS_ERROR) << "Invalid codec setting for the send codec.";
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Telephone-event cannot be a send codec.
|
||||
if (!STR_CASE_CMP(send_codec.plname, "telephone-event")) {
|
||||
LOG(LS_ERROR) << "telephone-event cannot be a send codec";
|
||||
RTC_LOG(LS_ERROR) << "telephone-event cannot be a send codec";
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!RentACodec::IsSupportedNumChannels(*maybe_codec_id, send_codec.channels)
|
||||
.value_or(false)) {
|
||||
LOG(LS_ERROR) << send_codec.channels
|
||||
<< " number of channels not supported for "
|
||||
<< send_codec.plname << ".";
|
||||
RTC_LOG(LS_ERROR) << send_codec.channels
|
||||
<< " number of channels not supported for "
|
||||
<< send_codec.plname << ".";
|
||||
return -1;
|
||||
}
|
||||
return RentACodec::CodecIndexFromId(*maybe_codec_id).value_or(-1);
|
||||
@ -81,8 +81,9 @@ bool CodecManager::RegisterEncoder(const CodecInst& send_codec) {
|
||||
case RentACodec::RegistrationResult::kOk:
|
||||
return true;
|
||||
case RentACodec::RegistrationResult::kBadFreq:
|
||||
LOG(LS_ERROR) << "RegisterSendCodec() failed, invalid frequency for RED"
|
||||
" registration";
|
||||
RTC_LOG(LS_ERROR)
|
||||
<< "RegisterSendCodec() failed, invalid frequency for RED"
|
||||
" registration";
|
||||
return false;
|
||||
case RentACodec::RegistrationResult::kSkip:
|
||||
break;
|
||||
@ -92,8 +93,9 @@ bool CodecManager::RegisterEncoder(const CodecInst& send_codec) {
|
||||
case RentACodec::RegistrationResult::kOk:
|
||||
return true;
|
||||
case RentACodec::RegistrationResult::kBadFreq:
|
||||
LOG(LS_ERROR) << "RegisterSendCodec() failed, invalid frequency for CNG"
|
||||
" registration";
|
||||
RTC_LOG(LS_ERROR)
|
||||
<< "RegisterSendCodec() failed, invalid frequency for CNG"
|
||||
" registration";
|
||||
return false;
|
||||
case RentACodec::RegistrationResult::kSkip:
|
||||
break;
|
||||
@ -127,14 +129,14 @@ CodecInst CodecManager::ForgeCodecInst(
|
||||
|
||||
bool CodecManager::SetCopyRed(bool enable) {
|
||||
if (enable && codec_stack_params_.use_codec_fec) {
|
||||
LOG(LS_WARNING) << "Codec internal FEC and RED cannot be co-enabled.";
|
||||
RTC_LOG(LS_WARNING) << "Codec internal FEC and RED cannot be co-enabled.";
|
||||
return false;
|
||||
}
|
||||
if (enable && send_codec_inst_ &&
|
||||
codec_stack_params_.red_payload_types.count(send_codec_inst_->plfreq) <
|
||||
1) {
|
||||
LOG(LS_WARNING) << "Cannot enable RED at " << send_codec_inst_->plfreq
|
||||
<< " Hz.";
|
||||
RTC_LOG(LS_WARNING) << "Cannot enable RED at " << send_codec_inst_->plfreq
|
||||
<< " Hz.";
|
||||
return false;
|
||||
}
|
||||
codec_stack_params_.use_red = enable;
|
||||
@ -153,7 +155,7 @@ bool CodecManager::SetVAD(bool enable, ACMVADMode mode) {
|
||||
? (codec_stack_params_.speech_encoder->NumChannels() != 1)
|
||||
: false;
|
||||
if (enable && stereo_send) {
|
||||
LOG(LS_ERROR) << "VAD/DTX not supported for stereo sending";
|
||||
RTC_LOG(LS_ERROR) << "VAD/DTX not supported for stereo sending";
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -171,7 +173,7 @@ bool CodecManager::SetVAD(bool enable, ACMVADMode mode) {
|
||||
|
||||
bool CodecManager::SetCodecFEC(bool enable_codec_fec) {
|
||||
if (enable_codec_fec && codec_stack_params_.use_red) {
|
||||
LOG(LS_WARNING) << "Codec internal FEC and RED cannot be co-enabled.";
|
||||
RTC_LOG(LS_WARNING) << "Codec internal FEC and RED cannot be co-enabled.";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -175,7 +175,8 @@ std::unique_ptr<AudioEncoder> CreateEncoder(
|
||||
#endif
|
||||
if (STR_CASE_CMP(speech_inst.plname, "g722") == 0)
|
||||
return std::unique_ptr<AudioEncoder>(new AudioEncoderG722Impl(speech_inst));
|
||||
LOG_F(LS_ERROR) << "Could not create encoder of type " << speech_inst.plname;
|
||||
RTC_LOG_F(LS_ERROR) << "Could not create encoder of type "
|
||||
<< speech_inst.plname;
|
||||
return std::unique_ptr<AudioEncoder>();
|
||||
}
|
||||
|
||||
|
||||
@ -60,7 +60,8 @@ std::vector<AudioDecoder::ParseResult> AudioDecoderIlbcImpl::ParsePayload(
|
||||
size_t bytes_per_frame;
|
||||
int timestamps_per_frame;
|
||||
if (payload.size() >= 950) {
|
||||
LOG(LS_WARNING) << "AudioDecoderIlbcImpl::ParsePayload: Payload too large";
|
||||
RTC_LOG(LS_WARNING)
|
||||
<< "AudioDecoderIlbcImpl::ParsePayload: Payload too large";
|
||||
return results;
|
||||
}
|
||||
if (payload.size() % 38 == 0) {
|
||||
@ -72,7 +73,8 @@ std::vector<AudioDecoder::ParseResult> AudioDecoderIlbcImpl::ParsePayload(
|
||||
bytes_per_frame = 50;
|
||||
timestamps_per_frame = 240;
|
||||
} else {
|
||||
LOG(LS_WARNING) << "AudioDecoderIlbcImpl::ParsePayload: Invalid payload";
|
||||
RTC_LOG(LS_WARNING)
|
||||
<< "AudioDecoderIlbcImpl::ParsePayload: Invalid payload";
|
||||
return results;
|
||||
}
|
||||
|
||||
|
||||
@ -149,13 +149,13 @@ int CalculateBitrate(int max_playback_rate_hz,
|
||||
std::max(AudioEncoderOpusConfig::kMinBitrateBps,
|
||||
std::min(*bitrate, AudioEncoderOpusConfig::kMaxBitrateBps));
|
||||
if (bitrate != chosen_bitrate) {
|
||||
LOG(LS_WARNING) << "Invalid maxaveragebitrate " << *bitrate
|
||||
<< " clamped to " << chosen_bitrate;
|
||||
RTC_LOG(LS_WARNING) << "Invalid maxaveragebitrate " << *bitrate
|
||||
<< " clamped to " << chosen_bitrate;
|
||||
}
|
||||
return chosen_bitrate;
|
||||
}
|
||||
LOG(LS_WARNING) << "Invalid maxaveragebitrate \"" << *bitrate_param
|
||||
<< "\" replaced by default bitrate " << default_bitrate;
|
||||
RTC_LOG(LS_WARNING) << "Invalid maxaveragebitrate \"" << *bitrate_param
|
||||
<< "\" replaced by default bitrate " << default_bitrate;
|
||||
}
|
||||
|
||||
return default_bitrate;
|
||||
@ -523,7 +523,7 @@ void AudioEncoderOpusImpl::OnReceivedUplinkBandwidth(
|
||||
ApplyAudioNetworkAdaptor();
|
||||
} else if (send_side_bwe_with_overhead_) {
|
||||
if (!overhead_bytes_per_packet_) {
|
||||
LOG(LS_INFO)
|
||||
RTC_LOG(LS_INFO)
|
||||
<< "AudioEncoderOpusImpl: Overhead unknown, target audio bitrate "
|
||||
<< target_audio_bitrate_bps << " bps is ignored.";
|
||||
return;
|
||||
|
||||
@ -42,7 +42,7 @@ int ComfortNoise::Generate(size_t requested_length,
|
||||
fs_hz_ == 48000);
|
||||
// Not adapted for multi-channel yet.
|
||||
if (output->Channels() != 1) {
|
||||
LOG(LS_ERROR) << "No multi-channel support";
|
||||
RTC_LOG(LS_ERROR) << "No multi-channel support";
|
||||
return kMultiChannelNotSupported;
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ int ComfortNoise::Generate(size_t requested_length,
|
||||
// Get the decoder from the database.
|
||||
ComfortNoiseDecoder* cng_decoder = decoder_database_->GetActiveCngDecoder();
|
||||
if (!cng_decoder) {
|
||||
LOG(LS_ERROR) << "Unknwown payload type";
|
||||
RTC_LOG(LS_ERROR) << "Unknwown payload type";
|
||||
return kUnknownPayloadType;
|
||||
}
|
||||
|
||||
@ -67,8 +67,8 @@ int ComfortNoise::Generate(size_t requested_length,
|
||||
new_period)) {
|
||||
// Error returned.
|
||||
output->Zeros(requested_length);
|
||||
LOG(LS_ERROR) <<
|
||||
"ComfortNoiseDecoder::Genererate failed to generate comfort noise";
|
||||
RTC_LOG(LS_ERROR)
|
||||
<< "ComfortNoiseDecoder::Genererate failed to generate comfort noise";
|
||||
return kInternalError;
|
||||
}
|
||||
(*output)[0].OverwriteAt(temp.get(), number_of_samples, 0);
|
||||
|
||||
@ -356,8 +356,8 @@ int DecoderDatabase::CheckPayloadTypes(const PacketList& packet_list) const {
|
||||
for (it = packet_list.begin(); it != packet_list.end(); ++it) {
|
||||
if (!GetDecoderInfo(it->payload_type)) {
|
||||
// Payload type is not found.
|
||||
LOG(LS_WARNING) << "CheckPayloadTypes: unknown RTP payload type "
|
||||
<< static_cast<int>(it->payload_type);
|
||||
RTC_LOG(LS_WARNING) << "CheckPayloadTypes: unknown RTP payload type "
|
||||
<< static_cast<int>(it->payload_type);
|
||||
return kDecoderNotFound;
|
||||
}
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ int DelayManager::CalculateTargetLevel(int iat_packets) {
|
||||
|
||||
int DelayManager::SetPacketAudioLength(int length_ms) {
|
||||
if (length_ms <= 0) {
|
||||
LOG_F(LS_ERROR) << "length_ms = " << length_ms;
|
||||
RTC_LOG_F(LS_ERROR) << "length_ms = " << length_ms;
|
||||
return -1;
|
||||
}
|
||||
if (frame_length_change_experiment_ && packet_len_ms_ != length_ms) {
|
||||
@ -353,7 +353,7 @@ void DelayManager::ResetPacketIatCount() {
|
||||
// class. They are computed from |target_level_| and used for decision making.
|
||||
void DelayManager::BufferLimits(int* lower_limit, int* higher_limit) const {
|
||||
if (!lower_limit || !higher_limit) {
|
||||
LOG_F(LS_ERROR) << "NULL pointers supplied as input";
|
||||
RTC_LOG_F(LS_ERROR) << "NULL pointers supplied as input";
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ int DtmfBuffer::ParseEvent(uint32_t rtp_timestamp,
|
||||
RTC_CHECK(payload);
|
||||
RTC_CHECK(event);
|
||||
if (payload_length_bytes < 4) {
|
||||
LOG(LS_WARNING) << "ParseEvent payload too short";
|
||||
RTC_LOG(LS_WARNING) << "ParseEvent payload too short";
|
||||
return kPayloadTooShort;
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ int DtmfBuffer::InsertEvent(const DtmfEvent& event) {
|
||||
if (event.event_no < 0 || event.event_no > 15 ||
|
||||
event.volume < 0 || event.volume > 63 ||
|
||||
event.duration <= 0 || event.duration > 65535) {
|
||||
LOG(LS_WARNING) << "InsertEvent invalid parameters";
|
||||
RTC_LOG(LS_WARNING) << "InsertEvent invalid parameters";
|
||||
return kInvalidEventParameters;
|
||||
}
|
||||
DtmfList::iterator it = buffer_.begin();
|
||||
|
||||
@ -106,11 +106,11 @@ NetEqImpl::NetEqImpl(const NetEq::Config& config,
|
||||
enable_muted_state_(config.enable_muted_state),
|
||||
use_dtx_delay_fix_(
|
||||
field_trial::IsEnabled("WebRTC-NetEqOpusDtxDelayFix")) {
|
||||
LOG(LS_INFO) << "NetEq config: " << config.ToString();
|
||||
RTC_LOG(LS_INFO) << "NetEq config: " << config.ToString();
|
||||
int fs = config.sample_rate_hz;
|
||||
if (fs != 8000 && fs != 16000 && fs != 32000 && fs != 48000) {
|
||||
LOG(LS_ERROR) << "Sample rate " << fs << " Hz not supported. " <<
|
||||
"Changing to 8000 Hz.";
|
||||
RTC_LOG(LS_ERROR) << "Sample rate " << fs << " Hz not supported. "
|
||||
<< "Changing to 8000 Hz.";
|
||||
fs = 8000;
|
||||
}
|
||||
delay_manager_->SetMaximumDelay(config.max_delay_ms);
|
||||
@ -229,9 +229,9 @@ int NetEqImpl::RegisterPayloadType(NetEqDecoder codec,
|
||||
const std::string& name,
|
||||
uint8_t rtp_payload_type) {
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
LOG(LS_VERBOSE) << "RegisterPayloadType "
|
||||
<< static_cast<int>(rtp_payload_type) << " "
|
||||
<< static_cast<int>(codec);
|
||||
RTC_LOG(LS_VERBOSE) << "RegisterPayloadType "
|
||||
<< static_cast<int>(rtp_payload_type) << " "
|
||||
<< static_cast<int>(codec);
|
||||
if (decoder_database_->RegisterPayload(rtp_payload_type, codec, name) !=
|
||||
DecoderDatabase::kOK) {
|
||||
return kFail;
|
||||
@ -244,11 +244,11 @@ int NetEqImpl::RegisterExternalDecoder(AudioDecoder* decoder,
|
||||
const std::string& codec_name,
|
||||
uint8_t rtp_payload_type) {
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
LOG(LS_VERBOSE) << "RegisterExternalDecoder "
|
||||
<< static_cast<int>(rtp_payload_type) << " "
|
||||
<< static_cast<int>(codec);
|
||||
RTC_LOG(LS_VERBOSE) << "RegisterExternalDecoder "
|
||||
<< static_cast<int>(rtp_payload_type) << " "
|
||||
<< static_cast<int>(codec);
|
||||
if (!decoder) {
|
||||
LOG(LS_ERROR) << "Cannot register external decoder with NULL pointer";
|
||||
RTC_LOG(LS_ERROR) << "Cannot register external decoder with NULL pointer";
|
||||
assert(false);
|
||||
return kFail;
|
||||
}
|
||||
@ -261,8 +261,8 @@ int NetEqImpl::RegisterExternalDecoder(AudioDecoder* decoder,
|
||||
|
||||
bool NetEqImpl::RegisterPayloadType(int rtp_payload_type,
|
||||
const SdpAudioFormat& audio_format) {
|
||||
LOG(LS_VERBOSE) << "NetEqImpl::RegisterPayloadType: payload type "
|
||||
<< rtp_payload_type << ", codec " << audio_format;
|
||||
RTC_LOG(LS_VERBOSE) << "NetEqImpl::RegisterPayloadType: payload type "
|
||||
<< rtp_payload_type << ", codec " << audio_format;
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
return decoder_database_->RegisterPayload(rtp_payload_type, audio_format) ==
|
||||
DecoderDatabase::kOK;
|
||||
@ -476,7 +476,7 @@ int NetEqImpl::SetTargetSampleRate() {
|
||||
|
||||
void NetEqImpl::FlushBuffers() {
|
||||
rtc::CritScope lock(&crit_sect_);
|
||||
LOG(LS_VERBOSE) << "FlushBuffers";
|
||||
RTC_LOG(LS_VERBOSE) << "FlushBuffers";
|
||||
packet_buffer_->Flush();
|
||||
assert(sync_buffer_.get());
|
||||
assert(expand_.get());
|
||||
@ -546,7 +546,7 @@ int NetEqImpl::InsertPacketInternal(const RTPHeader& rtp_header,
|
||||
rtc::ArrayView<const uint8_t> payload,
|
||||
uint32_t receive_timestamp) {
|
||||
if (payload.empty()) {
|
||||
LOG_F(LS_ERROR) << "payload is empty";
|
||||
RTC_LOG_F(LS_ERROR) << "payload is empty";
|
||||
return kInvalidPointer;
|
||||
}
|
||||
|
||||
@ -686,7 +686,7 @@ int NetEqImpl::InsertPacketInternal(const RTPHeader& rtp_header,
|
||||
const DecoderDatabase::DecoderInfo* info =
|
||||
decoder_database_->GetDecoderInfo(packet.payload_type);
|
||||
if (!info) {
|
||||
LOG(LS_WARNING) << "SplitAudio unknown payload type";
|
||||
RTC_LOG(LS_WARNING) << "SplitAudio unknown payload type";
|
||||
return kUnknownRtpPayloadType;
|
||||
}
|
||||
|
||||
@ -959,7 +959,7 @@ int NetEqImpl::GetAudioInternal(AudioFrame* audio_frame, bool* muted) {
|
||||
break;
|
||||
}
|
||||
case kUndefined: {
|
||||
LOG(LS_ERROR) << "Invalid operation kUndefined.";
|
||||
RTC_LOG(LS_ERROR) << "Invalid operation kUndefined.";
|
||||
assert(false); // This should not happen.
|
||||
last_mode_ = kModeError;
|
||||
return kInvalidOperation;
|
||||
@ -981,10 +981,10 @@ int NetEqImpl::GetAudioInternal(AudioFrame* audio_frame, bool* muted) {
|
||||
size_t num_output_samples_per_channel = output_size_samples_;
|
||||
size_t num_output_samples = output_size_samples_ * sync_buffer_->Channels();
|
||||
if (num_output_samples > AudioFrame::kMaxDataSizeSamples) {
|
||||
LOG(LS_WARNING) << "Output array is too short. "
|
||||
<< AudioFrame::kMaxDataSizeSamples << " < "
|
||||
<< output_size_samples_ << " * "
|
||||
<< sync_buffer_->Channels();
|
||||
RTC_LOG(LS_WARNING) << "Output array is too short. "
|
||||
<< AudioFrame::kMaxDataSizeSamples << " < "
|
||||
<< output_size_samples_ << " * "
|
||||
<< sync_buffer_->Channels();
|
||||
num_output_samples = AudioFrame::kMaxDataSizeSamples;
|
||||
num_output_samples_per_channel =
|
||||
AudioFrame::kMaxDataSizeSamples / sync_buffer_->Channels();
|
||||
@ -1003,10 +1003,10 @@ int NetEqImpl::GetAudioInternal(AudioFrame* audio_frame, bool* muted) {
|
||||
missing_lookahead_samples);
|
||||
}
|
||||
if (audio_frame->samples_per_channel_ != output_size_samples_) {
|
||||
LOG(LS_ERROR) << "audio_frame->samples_per_channel_ ("
|
||||
<< audio_frame->samples_per_channel_
|
||||
<< ") != output_size_samples_ (" << output_size_samples_
|
||||
<< ")";
|
||||
RTC_LOG(LS_ERROR) << "audio_frame->samples_per_channel_ ("
|
||||
<< audio_frame->samples_per_channel_
|
||||
<< ") != output_size_samples_ (" << output_size_samples_
|
||||
<< ")";
|
||||
// TODO(minyue): treatment of under-run, filling zeros
|
||||
audio_frame->Mute();
|
||||
return kSampleUnderrun;
|
||||
@ -1168,7 +1168,7 @@ int NetEqImpl::GetDecision(Operations* operation,
|
||||
timestamp_ = dtmf_event->timestamp;
|
||||
} else {
|
||||
if (!packet) {
|
||||
LOG(LS_ERROR) << "Packet missing where it shouldn't.";
|
||||
RTC_LOG(LS_ERROR) << "Packet missing where it shouldn't.";
|
||||
return -1;
|
||||
}
|
||||
timestamp_ = packet->timestamp;
|
||||
@ -1346,8 +1346,8 @@ int NetEqImpl::Decode(PacketList* packet_list, Operations* operation,
|
||||
decoder = decoder_database_->GetDecoder(payload_type);
|
||||
assert(decoder);
|
||||
if (!decoder) {
|
||||
LOG(LS_WARNING) << "Unknown payload type "
|
||||
<< static_cast<int>(payload_type);
|
||||
RTC_LOG(LS_WARNING)
|
||||
<< "Unknown payload type " << static_cast<int>(payload_type);
|
||||
packet_list->clear();
|
||||
return kDecoderNotFound;
|
||||
}
|
||||
@ -1359,8 +1359,8 @@ int NetEqImpl::Decode(PacketList* packet_list, Operations* operation,
|
||||
->GetDecoderInfo(payload_type);
|
||||
assert(decoder_info);
|
||||
if (!decoder_info) {
|
||||
LOG(LS_WARNING) << "Unknown payload type "
|
||||
<< static_cast<int>(payload_type);
|
||||
RTC_LOG(LS_WARNING)
|
||||
<< "Unknown payload type " << static_cast<int>(payload_type);
|
||||
packet_list->clear();
|
||||
return kDecoderNotFound;
|
||||
}
|
||||
@ -1417,11 +1417,11 @@ int NetEqImpl::Decode(PacketList* packet_list, Operations* operation,
|
||||
if (error_code != 0) {
|
||||
// Got some error code from the decoder.
|
||||
return_value = kDecoderErrorCode;
|
||||
LOG(LS_WARNING) << "Decoder returned error code: " << error_code;
|
||||
RTC_LOG(LS_WARNING) << "Decoder returned error code: " << error_code;
|
||||
} else {
|
||||
// Decoder does not implement error codes. Return generic error.
|
||||
return_value = kOtherDecoderError;
|
||||
LOG(LS_WARNING) << "Decoder error (no error code)";
|
||||
RTC_LOG(LS_WARNING) << "Decoder error (no error code)";
|
||||
}
|
||||
*operation = kExpand; // Do expansion to get data instead.
|
||||
}
|
||||
@ -1454,13 +1454,13 @@ int NetEqImpl::DecodeCng(AudioDecoder* decoder, int* decoded_length,
|
||||
*decoded_length += length;
|
||||
} else {
|
||||
// Error.
|
||||
LOG(LS_WARNING) << "Failed to decode CNG";
|
||||
RTC_LOG(LS_WARNING) << "Failed to decode CNG";
|
||||
*decoded_length = -1;
|
||||
break;
|
||||
}
|
||||
if (*decoded_length > static_cast<int>(decoded_buffer_length_)) {
|
||||
// Guard against overflow.
|
||||
LOG(LS_WARNING) << "Decoded too much CNG.";
|
||||
RTC_LOG(LS_WARNING) << "Decoded too much CNG.";
|
||||
return kDecodedTooMuch;
|
||||
}
|
||||
}
|
||||
@ -1502,14 +1502,14 @@ int NetEqImpl::DecodeLoop(PacketList* packet_list, const Operations& operation,
|
||||
} else {
|
||||
// Error.
|
||||
// TODO(ossu): What to put here?
|
||||
LOG(LS_WARNING) << "Decode error";
|
||||
RTC_LOG(LS_WARNING) << "Decode error";
|
||||
*decoded_length = -1;
|
||||
packet_list->clear();
|
||||
break;
|
||||
}
|
||||
if (*decoded_length > rtc::dchecked_cast<int>(decoded_buffer_length_)) {
|
||||
// Guard against overflow.
|
||||
LOG(LS_WARNING) << "Decoded too much.";
|
||||
RTC_LOG(LS_WARNING) << "Decoded too much.";
|
||||
packet_list->clear();
|
||||
return kDecodedTooMuch;
|
||||
}
|
||||
@ -1765,7 +1765,7 @@ int NetEqImpl::DoRfc3389Cng(PacketList* packet_list, bool play_dtmf) {
|
||||
assert(packet_list->size() == 1);
|
||||
const Packet& packet = packet_list->front();
|
||||
if (!decoder_database_->IsComfortNoise(packet.payload_type)) {
|
||||
LOG(LS_ERROR) << "Trying to decode non-CNG payload as CNG.";
|
||||
RTC_LOG(LS_ERROR) << "Trying to decode non-CNG payload as CNG.";
|
||||
return kOtherError;
|
||||
}
|
||||
if (comfort_noise_->UpdateParameters(packet) ==
|
||||
@ -1782,8 +1782,8 @@ int NetEqImpl::DoRfc3389Cng(PacketList* packet_list, bool play_dtmf) {
|
||||
dtmf_tone_generator_->Reset();
|
||||
}
|
||||
if (cn_return == ComfortNoise::kInternalError) {
|
||||
LOG(LS_WARNING) << "Comfort noise generator returned error code: "
|
||||
<< comfort_noise_->internal_error_code();
|
||||
RTC_LOG(LS_WARNING) << "Comfort noise generator returned error code: "
|
||||
<< comfort_noise_->internal_error_code();
|
||||
return kComfortNoiseErrorCode;
|
||||
} else if (cn_return == ComfortNoise::kUnknownPayloadType) {
|
||||
return kUnknownRtpPayloadType;
|
||||
@ -1864,7 +1864,7 @@ int NetEqImpl::DoDtmf(const DtmfEvent& dtmf_event, bool* play_dtmf) {
|
||||
// // Not adapted for multi-channel yet.
|
||||
// assert(algorithm_buffer_->Channels() == 1);
|
||||
// if (algorithm_buffer_->Channels() != 1) {
|
||||
// LOG(LS_WARNING) << "DTMF not supported for more than one channel";
|
||||
// RTC_LOG(LS_WARNING) << "DTMF not supported for more than one channel";
|
||||
// return kStereoNotSupported;
|
||||
// }
|
||||
// // Shuffle the remaining data to the beginning of algorithm buffer.
|
||||
@ -1943,7 +1943,7 @@ int NetEqImpl::ExtractPackets(size_t required_samples,
|
||||
const Packet* next_packet = packet_buffer_->PeekNextPacket();
|
||||
RTC_DCHECK(next_packet);
|
||||
if (!next_packet) {
|
||||
LOG(LS_ERROR) << "Packet buffer unexpectedly empty.";
|
||||
RTC_LOG(LS_ERROR) << "Packet buffer unexpectedly empty.";
|
||||
return -1;
|
||||
}
|
||||
uint32_t first_timestamp = next_packet->timestamp;
|
||||
@ -1956,7 +1956,7 @@ int NetEqImpl::ExtractPackets(size_t required_samples,
|
||||
// |next_packet| may be invalid after the |packet_buffer_| operation.
|
||||
next_packet = nullptr;
|
||||
if (!packet) {
|
||||
LOG(LS_ERROR) << "Should always be able to extract a packet here";
|
||||
RTC_LOG(LS_ERROR) << "Should always be able to extract a packet here";
|
||||
assert(false); // Should always be able to extract a packet here.
|
||||
return -1;
|
||||
}
|
||||
@ -1989,8 +1989,8 @@ int NetEqImpl::ExtractPackets(size_t required_samples,
|
||||
rtc::dchecked_cast<int>(packet_duration));
|
||||
}
|
||||
} else if (!has_cng_packet) {
|
||||
LOG(LS_WARNING) << "Unknown payload type "
|
||||
<< static_cast<int>(packet->payload_type);
|
||||
RTC_LOG(LS_WARNING) << "Unknown payload type "
|
||||
<< static_cast<int>(packet->payload_type);
|
||||
RTC_NOTREACHED();
|
||||
}
|
||||
|
||||
@ -2043,7 +2043,8 @@ void NetEqImpl::UpdatePlcComponents(int fs_hz, size_t channels) {
|
||||
}
|
||||
|
||||
void NetEqImpl::SetSampleRateAndChannels(int fs_hz, size_t channels) {
|
||||
LOG(LS_VERBOSE) << "SetSampleRateAndChannels " << fs_hz << " " << channels;
|
||||
RTC_LOG(LS_VERBOSE) << "SetSampleRateAndChannels " << fs_hz << " "
|
||||
<< channels;
|
||||
// TODO(hlundin): Change to an enumerator and skip assert.
|
||||
assert(fs_hz == 8000 || fs_hz == 16000 || fs_hz == 32000 || fs_hz == 48000);
|
||||
assert(channels > 0);
|
||||
|
||||
@ -80,7 +80,7 @@ bool PacketBuffer::Empty() const {
|
||||
|
||||
int PacketBuffer::InsertPacket(Packet&& packet, StatisticsCalculator* stats) {
|
||||
if (packet.empty()) {
|
||||
LOG(LS_WARNING) << "InsertPacket invalid packet";
|
||||
RTC_LOG(LS_WARNING) << "InsertPacket invalid packet";
|
||||
return kInvalidPacket;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ int PacketBuffer::InsertPacket(Packet&& packet, StatisticsCalculator* stats) {
|
||||
if (buffer_.size() >= max_number_of_packets_) {
|
||||
// Buffer is full. Flush it.
|
||||
Flush();
|
||||
LOG(LS_WARNING) << "Packet buffer flushed";
|
||||
RTC_LOG(LS_WARNING) << "Packet buffer flushed";
|
||||
return_val = kFlushed;
|
||||
}
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ bool RedPayloadSplitter::SplitRed(PacketList* packet_list) {
|
||||
// The block lengths in the RED headers do not match the overall
|
||||
// packet length. Something is corrupt. Discard this and the remaining
|
||||
// payloads from this packet.
|
||||
LOG(LS_WARNING) << "SplitRed length mismatch";
|
||||
RTC_LOG(LS_WARNING) << "SplitRed length mismatch";
|
||||
ret = false;
|
||||
break;
|
||||
}
|
||||
@ -119,7 +119,7 @@ bool RedPayloadSplitter::SplitRed(PacketList* packet_list) {
|
||||
// iterator |it|.
|
||||
packet_list->splice(it, std::move(new_packets));
|
||||
} else {
|
||||
LOG(LS_WARNING) << "SplitRed too many blocks: " << new_headers.size();
|
||||
RTC_LOG(LS_WARNING) << "SplitRed too many blocks: " << new_headers.size();
|
||||
ret = false;
|
||||
}
|
||||
// Remove |it| from the packet list. This operation effectively moves the
|
||||
|
||||
@ -127,7 +127,7 @@ void TestAllCodecs::Perform() {
|
||||
infile_a_.Open(file_name, 32000, "rb");
|
||||
|
||||
if (test_mode_ == 0) {
|
||||
LOG(LS_INFO) << "---------- TestAllCodecs ----------";
|
||||
RTC_LOG(LS_INFO) << "---------- TestAllCodecs ----------";
|
||||
}
|
||||
|
||||
acm_a_->InitializeReceiver();
|
||||
|
||||
Reference in New Issue
Block a user