cloud-game/pkg/encoder/vpx/options.go
sergystepanov fa28197390
Refactor and update VPX codec (#285)
* Refactor and update VPX codec

* Add VPX codec options support

* Add generic video encoding pipe

* Tweak in/out channels for the pipe

* Update YUV encoder

* Clean VP8 encoder
2021-02-27 18:09:55 +03:00

17 lines
336 B
Go

package vpx
type Options struct {
// Target bandwidth to use for this stream, in kilobits per second.
Bitrate uint
// Force keyframe interval.
KeyframeInt uint
}
type Option func(*Options)
func WithOptions(arg Options) Option {
return func(args *Options) {
args.Bitrate = arg.Bitrate
args.KeyframeInt = arg.KeyframeInt
}
}