mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
move consts.
This commit is contained in:
parent
3f375c037f
commit
5a2fcc1c8a
@ -44,9 +44,6 @@ const (
|
||||
|
||||
// send a PLI on an interval so that the publisher is pushing a keyframe every rtcpPLIInterval
|
||||
rtcpPLIInterval = 3 * time.Second
|
||||
|
||||
// how often we check the bitrate of each client. Default is 250ms
|
||||
bitrateCheckInterval = 250 * time.Millisecond
|
||||
)
|
||||
|
||||
func New(desktop types.DesktopManager, capture types.CaptureManager, config *config.WebRTC) *WebRTCManagerCtx {
|
||||
|
@ -11,7 +11,10 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
)
|
||||
|
||||
var connectionStatsInterval = 5 * time.Second
|
||||
const (
|
||||
// how often to read and process webrtc connection stats
|
||||
connectionStatsInterval = 5 * time.Second
|
||||
)
|
||||
|
||||
type metricsManager struct {
|
||||
mu sync.Mutex
|
||||
|
@ -17,6 +17,11 @@ import (
|
||||
"github.com/demodesk/neko/pkg/types/message"
|
||||
)
|
||||
|
||||
const (
|
||||
// how often to read and process bandwidth estimation reports
|
||||
estimatorReadInterval = 250 * time.Millisecond
|
||||
)
|
||||
|
||||
type WebRTCPeerCtx struct {
|
||||
mu sync.Mutex
|
||||
logger zerolog.Logger
|
||||
@ -115,7 +120,7 @@ func (peer *WebRTCPeerCtx) estimatorReader() {
|
||||
}
|
||||
|
||||
// use a ticker to get current client target bitrate
|
||||
ticker := time.NewTicker(bitrateCheckInterval)
|
||||
ticker := time.NewTicker(estimatorReadInterval)
|
||||
defer ticker.Stop()
|
||||
|
||||
for range ticker.C {
|
||||
|
Loading…
Reference in New Issue
Block a user