feat: speed up first sysInfo call

This commit is contained in:
langhuihui
2024-12-17 16:05:36 +08:00
parent b3a3e37429
commit 0042568dff
17 changed files with 820 additions and 437 deletions

View File

@@ -165,6 +165,11 @@ func (r *Receiver) Receive() (err error) {
},
}
return r.NetConnection.Receive(false, func(channelID byte, buf []byte) error {
if r.Publisher.Paused != nil {
r.Stream.Pause()
r.Publisher.Paused.Await()
r.Stream.Play()
}
if time.Since(rtcpTS) > 5*time.Second {
rtcpTS = time.Now()
// Serialize RTCP packets