ffmpeg: can set options for audio encoder

This commit is contained in:
nareix 2016-07-12 11:08:22 +08:00
parent 331bc9ff5f
commit 0c902b3668

View File

@ -208,6 +208,25 @@ func sampleFormatFF2AV(ffsamplefmt int32) (sampleFormat av.SampleFormat) {
return
}
func (self *AudioEncoder) SetSampleFormat(fmt av.SampleFormat) (err error) {
self.SampleFormat = fmt
return
}
func (self *AudioEncoder) SetSampleRate(rate int) (err error) {
self.SampleRate = rate
return
}
func (self *AudioEncoder) SetChannelLayout(ch av.ChannelLayout) (err error) {
self.ChannelLayout = ch
return
}
func (self *AudioEncoder) SetOption(opt string) (err error) {
return
}
func (self *AudioEncoder) Setup() (err error) {
ff := &self.ff.ff