adaptive fps moved to pipeline creation.

This commit is contained in:
Miroslav Šedivý
2023-01-29 17:40:07 +01:00
parent c45a315d9b
commit 4094639ea9
7 changed files with 40 additions and 65 deletions

View File

@ -11,13 +11,12 @@ import (
type Capture struct {
// video
Display string
VideoCodec codec.RTPCodec
VideoHWEnc string // TODO: Pipeline builder.
VideoBitrate uint // TODO: Pipeline builder.
VideoMaxFPS int16 // TODO: Pipeline builder.
VideoPipeline string
VideoAdaptiveFramerate bool
Display string
VideoCodec codec.RTPCodec
VideoHWEnc string // TODO: Pipeline builder.
VideoBitrate uint // TODO: Pipeline builder.
VideoMaxFPS int16 // TODO: Pipeline builder.
VideoPipeline string
// audio
AudioDevice string
@ -192,13 +191,7 @@ func (s *Capture) Set() {
s.VideoHWEnc = videoHWEnc
s.VideoBitrate = viper.GetUint("video_bitrate")
s.VideoAdaptiveFramerate = false
s.VideoMaxFPS = int16(viper.GetInt("max_fps"))
if s.VideoMaxFPS == 0 {
// TODO: Get the starting fps from the screen parameter.
s.VideoMaxFPS = 30
s.VideoAdaptiveFramerate = true
}
s.VideoPipeline = viper.GetString("video")
//