Log down track state on seeding. (#3003)
Also, log when RTCP sender report for reference layer is received. Cleaning up a bunch of wrapped logger calls as we already have logger.Proto which I forgot about while doing those wrappers.
This commit is contained in:
@@ -30,6 +30,7 @@ import (
|
||||
"github.com/pion/transport/v2/packetio"
|
||||
"github.com/pion/webrtc/v3"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap/zapcore"
|
||||
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
@@ -145,6 +146,13 @@ func (d DownTrackState) String() string {
|
||||
d.RTPStats, d.DeltaStatsSenderSnapshotId, d.ForwarderState.String())
|
||||
}
|
||||
|
||||
func (d DownTrackState) MarshalLogObject(e zapcore.ObjectEncoder) error {
|
||||
e.AddObject("RTPStats", d.RTPStats)
|
||||
e.AddUint32("DeltaStatsSenderSnapshotId", d.DeltaStatsSenderSnapshotId)
|
||||
e.AddObject("ForwarderState", logger.Proto(d.ForwarderState))
|
||||
return nil
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
/* STREAM-ALLOCATOR-DATA
|
||||
@@ -1245,6 +1253,7 @@ func (d *DownTrack) GetState() DownTrackState {
|
||||
}
|
||||
|
||||
func (d *DownTrack) SeedState(state DownTrackState) {
|
||||
d.params.Logger.Debugw("seeding down track state", "state", state)
|
||||
if state.RTPStats != nil {
|
||||
d.rtpStats.Seed(state.RTPStats)
|
||||
d.deltaStatsSenderSnapshotId = state.DeltaStatsSenderSnapshotId
|
||||
|
||||
Reference in New Issue
Block a user