WebRTC congestion control (#26)

* Add congestion control

* Improve stream matching, add manual stream selection, add metrics

* Use a ticker for bitrate estimation and make bandwidth drops switch to lower streams more aggressively

* Missing signal response, fix video auto bug

* Remove redundant mutex

* Bitrate history queue

* Get bitrate fn support h264 & float64

---------

Co-authored-by: Aleksandar Sukovic <aleksandar.sukovic@gmail.com>
This commit is contained in:
Miroslav Šedivý 2023-02-06 19:45:51 +01:00 committed by GitHub
parent e80ae8019e
commit 2364facd60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 738 additions and 222 deletions

View file

@ -327,10 +327,10 @@ func (m *metricsCtx) SetVideoID(session types.Session, videoId string) {
}
}
func (m *metricsCtx) SetReceiverEstimatedMaximumBitrate(session types.Session, bitrate float32) {
func (m *metricsCtx) SetReceiverEstimatedMaximumBitrate(session types.Session, bitrate float64) {
met := m.getBySession(session)
met.receiverEstimatedMaximumBitrate.Set(float64(bitrate))
met.receiverEstimatedMaximumBitrate.Set(bitrate)
}
func (m *metricsCtx) SetReceiverReport(session types.Session, report rtcp.ReceptionReport) {