Add a resync API to sfu.DownTrack (#389)

* Add a resync API to sfu.DownTrack

Also passing in logger with context into sfu package. More to do here
with proper logging context in all modules, but this is a start

* Remove debug code

* fix tests
This commit is contained in:
Raja Subramanian
2022-01-30 10:59:47 +05:30
committed by GitHub
parent 7ac3631b6c
commit a1f88faed1
10 changed files with 141 additions and 68 deletions
+11 -5
View File
@@ -4,6 +4,7 @@ import (
"github.com/elliotchance/orderedmap"
"github.com/livekit/livekit-server/pkg/sfu/buffer"
"github.com/livekit/protocol/logger"
)
//
@@ -31,14 +32,19 @@ type VP8MungerParams struct {
}
type VP8Munger struct {
logger logger.Logger
VP8MungerParams
}
func NewVP8Munger() *VP8Munger {
return &VP8Munger{VP8MungerParams: VP8MungerParams{
missingPictureIds: orderedmap.NewOrderedMap(),
lastDroppedPictureId: -1,
}}
func NewVP8Munger(logger logger.Logger) *VP8Munger {
return &VP8Munger{
logger: logger,
VP8MungerParams: VP8MungerParams{
missingPictureIds: orderedmap.NewOrderedMap(),
lastDroppedPictureId: -1,
},
}
}
func (v *VP8Munger) SetLast(extPkt *buffer.ExtPacket) {