Update codec to be dynamically registered

This commit is contained in:
Lukas Herman
2020-01-05 22:04:20 -08:00
parent 46b2c15bcf
commit 62aef6b8f3
9 changed files with 115 additions and 72 deletions

View File

@@ -11,3 +11,12 @@ type VideoDecoder interface {
Decode([]byte) (image.Image, error)
Close() error
}
type VideoSetting struct {
Width, Height int
TargetBitRate, MaxBitRate int
FrameRate float32
}
type VideoEncoderBuilder func(s VideoSetting) (VideoEncoder, error)
type VideoDecoderBuilder func(s VideoSetting) (VideoDecoder, error)