Commit graph

9 commits

Author SHA1 Message Date
oneshot2001
7fa761212e
fix: top-3 review findings (decoder ordering, public-by-default, per-session state)
Frontend (app.js):
- Serialize the stateful adaptive-codec decoder through a promise chain.
  decode() awaits a real async DecompressionStream, so the previous
  concurrent .then() let a small DELTA resolve before its keyframe and
  patch a stale/null prev -> corrupt frames. Adds .catch + stale-decoder
  guard so a re-INIT drops in-flight frames from the previous segment.
- Flush frameBuffer on INIT so playlist transitions don't stall the reset
  master clock on the previous video's tail frames (or render them under
  the new renderer on a mode change).
- Request /audio?v=<idx> using the new INIT queue-index field so audio is
  correct when multiple clients are connected.

Server (stream_server.py):
- Bind 127.0.0.1 by default (--host to opt into LAN); same-origin Origin
  check before streaming (CSWSH defense that still allows LAN same-origin).
- Scope /static to an app.js/style.css/codec.js whitelist (was serving the
  whole repo: source, playlist, any local .env/notes).
- Per-session audio: INIT carries the queue index; /audio?v= reads it
  (bounds-checked) instead of the shared global current_index.
- Validate/clamp playlist+CLI mode/vol/pixel/cols/rows; guard malformed
  playlist JSON. ffmpeg gets -nostdin + terminate/kill-with-timeout.
- Re-enable WS keepalive (reap dead clients); release VideoCapture on the
  isOpened()-false path.

Adds experiments/test_decode_order.js: dependency-free regression proving
serialized decode is bit-exact + in-order and that delta-before-keyframe
throws (no video fixtures needed).

Server fixes built by Codex from a Claude spec; Claude integrated + reviewed
(tightened the Origin check to same-origin so --host 0.0.0.0 LAN mode works).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 13:01:27 -06:00
YusufB5
444334cfba feat: added pause mechanism and updated user interface 2026-06-13 19:50:32 +03:00
YusufB5
ad7895b054 feat: activate adaptive codec in app.js and add debug flags 2026-06-13 12:08:29 +03:00
YusufB5
e758423338 feat: Core engine V2 (A/V Sync, Zero-Copy Pixel, FPS Decimation) & CLI shortcuts 2026-06-07 23:16:25 +03:00
YusufB5
8b31a7450a feat: Add auto-scaling rows, pixel mode flag, and command loop 2026-06-05 23:20:25 +03:00
YusufB5
5fad7c5aa9 feat: server-side volume control feature added, playlist & folder video management 2026-06-04 16:14:23 +03:00
YusufB5
2043a7bb37 feat: add invisible selection layer, audio streaming, and updated manifesto for pure performance mode 2026-05-05 13:51:27 +03:00
YusufB5
e7002173c2 Improve error handling and translate messages to English 2026-05-03 21:36:14 +03:00
YusufB5
7cd84b657b Initial commit: ASCILINE Engine - Modular & Optimized 2026-05-02 14:36:22 +03:00