feat: 支持音频转码

This commit is contained in:
ydajiang
2025-07-03 17:27:45 +08:00
parent 7155b866c2
commit 67050bf9b9
15 changed files with 423 additions and 110 deletions

View File

@@ -1,4 +1,18 @@
package transcode
import (
"github.com/lkmio/avformat"
"github.com/lkmio/avformat/utils"
)
var (
CreateAudioTranscoder func(src *avformat.AVStream, dst []utils.AVCodecID) (Transcoder, *avformat.AVStream, error)
)
type Transcoder interface {
Transcode(src *avformat.AVPacket, cb func([]byte, int)) (int, error)
GetEncoderID() utils.AVCodecID
Close()
}