stats for pli and bitrate (#487)

* stats for pli and bitrate

* solve comments

* return 0 if no pli sent
This commit is contained in:
cnderrauber
2022-03-07 14:59:01 +08:00
committed by GitHub
parent e5ffd38054
commit 608da4ba4b
11 changed files with 282 additions and 4 deletions
+11
View File
@@ -1650,3 +1650,14 @@ func (p *ParticipantImpl) handlePendingDataChannels() {
}
p.pendingDataChannels = nil
}
func (p *ParticipantImpl) GetSubscribedTracks() []types.SubscribedTrack {
p.lock.RLock()
defer p.lock.RUnlock()
tracks := make([]types.SubscribedTrack, 0, len(p.subscribedTracks))
for _, t := range p.subscribedTracks {
tracks = append(tracks, t)
}
return tracks
}