Fix NACK handling in simulcast (fixed in ion-sfu)

This commit is contained in:
David Zhao
2021-10-04 17:17:41 -07:00
parent 1c12272927
commit 797d2607c4
4 changed files with 39 additions and 26 deletions
+18 -6
View File
@@ -52,6 +52,24 @@ func (w *rtpReporterWriter) Write(p []byte) (n int, err error) {
return w.ReadWriteCloser.Write(p)
}
// StatsInterceptorFactory is created for each participant to keep of track of outgoing stats
// it adheres to Pion interceptor.Factory interface
type StatsInterceptorFactory struct {
reporter *RoomStatsReporter
}
func NewStatsInterceptorFactory(reporter *RoomStatsReporter) *StatsInterceptorFactory {
return &StatsInterceptorFactory{
reporter: reporter,
}
}
func (f *StatsInterceptorFactory) NewInterceptor(id string) (interceptor.Interceptor, error) {
return &StatsInterceptor{
reporter: f.reporter,
}, nil
}
// StatsInterceptor is created for each participant to keep of track of outgoing stats
// it adheres to Pion interceptor interface
type StatsInterceptor struct {
@@ -59,12 +77,6 @@ type StatsInterceptor struct {
reporter *RoomStatsReporter
}
func NewStatsInterceptor(reporter *RoomStatsReporter) *StatsInterceptor {
return &StatsInterceptor{
reporter: reporter,
}
}
// BindRTCPWriter lets you modify any outgoing RTCP packets. It is called once per PeerConnection. The returned method
// will be called once per packet batch.
func (s *StatsInterceptor) BindRTCPWriter(writer interceptor.RTCPWriter) interceptor.RTCPWriter {