1
0
mirror of https://github.com/ossrs/srs.git synced 2026-10-24 09:59:20 +03:00
Files
Winlin 3fc1810a46 WebRTC: Add RFC 4588 RTX config, tests, tools fix. v8.0.41 (#4746)
First step toward RFC 4588 RTX retransmission with SSRC multiplexing
(#4671). This PR adds the config, the server-side groundwork, the tests
and the test tools. RTX negotiation, the uplink unwrap and the downlink
RTX send path come in a follow-up PR.

## Config

New per-vhost `nack_prefer_rtx` directive, off by default. It can be
overridden with `SRS_VHOST_RTC_NACK_PREFER_RTX`.

```
vhost __defaultVhost__ {
    rtc {
        nack_prefer_rtx on;
    }
}
```

`rtc.rtx.conf` and `rtc.plain.conf` are sample configs for the two
modes. `regression-test.conf` turns RTX on.

## Server changes

- **NACK simulator fix:** simulated drops (and `drop_for_pt`) now happen
before SRTP unprotect. Before, a dropped packet had already been
unprotected, so its retransmission was rejected as a replay.
- SDP writes `a=ssrc-group` lines. `SrsRtxPayloadDes` uses the offered
clock rate and reads `apt` from the fmtp.
- A play NACK that names an RTX SSRC is ignored.
- RTX counters show up as cumulative totals in the `rtx=(s,r,u,p)` stats
group.
- Detailed NACK logs are compiled in only for `--simulator=on` or
debug-drop builds.

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 20:38:54 -04:00
..