mirror of
https://github.com/livekit/livekit.git
synced 2026-04-29 08:15:29 +00:00
report all simulcast layers (#4491)
This commit is contained in:
@@ -437,6 +437,11 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track sfu.TrackRe
|
||||
ti.Source,
|
||||
ti.Type,
|
||||
)
|
||||
for _, c := range ti.Codecs {
|
||||
for _, l := range c.Layers {
|
||||
t.params.Reporter.ReportLayer(roomobs.PackTrackLayer(l.Height, l.Width))
|
||||
}
|
||||
}
|
||||
newWR.OnStatsUpdate(func(_ *sfu.WebRTCReceiver, stat *livekit.AnalyticsStat) {
|
||||
// send for only one codec, either primary (priority == 0) OR regressed codec
|
||||
t.lock.RLock()
|
||||
@@ -452,7 +457,6 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track sfu.TrackRe
|
||||
tx.ReportType(roomobs.TrackTypeFromProto(ti.Type))
|
||||
tx.ReportSource(roomobs.TrackSourceFromProto(ti.Source))
|
||||
tx.ReportMime(mime.NormalizeMimeType(ti.MimeType).ReporterType())
|
||||
tx.ReportLayer(roomobs.PackTrackLayer(ti.Height, ti.Width))
|
||||
tx.ReportDuration(uint16(cs.EndTime.Sub(cs.StartTime).Milliseconds()))
|
||||
tx.ReportFrames(uint16(cs.Frames))
|
||||
tx.ReportRecvBytes(uint32(cs.Bytes))
|
||||
|
||||
Reference in New Issue
Block a user