start of fix
This commit is contained in:
@@ -16,7 +16,7 @@ var (
|
||||
func VirtualStart(ctx context.Context, env *rt.Env) error {
|
||||
fps := activeVirtualTargetFPS()
|
||||
interval := time.Second / time.Duration(fps)
|
||||
capture.SetH264TargetFPS(fps)
|
||||
capture.SetBackstageH264TargetFPS(fps)
|
||||
capture.SetFrameFlowTargetFPS(fps)
|
||||
log.Printf("virtual: starting stream (target fps %d)", fps)
|
||||
|
||||
@@ -38,7 +38,7 @@ func VirtualStart(ctx context.Context, env *rt.Env) error {
|
||||
fps := activeVirtualTargetFPS()
|
||||
if fps != currentFPS {
|
||||
currentFPS = fps
|
||||
capture.SetH264TargetFPS(fps)
|
||||
capture.SetBackstageH264TargetFPS(fps)
|
||||
capture.SetFrameFlowTargetFPS(fps)
|
||||
ticker.Reset(time.Second / time.Duration(fps))
|
||||
log.Printf("virtual: target fps changed to %d", fps)
|
||||
@@ -65,7 +65,7 @@ func activeVirtualTargetFPS() int {
|
||||
func SetVirtualTargetFPS(fps int) int {
|
||||
fps = clampDesktopTargetFPS(fps)
|
||||
virtualTargetFPS.Store(int64(fps))
|
||||
capture.SetH264TargetFPS(fps)
|
||||
capture.SetBackstageH264TargetFPS(fps)
|
||||
capture.SetFrameFlowTargetFPS(fps)
|
||||
return fps
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user