Add a key frame seeder in up track. (#3524)

This commit is contained in:
Raja Subramanian
2025-03-12 22:11:27 +05:30
committed by GitHub
parent 0f61ff3a2f
commit c823320528
4 changed files with 78 additions and 22 deletions
+7
View File
@@ -346,6 +346,13 @@ func (r *rtpStatsBase) UpdateKeyFrame(kfCount uint32) {
r.lastKeyFrame = time.Now()
}
func (r *rtpStatsBase) KeyFrame() (uint32, time.Time) {
r.lock.RLock()
defer r.lock.RUnlock()
return r.keyFrames, r.lastKeyFrame
}
func (r *rtpStatsBase) UpdateRtt(rtt uint32) {
r.lock.Lock()
defer r.lock.Unlock()