|
|
@ -620,6 +620,12 @@ func NewAudioEncoderByCodecType(typ av.CodecType) (enc *AudioEncoder, err error)
|
|
|
|
switch typ {
|
|
|
|
switch typ {
|
|
|
|
case av.AAC:
|
|
|
|
case av.AAC:
|
|
|
|
id = C.AV_CODEC_ID_AAC
|
|
|
|
id = C.AV_CODEC_ID_AAC
|
|
|
|
|
|
|
|
case av.PCM_ALAW:
|
|
|
|
|
|
|
|
id = C.AV_CODEC_ID_PCM_ALAW
|
|
|
|
|
|
|
|
case av.PCM_MULAW:
|
|
|
|
|
|
|
|
id = C.AV_CODEC_ID_PCM_MULAW
|
|
|
|
|
|
|
|
case av.G729:
|
|
|
|
|
|
|
|
id = C.AV_CODEC_ID_G729
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
err = fmt.Errorf("ffmpeg: cannot find encoder codecType=%d", typ)
|
|
|
|
err = fmt.Errorf("ffmpeg: cannot find encoder codecType=%d", typ)
|
|
|
|