The sender's queues were unbounded (mpsc::channel plus two VecDeques), expired
payloads one at a time so half a frame could leave after the other half died,
gave repairs a fresh deadline from the clock, spun on a 1 ms sleep, and could
not be driven without PowerShell, ffmpeg and WASAPI. The latency budget also had
two owners: a 2 s producer default that the receiver's 250 ms age never matched.
MediaSendCore (new media_send.rs) owns the queues, hub, feedback intake, repair
cache and budget, and progress counters. run_rudp_mux_once now spawns encoders,
feeds readers into the core and publishes; it decides no deadline.
- The unit is a group: one access unit with its parity, or one audio packet,
stamped produced_at + the request's latency budget when it leaves the
packetizer. Expiry is per group; a group is sent whole or not at all.
- Queues are capped per kind (audio 256, video 512 groups), drop the oldest
group and count it (groups_dropped_audio, groups_dropped_video). The reader
channel is a bounded sync_channel.
- The Annex B packetizer returns one group per access unit and no longer errors
on pending overflow: an unfinished access unit larger than the ceiling is
dropped and counted.
- Repairs inherit the deadline of their frame and are not sent after it. A
blocked send polls resends and stops at the group deadline; the sleep is gone.
- MUNINN_RUDP_MEDIA_RECEIVER_ASSEMBLY_DEADLINE_MS is deleted. The default budget
is 250 ms (Q7), used only when a request names none and offered as the
advertisement's default_latency_budget_ms. The profile loses its three copies
of the budget; the telemetry JSON carries one latency_budget_ms.
- A test harness drives the real readers and core over loopback through a
seeded drop relay to a CultNet RUDP client, from a committed H.264 clip
(testdata/clip.h264, ffmpeg command recorded beside it) and a PCM ramp.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>