server: expose both setupped tracks and published tracks

This commit is contained in:
aler9
2021-03-16 10:21:35 +01:00
parent 580917d607
commit b47ebbee01
3 changed files with 37 additions and 38 deletions

View File

@@ -121,8 +121,8 @@ func (s *serverUDPListener) run() {
if clientData.isPublishing {
now := time.Now()
atomic.StoreInt64(clientData.sc.publishTracks[clientData.trackID].udpLastFrameTime, now.Unix())
clientData.sc.publishTracks[clientData.trackID].rtcpReceiver.ProcessFrame(now, s.streamType, buf[:n])
atomic.StoreInt64(clientData.sc.announcedTracks[clientData.trackID].udpLastFrameTime, now.Unix())
clientData.sc.announcedTracks[clientData.trackID].rtcpReceiver.ProcessFrame(now, s.streamType, buf[:n])
}
clientData.sc.readHandlers.OnFrame(clientData.trackID, s.streamType, buf[:n])