NetEq: Remove overly verbose logging
This change removes all LS_VERBOSE logs that will print once every packet or more often. TBR=pbos@webrtc.org BUG=webrtc:5227 Review URL: https://codereview.webrtc.org/1461903004 Cr-Commit-Position: refs/heads/master@{#10733}
This commit is contained in:
parent
5def7b9fde
commit
672304a654
@ -128,9 +128,6 @@ Operations DecisionLogic::GetDecision(const SyncBuffer& sync_buffer,
|
||||
const size_t cur_size_samples =
|
||||
samples_left + packet_buffer_.NumSamplesInBuffer(decoder_database_,
|
||||
decoder_frame_length);
|
||||
LOG(LS_VERBOSE) << "Buffers: " << packet_buffer_.NumPacketsInBuffer() <<
|
||||
" packets * " << decoder_frame_length << " samples/packet + " <<
|
||||
samples_left << " samples in sync buffer = " << cur_size_samples;
|
||||
|
||||
prev_time_scale_ = prev_time_scale_ &&
|
||||
(prev_mode == kModeAccelerateSuccess ||
|
||||
|
||||
@ -124,11 +124,6 @@ int NetEqImpl::InsertPacket(const WebRtcRTPHeader& rtp_header,
|
||||
rtc::ArrayView<const uint8_t> payload,
|
||||
uint32_t receive_timestamp) {
|
||||
CriticalSectionScoped lock(crit_sect_.get());
|
||||
LOG(LS_VERBOSE) << "InsertPacket: ts=" << rtp_header.header.timestamp
|
||||
<< ", sn=" << rtp_header.header.sequenceNumber
|
||||
<< ", pt=" << static_cast<int>(rtp_header.header.payloadType)
|
||||
<< ", ssrc=" << rtp_header.header.ssrc
|
||||
<< ", len=" << payload.size();
|
||||
int error =
|
||||
InsertPacketInternal(rtp_header, payload, receive_timestamp, false);
|
||||
if (error != 0) {
|
||||
@ -141,12 +136,6 @@ int NetEqImpl::InsertPacket(const WebRtcRTPHeader& rtp_header,
|
||||
int NetEqImpl::InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
|
||||
uint32_t receive_timestamp) {
|
||||
CriticalSectionScoped lock(crit_sect_.get());
|
||||
LOG(LS_VERBOSE) << "InsertPacket-Sync: ts="
|
||||
<< rtp_header.header.timestamp <<
|
||||
", sn=" << rtp_header.header.sequenceNumber <<
|
||||
", pt=" << static_cast<int>(rtp_header.header.payloadType) <<
|
||||
", ssrc=" << rtp_header.header.ssrc;
|
||||
|
||||
const uint8_t kSyncPayload[] = { 's', 'y', 'n', 'c' };
|
||||
int error =
|
||||
InsertPacketInternal(rtp_header, kSyncPayload, receive_timestamp, true);
|
||||
@ -162,11 +151,8 @@ int NetEqImpl::GetAudio(size_t max_length, int16_t* output_audio,
|
||||
size_t* samples_per_channel, int* num_channels,
|
||||
NetEqOutputType* type) {
|
||||
CriticalSectionScoped lock(crit_sect_.get());
|
||||
LOG(LS_VERBOSE) << "GetAudio";
|
||||
int error = GetAudioInternal(max_length, output_audio, samples_per_channel,
|
||||
num_channels);
|
||||
LOG(LS_VERBOSE) << "Produced " << *samples_per_channel <<
|
||||
" samples/channel for " << *num_channels << " channel(s)";
|
||||
if (error != 0) {
|
||||
error_code_ = error;
|
||||
return kFail;
|
||||
@ -751,8 +737,6 @@ int NetEqImpl::GetAudioInternal(size_t max_length,
|
||||
last_mode_ = kModeError;
|
||||
return return_value;
|
||||
}
|
||||
LOG(LS_VERBOSE) << "GetDecision returned operation=" << operation <<
|
||||
" and " << packet_list.size() << " packet(s)";
|
||||
|
||||
AudioDecoder::SpeechType speech_type;
|
||||
int length = 0;
|
||||
@ -867,9 +851,6 @@ int NetEqImpl::GetAudioInternal(size_t max_length,
|
||||
sync_buffer_->GetNextAudioInterleaved(num_output_samples_per_channel,
|
||||
output);
|
||||
*num_channels = static_cast<int>(sync_buffer_->Channels());
|
||||
LOG(LS_VERBOSE) << "Sync buffer (" << *num_channels << " channel(s)):" <<
|
||||
" insert " << algorithm_buffer_->Size() << " samples, extract " <<
|
||||
samples_from_sync << " samples";
|
||||
if (sync_buffer_->FutureLength() < expand_->overlap_length()) {
|
||||
// The sync buffer should always contain |overlap_length| samples, but now
|
||||
// too many samples have been extracted. Reinstall the |overlap_length|
|
||||
@ -1327,7 +1308,6 @@ int NetEqImpl::DecodeCng(AudioDecoder* decoder, int* decoded_length,
|
||||
&decoded_buffer_[*decoded_length], speech_type);
|
||||
if (length > 0) {
|
||||
*decoded_length += length;
|
||||
LOG(LS_VERBOSE) << "Decoded " << length << " CNG samples";
|
||||
} else {
|
||||
// Error.
|
||||
LOG(LS_WARNING) << "Failed to decode CNG";
|
||||
@ -1367,34 +1347,17 @@ int NetEqImpl::DecodeLoop(PacketList* packet_list, const Operations& operation,
|
||||
int decode_length;
|
||||
if (packet->sync_packet) {
|
||||
// Decode to silence with the same frame size as the last decode.
|
||||
LOG(LS_VERBOSE) << "Decoding sync-packet: " <<
|
||||
" ts=" << packet->header.timestamp <<
|
||||
", sn=" << packet->header.sequenceNumber <<
|
||||
", pt=" << static_cast<int>(packet->header.payloadType) <<
|
||||
", ssrc=" << packet->header.ssrc <<
|
||||
", len=" << packet->payload_length;
|
||||
memset(&decoded_buffer_[*decoded_length], 0,
|
||||
decoder_frame_length_ * decoder->Channels() *
|
||||
sizeof(decoded_buffer_[0]));
|
||||
decode_length = rtc::checked_cast<int>(decoder_frame_length_);
|
||||
} else if (!packet->primary) {
|
||||
// This is a redundant payload; call the special decoder method.
|
||||
LOG(LS_VERBOSE) << "Decoding packet (redundant):" <<
|
||||
" ts=" << packet->header.timestamp <<
|
||||
", sn=" << packet->header.sequenceNumber <<
|
||||
", pt=" << static_cast<int>(packet->header.payloadType) <<
|
||||
", ssrc=" << packet->header.ssrc <<
|
||||
", len=" << packet->payload_length;
|
||||
decode_length = decoder->DecodeRedundant(
|
||||
packet->payload, packet->payload_length, fs_hz_,
|
||||
(decoded_buffer_length_ - *decoded_length) * sizeof(int16_t),
|
||||
&decoded_buffer_[*decoded_length], speech_type);
|
||||
} else {
|
||||
LOG(LS_VERBOSE) << "Decoding packet: ts=" << packet->header.timestamp <<
|
||||
", sn=" << packet->header.sequenceNumber <<
|
||||
", pt=" << static_cast<int>(packet->header.payloadType) <<
|
||||
", ssrc=" << packet->header.ssrc <<
|
||||
", len=" << packet->payload_length;
|
||||
decode_length =
|
||||
decoder->Decode(
|
||||
packet->payload, packet->payload_length, fs_hz_,
|
||||
@ -1410,9 +1373,6 @@ int NetEqImpl::DecodeLoop(PacketList* packet_list, const Operations& operation,
|
||||
// Update |decoder_frame_length_| with number of samples per channel.
|
||||
decoder_frame_length_ =
|
||||
static_cast<size_t>(decode_length) / decoder->Channels();
|
||||
LOG(LS_VERBOSE) << "Decoded " << decode_length << " samples ("
|
||||
<< decoder->Channels() << " channel(s) -> "
|
||||
<< decoder_frame_length_ << " samples per channel)";
|
||||
} else if (decode_length < 0) {
|
||||
// Error.
|
||||
LOG(LS_WARNING) << "Decode " << decode_length << " " << payload_length;
|
||||
|
||||
@ -87,8 +87,6 @@ uint32_t TimestampScaler::ToInternal(uint32_t external_timestamp,
|
||||
assert(denominator_ > 0); // Should not be possible.
|
||||
external_ref_ = external_timestamp;
|
||||
internal_ref_ += (external_diff * numerator_) / denominator_;
|
||||
LOG(LS_VERBOSE) << "Converting timestamp: " << external_timestamp <<
|
||||
" -> " << internal_ref_;
|
||||
return internal_ref_;
|
||||
} else {
|
||||
// No scaling.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user