Skip to content

Commit

Permalink
release version v0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffmikels committed Mar 29, 2022
1 parent fe7d416 commit e641fcb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions go-version/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions go-version/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Binary file modified go-version/vmix-snapshot-proxy.exe
Binary file not shown.
7 changes: 5 additions & 2 deletions go-version/vmix-snapshot-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
<inputs>
Expand Down Expand Up @@ -128,16 +129,18 @@ 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
go func() {
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
Expand Down
Binary file modified go-version/vmix-snapshot-proxy.zip
Binary file not shown.

0 comments on commit e641fcb

Please sign in to comment.