Add fps calculator for VP8 and DependencyDescriptor (#1110)

* Add fps calculator for VP8 and DependencyDescriptor

* clean code

* unit test

* clean code

* solve comment
This commit is contained in:
cnderrauber
2022-10-26 09:28:28 +08:00
committed by GitHub
parent 96a058b503
commit 7a7fc09372
17 changed files with 1040 additions and 35 deletions
+5
View File
@@ -314,6 +314,11 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
}
buff.Bind(receiver.GetParameters(), track.Codec().RTPCodecCapability)
// if subscriber request fps before fps calculated, update them after fps updated.
buff.OnFpsChanged(func() {
t.MediaTrackSubscriptions.UpdateVideoLayers()
})
return newCodec
}