add h264. Should hopefully be good for now. not going to push docker build until fully tested.
This commit is contained in:
@@ -27,8 +27,12 @@ func GetPersistedDisplay() int {
|
||||
}
|
||||
|
||||
func DesktopStart(ctx context.Context, env *rt.Env) error {
|
||||
interval, fps := streamInterval("OVERLORD_DESKTOP_MAX_FPS", 60)
|
||||
log.Printf("desktop: starting stream (max fps %d)", fps)
|
||||
interval, fps := streamInterval("OVERLORD_DESKTOP_MAX_FPS", 120)
|
||||
if fps < 60 {
|
||||
fps = 60
|
||||
interval = time.Second / time.Duration(fps)
|
||||
}
|
||||
log.Printf("desktop: starting stream (target fps %d)", fps)
|
||||
ticker := time.NewTicker(interval)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
|
||||
@@ -21,8 +21,8 @@ func streamInterval(envVar string, defFPS int) (time.Duration, int) {
|
||||
if fps < 1 {
|
||||
fps = 1
|
||||
}
|
||||
if fps > 120 {
|
||||
fps = 120
|
||||
if fps > 1000 {
|
||||
fps = 1000
|
||||
}
|
||||
return time.Second / time.Duration(fps), fps
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user