Skip to content

Commit e3beddf

Browse files
author
Clement Champetier
committed
AudioTransform: added log of audio conversion as info
1 parent 3a7a040 commit e3beddf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/AvTranscoder/transform/AudioTransform.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ extern "C" {
2626
}
2727

2828
#include <stdexcept>
29+
#include <sstream>
2930

3031
namespace avtranscoder
3132
{
@@ -73,6 +74,14 @@ bool AudioTransform::init( const Frame& srcFrame, const Frame& dstFrame )
7374
msg << "out_sample_fmt " << dst.desc().getSampleFormat() << std::endl;
7475
throw std::runtime_error( msg.str() );
7576
}
77+
78+
std::stringstream msg;
79+
msg << "Audio conversion from " << src.desc().getSampleFormatName() << " to " << dst.desc().getSampleFormatName() << std::endl;
80+
msg << "Source, number of channels = " << src.desc().getChannels() << std::endl;
81+
msg << "Source, sample rate = " << src.desc().getSampleRate() << std::endl;
82+
msg << "Destination, number of channels = " << dst.desc().getChannels() << std::endl;
83+
msg << "Destination, sample rate = " << dst.desc().getSampleRate() << std::endl;
84+
LOG_INFO( msg.str() )
7685

7786
return true;
7887
}

0 commit comments

Comments
 (0)