ASCILINE/test
Nate d9480e9f85 feat: server-side frame dropping under client backpressure (#30)
The live WebSocket pushed every frame on a wall-clock schedule regardless of
whether the client could keep up. On a slow device frames piled into the client
decode queue, and the client paid the inflate+delta-patch cost for each one
before dropping the excess in its render loop. CPU spent on frames never shown.

Client now reports its decoded-frame backlog (frameBuffer depth) ~4x/sec over
the existing command channel. When the backlog exceeds BACKLOG_HIGH the server
skips frames: it advances the source cheaply (grab, no decode/encode/send) so
video stays time-aligned with audio, and crucially holds prev_frame across the
gap so the next sent frame is a correct delta against the last SENT frame. No
keyframe resync needed - deltas are always relative to the last sent frame.
MAX_CONSEC_DROPS caps the gap and guarantees liveness for slow/non-reporting
clients. Fully backward compatible: a client that never reports keeps backlog=0
and behaviour is unchanged.

test/test_backpressure_gap.js encodes a keyframe + a dropped gap via codec.py
and decodes through the shipped codec.js, asserting the post-gap frame is
reconstructed bit-exact (and is a real DELTA), matching the no-drop path.
2026-06-22 12:12:38 -04:00
..
_gap_fixture.py feat: server-side frame dropping under client backpressure (#30) 2026-06-22 12:12:38 -04:00
test_backpressure_gap.js feat: server-side frame dropping under client backpressure (#30) 2026-06-22 12:12:38 -04:00
test_e2e.js Rename test_e2e.js to test_e2e.js 2026-06-21 11:28:38 +03:00
test_scrub.py feat: make hover thumbnails optional (--no-thumbnails) 2026-06-19 00:14:34 -04:00
test_ytdl.py Add test_ytdl.py for testing functionality 2026-06-21 11:29:13 +03:00
test_ytdl_hardening.py Rename test_ytdl_hardening.py to test_ytdl_hardening.py 2026-06-21 11:29:30 +03:00
test_ytdl_normalize.py Rename test_ytdl_normalize.py to test_ytdl_normalize.py 2026-06-21 11:29:45 +03:00