Skip to content

Commit

Permalink
Remove unused traffic load (#2734)
Browse files Browse the repository at this point in the history
  • Loading branch information
boks1971 committed May 27, 2024
1 parent 721c36f commit 991ad5a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 503 deletions.
16 changes: 0 additions & 16 deletions pkg/rtc/participant.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ type ParticipantParams struct {
SubscriptionLimitVideo int32
PlayoutDelay *livekit.PlayoutDelay
SyncStreams bool
EnableTrafficLoadTracking bool
ForwardStats *sfu.ForwardStats
}

Expand Down Expand Up @@ -187,7 +186,6 @@ type ParticipantImpl struct {
*TransportManager
*UpTrackManager
*SubscriptionManager
*ParticipantTrafficLoad

// keeps track of unpublished tracks in order to reuse trackID
unpublishedTracks []*livekit.TrackInfo
Expand Down Expand Up @@ -297,7 +295,6 @@ func NewParticipant(params ParticipantParams) (*ParticipantImpl, error) {

p.setupUpTrackManager()
p.setupSubscriptionManager()
p.setupParticipantTrafficLoad()

return p, nil
}
Expand Down Expand Up @@ -865,9 +862,6 @@ func (p *ParticipantImpl) Close(sendLeave bool, reason types.ParticipantCloseRea
go func() {
p.SubscriptionManager.Close(isExpectedToResume)
p.TransportManager.Close()
if p.ParticipantTrafficLoad != nil {
p.ParticipantTrafficLoad.Close()
}
}()

p.dataChannelStats.Stop()
Expand Down Expand Up @@ -1373,16 +1367,6 @@ func (p *ParticipantImpl) setupSubscriptionManager() {
})
}

func (p *ParticipantImpl) setupParticipantTrafficLoad() {
if p.params.EnableTrafficLoadTracking {
p.ParticipantTrafficLoad = NewParticipantTrafficLoad(ParticipantTrafficLoadParams{
Participant: p,
DataChannelStats: p.dataChannelStats,
Logger: p.params.Logger,
})
}
}

func (p *ParticipantImpl) updateState(state livekit.ParticipantInfo_State) {
oldState := p.state.Swap(state).(livekit.ParticipantInfo_State)
if oldState == state {
Expand Down
219 changes: 0 additions & 219 deletions pkg/rtc/participant_traffic_load.go

This file was deleted.

3 changes: 0 additions & 3 deletions pkg/rtc/types/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ type LocalParticipant interface {
OnSubscribeStatusChanged(fn func(publisherID livekit.ParticipantID, subscribed bool))
OnClose(callback func(LocalParticipant))
OnClaimsChanged(callback func(LocalParticipant))
OnTrafficLoad(callback func(trafficLoad *TrafficLoad))

HandleReceiverReport(dt *sfu.DownTrack, report *rtcp.ReceiverReport)

Expand Down Expand Up @@ -423,8 +422,6 @@ type LocalParticipant interface {
SetSubscriberChannelCapacity(channelCapacity int64)

GetPacer() pacer.Pacer

GetTrafficLoad() *TrafficLoad
}

// Room is a container of participants, and can provide room-level actions
Expand Down

0 comments on commit 991ad5a

Please sign in to comment.