move NewStatsInterceptorFactory
This commit is contained in:
@@ -6,6 +6,14 @@ import (
|
|||||||
"github.com/pion/rtcp"
|
"github.com/pion/rtcp"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func (t *TelemetryService) NewStatsInterceptorFactory(participantID, identity string) *StatsInterceptorFactory {
|
||||||
|
return &StatsInterceptorFactory{
|
||||||
|
t: t,
|
||||||
|
participantID: participantID,
|
||||||
|
identity: identity,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type StatsInterceptorFactory struct {
|
type StatsInterceptorFactory struct {
|
||||||
t *TelemetryService
|
t *TelemetryService
|
||||||
participantID string
|
participantID string
|
||||||
|
|||||||
@@ -39,14 +39,6 @@ func NewTelemetryService(notifier webhook.Notifier) *TelemetryService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TelemetryService) NewStatsInterceptorFactory(participantID, identity string) *StatsInterceptorFactory {
|
|
||||||
return &StatsInterceptorFactory{
|
|
||||||
t: t,
|
|
||||||
participantID: participantID,
|
|
||||||
identity: identity,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (t *TelemetryService) OnDownstreamPacket(participantID string, bytes int) {
|
func (t *TelemetryService) OnDownstreamPacket(participantID string, bytes int) {
|
||||||
t.RLock()
|
t.RLock()
|
||||||
w := t.workers[participantID]
|
w := t.workers[participantID]
|
||||||
|
|||||||
Reference in New Issue
Block a user