code wiki / _hdl_build / nx_cam_poster_batch.nx
nx_cam_poster_batch.nx
buildroot/runtime/_hdl_build/nx_cam_poster_batch.nx
about
nx_cam_poster_batch.nx -- STEP 5 poster generator writing the <recording>-poster.jpg SIBLING that the
LIVE gallery serve already serves at GET /vidthumb/<id> (gs_vidthumb -> gs_poster_path -> read+serve).
ZERO serve change: the daemon serves the sibling the instant it exists. poster_sibling() is byte-identical
to the serve's gs_poster_path (truncate at the last '.', append "-poster.jpg").
nx_cam_poster_batch one <id> -- generate ONE recording's poster (on-demand, by catalog id)
nx_cam_poster_batch <start> <count> -- generate a range (idempotent skip-existing, forks 1 child/rec)
Forks nx_cam_poster (bounds memory: 8MiB scan + a frame, no munmap, reclaimed on child exit); skips CABAC
gracefully (child rc==10). Run from cwd=/volume1/ai/galx (the serve's cwd, where CATALOG resolves).
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 11 | const POSTER_MAGIC_1000000000: i64 = 1000000000 |
| 12 | const POSTER_MAGIC_2048: i64 = 2048 |
| 14 | const POSTER_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_cam_poster.elf" as *u8 |
| 15 | const CATALOG: *u8 = "knowledge/status/galx_vid_paths.tsv" as *u8 |
functions
| 17 | func bp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 18 | func bp_num(v: i64) -> i64 |
| 29 | func bp_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { if s[i] >= (48 as u8) { if s[i] <= (57 as u8) { v = v*10 + ((s[i]-(48 as u8)) as i64) } } i = i + 1 } return v } called by 1: main |
| 30 | func bp_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 } called by 1: main |
| 31 | func bp_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 34 | func poster_sibling(vid: *u8, out: *u8) -> i64 called by 1: main |
| 51 | func bp_run(ts: *u8, out: *u8) -> i64 |
| 70 | func main(argc: i64, argv: *i64) -> i64 |