fix non-windows

This commit is contained in:
KingKDot
2026-07-30 08:45:47 -05:00
parent 095a119bf4
commit efa8917168
3 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ func CaptureAndSend(ctx context.Context, env *rt.Env) error {
codec := desktopCodec()
directCanvasVideo := (codec == "h264" || codec == "hevc") &&
(codec != "h264" || !useDesktopSoftwareH264()) &&
useDesktopDuplication() &&
directDesktopVideoEnabled() &&
!(codec == "h264" && webrtcpub.IsActive(webrtcpub.KindDesktop))
directSlotAcquired := false
if directCanvasVideo {
@@ -8,6 +8,10 @@ import (
"overlord-client/cmd/agent/wire"
)
func directDesktopVideoEnabled() bool {
return false
}
func tryBuildDirectH264Frame(_ int) (wire.Frame, time.Duration, time.Duration, bool, error) {
return wire.Frame{}, 0, 0, false, nil
}
@@ -16,6 +16,10 @@ func directVideoKeyframeDue(requested bool, nowNs, lastKeyframeNs int64) bool {
return videoKeyframeEvery > 0 && time.Duration(nowNs-lastKeyframeNs) >= videoKeyframeEvery
}
func directDesktopVideoEnabled() bool {
return useDesktopDuplication()
}
func tryBuildDirectH264Frame(display int) (wire.Frame, time.Duration, time.Duration, bool, error) {
codec := desktopCodec()
if (codec != "h264" && codec != "hevc") || (codec == "h264" && useDesktopSoftwareH264()) || !useDesktopDuplication() {