Repository navigation
librtmp2 0.17.0
Added
- C publish/play authorization.
lrtmp2_server_set_publish_auth_cband
lrtmp2_server_set_play_auth_cbinstall a synchronous callback with an
opaque userdata pointer; a zero return allows, any other value denies. The
C callback takes priority over the Rust hooks on that connection and fails
closed when a name contains NUL. Without a callback the default stays
allow, so existing C embedders are source- and behavior-compatible. The
generated header and the README document the API.
Fixed
- Replacing or clearing a server's C authorization callback now updates
already accepted connections. Before, they kept invoking the old callback
with potentially freed userdata and a newly installed policy was ignored. - A direct
read_messagesbatch clears the buffered-work flag, so a host
that loops onhas_buffered_messages()no longer carries the state of the
previous batch. createStreamre-arms the setup window only when it replaces a live
publish or play role that carried media. CyclingcreateStreamno longer
extends the setup timeout, so an idle client cannot dodge the reaper and
squat connection slots.- A multitrack message is charged once against the per-receive message
budget instead of once per sub-track. A wide container no longer fails the
connection or drops the following aggregate sub-tags, every sub-track in
the message is still authorized, and a separate per-receive track budget
bounds the work after the current frame. The track budget resets on the
next receive batch and for directread_messagescallers. - A client session reset clears the deferred terminal I/O error.
- Benchmark tooling rejects unknown, repeated or conflicting arguments
instead of treating them as the URL.
Changed
- The C authorization setters document that callbacks must not re-enter the
same server and setters must not run concurrently withpoll. - Build dependency update: cc 1.11.1.
Benchmarks
Measured automatically for this release on a CI runner; the machine is described below. Raw data: bench-results-v0.17.0.json.
- Measured: 2026-11-06 23:11:16 UTC ·
7c9e496· crate version 0.17.0 · workflow run - CPU: AMD EPYC 7763 64-Core Processor · 4 vCPUs
- RAM: 15.6 GiB
- System: Linux 7.0.0-1019-azure x86_64 · rustc 1.99.1 · GitHub-hosted ubuntu26 (image 20261101.186.1)
- Noise: shared CI VM — CPU model, neighbouring load and the runner image change between runs, so treat absolute numbers as indicative.
- Comparable vs release v0.16.1: ❌ different hardware (AMD EPYC 9V74 80-Core Processor, 4 vCPUs vs AMD EPYC 7763 64-Core Processor, 4 vCPUs): only large changes (> 25 %) mean anything
protocol
| Benchmark | Time | Throughput | vs release v0.16.1 |
|---|---|---|---|
amf0_build_connect |
204 ns | — | 🔴 +30.6 % |
chunk/write_read_roundtrip |
5.41 µs | ~723 MiB/s | ⚪ +23.2 % |
flv/audio_tag_aac |
1.25 ns | — | ⚪ +14.1 % |
flv/video_tag_h264 |
1.25 ns | — | ⚪ +13.8 % |
fourcc_to_video_codec_avc1 |
2.18 ns | — | ⚪ +13.6 % |
server_read_c1 |
944 ns | — | ⚪ +18.5 % |
relay
| Benchmark | Time | Throughput | vs release v0.16.1 |
|---|---|---|---|
relay/publish_to_player/100 |
51.3 ms | ~1949 elem/s | ⚪ +0.2 % |
relay/publish_to_player/500 |
53.1 ms | ~9422 elem/s | ⚪ +0.3 % |
🟢 faster · 🔴 slower · ⚪ within the noise band (5–25 % depending on how comparable the two environments are, plus both runs' Criterion confidence intervals). Lower time is better.