Refactor receiver and buffer into Base and higher layer. (#4185)

* Refactor receiver and buffer into Base and higher layer.

To be able to share code/functionality with relay.

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* clean up

* deps

* fix test

* fix test
This commit is contained in:
Raja Subramanian
2025-12-23 21:35:48 +05:30
committed by GitHub
parent 4104b8270b
commit 7c8ea11505
13 changed files with 2877 additions and 2015 deletions
+2 -2
View File
@@ -1125,7 +1125,7 @@ func (r *RTPStatsSender) ToProto() *livekit.RTPStats {
}
func (r *RTPStatsSender) getAndResetSenderSnapshotWindow(senderSnapshotID uint32) (*senderSnapshotWindow, *senderSnapshotWindow) {
if !r.initialized {
if !r.initialized || senderSnapshotID < cFirstSnapshotID {
return nil, nil
}
@@ -1166,7 +1166,7 @@ func (r *RTPStatsSender) getSenderSnapshotWindow(startTime int64) senderSnapshot
}
func (r *RTPStatsSender) getAndResetSenderSnapshotReceiverView(senderSnapshotID uint32) (*senderSnapshotReceiverView, *senderSnapshotReceiverView) {
if !r.initialized || r.lastRRTime == 0 {
if !r.initialized || r.lastRRTime == 0 || senderSnapshotID < cFirstSnapshotID {
return nil, nil
}