File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
src/AvTranscoder/DatasStructures Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ void AudioDesc::setAudioCodec( const AVCodecID codecId )
49
49
initCodecContext ();
50
50
}
51
51
52
+ void AudioDesc::setAudioParameters ( const size_t sampleRate, const size_t channels, const AVSampleFormat& sampleFormat )
53
+ {
54
+ m_codecContext->sample_rate = sampleRate;
55
+ m_codecContext->channels = channels;
56
+ m_codecContext->sample_fmt = sampleFormat;
57
+ }
58
+
52
59
void AudioDesc::initCodecContext ( )
53
60
{
54
61
if ( m_codec == NULL )
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ class AvExport AudioDesc
27
27
void setAudioCodec ( const std::string& codecName );
28
28
void setAudioCodec ( const AVCodecID codecId );
29
29
30
+ void setAudioParameters ( const size_t sampleRate, const size_t channels, const AVSampleFormat& sampleFormat );
31
+
30
32
void set ( const std::string& key, const std::string& flag, const bool enable );
31
33
void set ( const std::string& key, const bool value );
32
34
void set ( const std::string& key, const int value );
You can’t perform that action at this time.
0 commit comments