Skip to content

fix(rtp): associate repair SSRC with base stream RTX parameters (closes #12)#72

Open
nightness wants to merge 1 commit intowebrtc-rs:masterfrom
Brainwires:fix/rrid-support
Open

fix(rtp): associate repair SSRC with base stream RTX parameters (closes #12)#72
nightness wants to merge 1 commit intowebrtc-rs:masterfrom
Brainwires:fix/rrid-support

Conversation

@nightness
Copy link
Copy Markdown

Summary

Implements rrid (urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id) handling, closing #12.

What was missing: The rrid extension was already parsed from RTP header extensions and the URI already registered in configure_simulcast_extension_headers(). The handler body at endpoint.rs:450 was a TODO stub.

What rrid means: when an RTP packet carries rrid = "X", it is a repair/RTX stream for the base stream whose rid = "X". The repair packet's SSRC should be stored in the base stream's RTCRtpCodingParameters.rtx.ssrc field.

Fix: when rrid is non-empty, look up the base stream's coding parameters using get_coding_parameter_mut_by_rid(rrid) and set the RTX SSRC — creating or updating the RTCRtpRtxParameters as needed.

Test plan

  • cargo build passes
  • cargo test -p rtc passes (246 tests)
  • Manual simulcast test: a sender with RTX enabled should have repair SSRCs mapped to the correct base streams after the first repair packet is received

🤖 Generated with Claude Code

webrtc-rs#12)

Implements rrid (urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id)
handling, resolving webrtc-rs#12.

rrid is already parsed from RTP header extensions and the URI is
registered — the handler body was a TODO stub.  When an RTP packet
carries rrid, it is a repair/RTX stream for the base stream identified
by that rrid value (= the base stream's rid).  Map the repair SSRC into
the base stream's coding parameters' RTX field so downstream routing and
stats can correlate the repair stream with its source stream.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant