Regressions/changes due to the new unique Consumer class
Here some TODO regarding the already merged PR https://github.com/versatica/mediasoup/pull/1731:
Issue 1: PipeTransport now emits "score" events
Consumer::OnRtpStreamScore() now always calls EmitScore(). However it was not like this in former PipeConsumer where OnRtpStreamScore() does nothing.
A pipe consumer now emits "CONSUMER_SCORE" notifications (constant 10/10, since pipe's FillBufferScore() is hardcoded) on every score change of the producer stream, where former PipeConsumer emitted nothing. The code itself has a note:
// NOTE @jmillan: ... Does it make sense to move it here?Update: Handled in PR #1849
Issue 2: SvcProducerStreamManager::GetDesiredBitrate()
SvcProducerStreamManager::GetDesiredBitrate() no longer takes into account score 0, so a dead stream adds its "desired" bitrate to the total. Not dramatic since reading the bitrate of a score 0 stream is safe, but it diverges from the old behavior where if producerRtpStream->GetScore() == 0 it returns 0.
Issue 3: Simulcast
8 calls in simulcast mode Consumer to its weak Consumer::IsActive() where the old SimulcastConsumer used the strong one (in SendRtpPacket(), NeedWorstRemoteFractionLost(), GetTransmissionRate(), ReceiveNack(), keyframe gating, MayChangeLayers()). All of them resolve to no-op downstream (when streams are at score 0, targetLayers/currentSpatialLayer are already -1). Fragile.
Update: Handled in PR #1849
Issue 4: Pipe consumer and key frame request
When in pipe mode, Consumer::ReceiveKeyFrameRequest() now does early return for non-video (previously it continued). Probably we can ignore this.
Source: versatica/mediasoup