code wiki / _hdl_build / nx_cam_poster_batch.nx

nx_cam_poster_batch.nx

buildroot/runtime/_hdl_build/nx_cam_poster_batch.nx

6739 B131 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic cam
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_cam_poster_batch.nx

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

main bp_puts sys_write sys_exit bp_streq bp_atoi sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close poster_sibling bp_exists sys_openat_rd ↻ sys_close ↻ bp_run sys_fork sys_mmap ↻ sys_openat_wr sys_dup3 sys_execve sys_exit ↻ sys_wait4 bp_num sys_mmap ↻ sys_write ↻

structs

none

consts

11const POSTER_MAGIC_1000000000: i64 = 1000000000
12const POSTER_MAGIC_2048: i64 = 2048
14const POSTER_ELF: *u8 = "/volume1/homes/elderwesto/nishihost/buildroot/_offc/nx_cam_poster.elf" as *u8
15const CATALOG: *u8 = "knowledge/status/galx_vid_paths.tsv" as *u8

functions

17func 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 }
called by 1: main calls 1: sys_write
18func bp_num(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
29func 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
30func 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
31func bp_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
called by 1: main calls 2: sys_openat_rdsys_close
34func poster_sibling(vid: *u8, out: *u8) -> i64
called by 1: main
51func bp_run(ts: *u8, out: *u8) -> i64
70func main(argc: i64, argv: *i64) -> i64