Skip to content

Consumer: Only drop packets in RTP sequence manager when they belong to current spatial layer#1549

Merged
ibc merged 3 commits intov3from
consumer-fix-rtp-seq-manager-drop-calls
Jun 26, 2025
Merged

Consumer: Only drop packets in RTP sequence manager when they belong to current spatial layer#1549
ibc merged 3 commits intov3from
consumer-fix-rtp-seq-manager-drop-calls

Conversation

@ibc
Copy link
Member

@ibc ibc commented Jun 25, 2025

Details

  • Do not call rtpSeqManager->Drop(seq) if the packet doesn't belong to the current spatial layer. Why? Because if we call Drop(seq) in SimulcastConsumer no matter the spatial layer (AKA SSRC stream) we are polluting our single rtpSeqManager with drops of unrelated seq numbers, and this could perfectly break the ongoing continuous RTP stream.
  • This also affects other classes such as SimpleConsumer etc. it's not just about simulcast.
  • Also move some blocks/checks to have more consistent code across different XxxxConsumer classes.
  • Also complete many missing things in PipeConsumer.cpp.

Bonus Tracks

  • Rename RtcLogger::Drop() to RtcLogger::Discard() and DropReason to DiscardReason. This is because we want to only use "drop" term when we also call Drop() on the RTP sequence manager while there are packets that are discarded without involving any action in the RTP sequence manager.
  • Remove some inline keywords in XxxxConsumer.cpp files because they are completely useless in 2025.

@ibc ibc requested a review from jmillan June 25, 2025 17:08
Copy link
Member

@jmillan jmillan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is fine. Just please check my comments and put the discard logs back in place. Feel free to rename RtcLogger.Dropped() by RtcLogger.Discarded().

@ibc ibc requested a review from jmillan June 26, 2025 08:41
@ibc ibc merged commit 858d1d7 into v3 Jun 26, 2025
70 checks passed
@ibc ibc deleted the consumer-fix-rtp-seq-manager-drop-calls branch June 26, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants