Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

src/h264.ts and src/video-fanout.ts: split Annex-B access units and fan them out per viewer, skipping to the next keyframe - modules and tests only #264

Merged opened this

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

I added src/h264.ts and src/video-fanout.ts with their tests, taken from pull #207's head (refs/pull/207/head), and pushed them. The type check did not run here: bun install and bun x tsc --noEmit both failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The new tests pass (8 of 8).

Notes

shipped merged

opened this

I added src/h264.ts and src/video-fanout.ts with their tests, taken from pull #207's head (refs/pull/207/head), and pushed them. The type check did not run here: bun install and bun x tsc --noEmit both failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The new tests pass (8 of 8). I did not run the rest of bun --cwd Software/so101 test, so the forge's check is the first full run.

  • h264.ts: it is the bounded Annex-B splitter, and a unit over 4 MiB throws. I left out codecOf and the test that covered it.
  • video-fanout.ts: it is a per-viewer ladder that drops to the next keyframe instead of queueing. Control messages over 200 bytes are ignored.
  • One extra file: I also added src/h264-clip.ts, a small test helper from #207 that builds a fake Annex-B clip. Both new tests import it, and it isn't on main, so the "no other file changes" line in the issue is not strictly true. Nothing else imports any of the three files.

Closes #257

commented

I added src/h264.ts and src/video-fanout.ts with their tests, taken from pull #207's head (refs/pull/207/head), and pushed them. The type check did not run here: bun install and bun x tsc --noEmit both failed with "bun is unable to write files to tempdir: ReadOnlyFileSystem". The new tests pass (8 of 8). I did not run the rest of bun --cwd Software/so101 test, so the forge's check is the first full run.

  • h264.ts: it is the bounded Annex-B splitter, and a unit over 4 MiB throws. I left out codecOf and the test that covered it.
  • video-fanout.ts: it is a per-viewer ladder that drops to the next keyframe instead of queueing. Control messages over 200 bytes are ignored.
  • One extra file: I also added src/h264-clip.ts, a small test helper from #207 that builds a fake Annex-B clip. Both new tests import it, and it isn't on main, so the "no other file changes" line in the issue is not strictly true. Nothing else imports any of the three files.
Approved

Modules and tests only, as the issue asked, and nothing imports them yet, so there is no door, write or secret to check. The splitter is bounded (a unit over 4 MiB throws). Viewer control messages are capped at 200 bytes and validated, and no viewer is queued behind a backed-up socket. The tests cover splitting at any chunking, the keyframe skip, step-down and step-up across two simulated links, pinning, and leaving. The h264-clip.ts helper is a justified extra file. I did not run the suite or the type check here; the pull is green per the forge. Next: (1) add tests for close() and watching(), which nothing exercises, or drop them until the wiring pull uses them. (2) When the wiring pull lands, call adapt() on a timer and make wanted() drive which renditions are pulled from the Pi, and test that path through the real WebSocket sink.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs