Some more files with types (#302)
This commit is contained in:
@@ -26,7 +26,7 @@ type telemetryServiceInternal struct {
|
||||
webhookPool *workerpool.WorkerPool
|
||||
|
||||
// one worker per participant
|
||||
workers map[string]*StatsWorker
|
||||
workers map[livekit.ParticipantID]*StatsWorker
|
||||
|
||||
analytics AnalyticsService
|
||||
}
|
||||
@@ -35,26 +35,26 @@ func NewTelemetryServiceInternal(notifier webhook.Notifier, analytics AnalyticsS
|
||||
return &telemetryServiceInternal{
|
||||
notifier: notifier,
|
||||
webhookPool: workerpool.New(1),
|
||||
workers: make(map[string]*StatsWorker),
|
||||
workers: make(map[livekit.ParticipantID]*StatsWorker),
|
||||
analytics: analytics,
|
||||
}
|
||||
}
|
||||
|
||||
func (t *telemetryServiceInternal) AddUpTrack(participantID string, trackID string, buff *buffer.Buffer) {
|
||||
func (t *telemetryServiceInternal) AddUpTrack(participantID livekit.ParticipantID, trackID livekit.TrackID, buff *buffer.Buffer) {
|
||||
w := t.workers[participantID]
|
||||
if w != nil {
|
||||
w.AddBuffer(trackID, buff)
|
||||
}
|
||||
}
|
||||
|
||||
func (t *telemetryServiceInternal) OnDownstreamPacket(participantID string, trackID string, bytes int) {
|
||||
func (t *telemetryServiceInternal) OnDownstreamPacket(participantID livekit.ParticipantID, trackID livekit.TrackID, bytes int) {
|
||||
w := t.workers[participantID]
|
||||
if w != nil {
|
||||
w.OnDownstreamPacket(trackID, bytes)
|
||||
}
|
||||
}
|
||||
|
||||
func (t *telemetryServiceInternal) HandleRTCP(streamType livekit.StreamType, participantID string, trackID string, pkts []rtcp.Packet) {
|
||||
func (t *telemetryServiceInternal) HandleRTCP(streamType livekit.StreamType, participantID livekit.ParticipantID, trackID livekit.TrackID, pkts []rtcp.Packet) {
|
||||
stats := &livekit.AnalyticsStat{}
|
||||
for _, pkt := range pkts {
|
||||
switch pkt := pkt.(type) {
|
||||
|
||||
Reference in New Issue
Block a user