Remove encoder/decoder logging spam

This commit is contained in:
Dale Glass 2020-01-09 23:07:53 +01:00
parent 09aab2a2c6
commit 18e83aa93d
2 changed files with 4 additions and 4 deletions

View file

@ -71,7 +71,7 @@ void AthenaOpusDecoder::decode(const QByteArray &encodedBuffer, QByteArray &deco
int decoded_frames = opus_decode( _decoder, reinterpret_cast<const unsigned char*>(encodedBuffer.data()), encodedBuffer.length(), reinterpret_cast<opus_int16*>(decodedBuffer.data()), buffer_frames, 0 );
if ( decoded_frames >= 0 ) {
qCDebug(decoder) << "Decoded " << decoded_frames << " Opus frames, " << buffer_frames << " expected";
//qCDebug(decoder) << "Decoded " << decoded_frames << " Opus frames, " << buffer_frames << " expected";
if ( decoded_frames < buffer_frames ) {
qCWarning(decoder) << "Opus decoder returned " << decoded_frames << ", but " << buffer_frames << " were expected!";
@ -102,8 +102,7 @@ void AthenaOpusDecoder::lostFrame(QByteArray &decodedBuffer)
int decoded_frames = opus_decode( _decoder, nullptr, 0, reinterpret_cast<opus_int16*>(decodedBuffer.data()), buffer_frames, 1 );
if ( decoded_frames >= 0 ) {
qCDebug(decoder) << "Produced " << decoded_frames << " opus frames from a lost frame, " << buffer_frames << " expected";
//qCDebug(decoder) << "Produced " << decoded_frames << " opus frames from a lost frame, " << buffer_frames << " expected";
if ( decoded_frames < buffer_frames ) {
qCWarning(decoder) << "Opus decoder returned " << decoded_frames << ", but " << buffer_frames << " were expected!";
@ -118,6 +117,7 @@ void AthenaOpusDecoder::lostFrame(QByteArray &decodedBuffer)
qCCritical(decoder) << "Failed to decode lost frame: " << error_to_string(decoded_frames);
decodedBuffer.fill('\0');
}
}

View file

@ -72,7 +72,7 @@ void AthenaOpusEncoder::encode(const QByteArray& decodedBuffer, QByteArray& enco
int bytes = opus_encode(_encoder, reinterpret_cast<const opus_int16*>(decodedBuffer.constData()), frame_size, reinterpret_cast<unsigned char*>(encodedBuffer.data()), encodedBuffer.size() );
if ( bytes >= 0 ) {
qCDebug(encoder) << "Encoded " << decodedBuffer.length() << " bytes into " << bytes << " opus bytes";
//qCDebug(encoder) << "Encoded " << decodedBuffer.length() << " bytes into " << bytes << " opus bytes";
encodedBuffer.resize(bytes);
} else {
encodedBuffer.resize(0);