diff --git a/go-version/go.mod b/go-version/go.mod index cefe56c..32b5bf5 100644 --- a/go-version/go.mod +++ b/go-version/go.mod @@ -7,8 +7,6 @@ require github.com/gofiber/fiber/v2 v2.29.0 require ( github.com/andybalholm/brotli v1.0.4 // indirect github.com/klauspost/compress v1.15.0 // indirect - github.com/reiver/go-oi v1.0.0 // indirect - github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasthttp v1.34.0 // indirect github.com/valyala/tcplisten v1.0.0 // indirect diff --git a/go-version/go.sum b/go-version/go.sum index 16120e8..fa74fb3 100644 --- a/go-version/go.sum +++ b/go-version/go.sum @@ -4,10 +4,6 @@ github.com/gofiber/fiber/v2 v2.29.0 h1:wopU1kXxdD9XxvQqYd1vSWMGu2PiZN0yy+DojygTR github.com/gofiber/fiber/v2 v2.29.0/go.mod h1:1Ega6O199a3Y7yDGuM9FyXDPYQfv+7/y48wl6WCwUF4= github.com/klauspost/compress v1.15.0 h1:xqfchp4whNFxn5A4XFyyYtitiWI8Hy5EW59jEwcyL6U= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/reiver/go-oi v1.0.0 h1:nvECWD7LF+vOs8leNGV/ww+F2iZKf3EYjYZ527turzM= -github.com/reiver/go-oi v1.0.0/go.mod h1:RrDBct90BAhoDTxB1fenZwfykqeGvhI6LsNfStJoEkI= -github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e h1:quuzZLi72kkJjl+f5AQ93FMcadG19WkS7MO6TXFOSas= -github.com/reiver/go-telnet v0.0.0-20180421082511-9ff0b2ab096e/go.mod h1:+5vNVvEWwEIx86DB9Ke/+a5wBI464eDRo3eF0LcfpWg= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.34.0 h1:d3AAQJ2DRcxJYHm7OXNXtXt2as1vMDfxeIcFvhmGGm4= diff --git a/go-version/vmix-snapshot-proxy.exe b/go-version/vmix-snapshot-proxy.exe index 5a167e9..e4e1f21 100755 Binary files a/go-version/vmix-snapshot-proxy.exe and b/go-version/vmix-snapshot-proxy.exe differ diff --git a/go-version/vmix-snapshot-proxy.go b/go-version/vmix-snapshot-proxy.go index e12b416..0d30f17 100644 --- a/go-version/vmix-snapshot-proxy.go +++ b/go-version/vmix-snapshot-proxy.go @@ -23,6 +23,7 @@ var vmixIP string = "localhost" var vmixPort int = 8088 var vmixUrl string var vmixPath string = fmt.Sprintf("%s\\Documents\\vMixStorage", os.Getenv("USERPROFILE")) +var snapshotInterval = 2000 * time.Millisecond /* Example vMix Input XML @@ -128,7 +129,7 @@ func main() { app.Static("/", vmixPath) // start the interval to refresh snapshots - ticker := time.NewTicker(500 * time.Millisecond) + ticker := time.NewTicker(snapshotInterval) defer ticker.Stop() lastInput := 0 tickerCounter := 0 @@ -136,8 +137,10 @@ func main() { for range ticker.C { // ask for a snapshot if len(vmix.Inputs.Inputs) > 0 { - lastInput = (lastInput + 1) % len(vmix.Inputs.Inputs) + // inputs are indexed by 1 in vmix + lastInput = lastInput%len(vmix.Inputs.Inputs) + 1 RequestSnapshots(lastInput) + RequestSnapshots(0) } // maybe ask for all inputs again diff --git a/go-version/vmix-snapshot-proxy.zip b/go-version/vmix-snapshot-proxy.zip index 2aabd96..66a4086 100644 Binary files a/go-version/vmix-snapshot-proxy.zip and b/go-version/vmix-snapshot-proxy.zip differ