share vp8 config push and ice resolve, fix vk ice hosts, widen kick greps
This commit is contained in:
1 parent
2f366b1128
commit
69de2bd8b7
10 files changed
+83
-162
No files matched your search
@@ -2,13 +2,8 @@ package joiner
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"whitelist-bypass/relay/tunnel"
|
||||
)
|
||||
|
||||
const configResendPeriod = 3 * time.Second
|
||||
|
||||
type configAckTracker struct {
|
||||
mu sync.Mutex
|
||||
acked chan struct{}
|
||||
@@ -46,23 +41,3 @@ func (t *configAckTracker) mark() {
|
||||
close(t.acked)
|
||||
}
|
||||
}
|
||||
|
||||
func sendVP8ConfigUntilAcked(acked, cancel <-chan struct{}, stopCh <-chan struct{}, tun tunnel.DataTunnel, fps, batch, trackCount int, logFn func(string, ...any), logPrefix string) {
|
||||
tun.SendData(tunnel.EncodeVP8Config(fps, batch, trackCount))
|
||||
ticker := time.NewTicker(configResendPeriod)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
select {
|
||||
case <-acked:
|
||||
return
|
||||
case <-cancel:
|
||||
return
|
||||
case <-stopCh:
|
||||
return
|
||||
case <-ticker.C:
|
||||
logFn("%s: resending vp8 config fps=%d batch=%d trackCount=%d, no ack yet",
|
||||
logPrefix, fps, batch, trackCount)
|
||||
tun.SendData(tunnel.EncodeVP8Config(fps, batch, trackCount))
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user