mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 22:05:39 +00:00
* Handle an edge in layer lock. A very edge case - Available layer: [0, 1, 2], but bitrate is not yet available. We set it to layer 2 awaiting measurement. - Measurement for layers 0 and 1 come through. - Still no key frame for layer 2. - Finalize layers runs and sees that bitrate is available for 0 and 1. It finalizes layer 1. - Layer 1 key frame comes (because we asked key frame of layer 2, publisher sends key frame for all layers). Locks to layer 1. - No more events happen to switch to layer 2. Changes ------- - Move bit rate measurement to StreamTrackerManager. Allows re-use in relay. - Make bit rate availability (from zero -> non-zero) an event and let it flow through the stream allocation flow so that we always have an event when bit rate measurement becomes available. This gets rid of finalization which I was unhappy with it anyway as it was polling every second. - Removing REMB stuff from buffer. We do not use it. It is incorrect anyway. REMB should be ay peer connection level. * Fix test * fix test * Simplify allocate * Simplify/clean up