mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-19 17:44:50 +00:00
* 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
17 lines
336 B
Go
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
|
|
}
|
|
}
|