rtc: route sender reports to the owning receiver - #439
Merged
Conversation
A Sender Report names the remote source it describes in its sender SSRC, which the owning receiver already registered in recv_ssrcmap. Route each SR to that receiver instead of broadcasting it to every receiver, mirror- ing the sender-side feedback routing: reassemble a fresh per-receiver compound carrying the SRs it owns plus the packet types that still fan out (SDES, BYE and the outbound-stream feedback). Map the compound once and build the per-receiver and per-sender buffers under that single map rather than broadcasting the raw buffer and mapping again for senders. Closes #427 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #413 — the receive-side mirror of #426.
r_rtc_rtp_listener_handle_rtcpbroadcast the whole RTCP compound to every receiver. A Sender Report identifies the remote source it describes in its sender SSRC, which the owning receiver already registers inrecv_ssrcmap, so an SR can route to that receiver the same way sender feedback now routes to senders.What changed
Scope note
An RTCP buffer that fails
r_rtcp_buffer_map(a malformed compound) is now dropped rather than handed raw to every receiver. Previously each receiver got a buffer its ownmapwould reject anyway, so no useful data is lost. An SR whose sender SSRC no receiver has registered is likewise dropped rather than broadcast — the same routing-by-SSRC semantics as the sender side.Testing
receiver_receives_own_sender_report: an SR for an unowned source is dropped; an SR naming the receiver's source arrives as a lone SR carrying that sender SSRC. Proven load-bearing by neutering the routing (the unowned SR then reaches the receiver).🤖 Generated with Claude Code