Capture bandwidth switch (#14)

* Handle bitrate change by finding the stream with closest bitrate as peer

* Convert video id into bitrate when creating peer or changing bitrate

* Try to fix prometheus panic

* Revert metrics label name change

* minor fixes.

* bitrate selector.

* skip if moving to the same stream.

* no closure for getting target bitrate.

* fix: high res switch to lo video, stream bitrate out of range

* revert dev config change.

* white space.

Co-authored-by: Aleksandar Sukovic <aleksandar.sukovic@gmail.com>
This commit is contained in:
Miroslav Šedivý
2022-10-25 20:25:00 +02:00
committed by GitHub
parent e0bee67e85
commit 6067367acd
10 changed files with 186 additions and 52 deletions

View File

@ -48,7 +48,7 @@ type SystemDisconnect struct {
type SignalProvide struct {
SDP string `json:"sdp"`
ICEServers []types.ICEServer `json:"iceservers"`
Video string `json:"video"`
Video string `json:"video"` // TODO: Refactor.
}
type SignalCandidate struct {
@ -60,7 +60,8 @@ type SignalDescription struct {
}
type SignalVideo struct {
Video string `json:"video"`
Video string `json:"video"` // TODO: Refactor.
Bitrate int `json:"bitrate"`
}
/////////////////////////////