nx_galx_vidindex.nx
buildroot/runtime/nx_galx_vidindex.nx
about
nx_galx_vidindex.nx -- SOVEREIGN recordings index. Recursively scans the cam-recording archive
(sys_getdents64, no bash/find) and writes knowledge/status/galx_vid_paths.tsv = one video path per line.
Each cam recording is <model>_<date>_<time>.ts with a sibling <...>-poster.jpg the daemon serves as the
thumbnail (so recordings show instantly with NO video decode). Skips #recycle and .trickplay dirs.
Usage: nx_galx_vidindex (no args = full scan). license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.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
| 8 | const VI_MAGIC_8192: i64 = 8192 |
| 9 | const VI_MAGIC_8191: i64 = 8191 |
| 10 | const VI_MAGIC_2048: i64 = 2048 |
| 12 | const GBUF: i64 = 65536 |
| 13 | const VI_OUT: *u8 = "/volume1/ai/galx/knowledge/status/galx_vid_paths.tsv" as *u8 // the LIVE catalog nx_gallery_serve opens (NAS-native; the old /mnt/c path failed to write on the NAS) |
| 14 | const VI_TMP: *u8 = "/volume1/ai/galx/knowledge/status/galx_vid_paths.tsv.reidx" as *u8 // build here, atomic-rename onto VI_OUT so the gallery never reads a half-written catalog |
| 15 | const VI_OFF: *u8 = "/volume1/ai/galx/knowledge/status/galx_vid_off.bin" as *u8 |
| 16 | const VI_OFF_TMP: *u8 = "/volume1/ai/galx/knowledge/status/galx_vid_off.bin.reidx" as *u8 |
functions
| 18 | func vi_p(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 23 | func vi_n(v: i64) -> i64 { nxi_out(v); return 0 } |
| 24 | func vi_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 26 | func vi_is_vid(name: *u8) -> i64 |
| 37 | func vi_is_trick(name: *u8) -> i64 |
| 45 | func vi_walk(dir: *u8, depth: i64, outfd: i64, cntp: *i64) -> i64 called by 2: vi_walkmain calls 12: sys_openat_rdsys_mmapvi_lensys_getdents64dirent_reclendirent_type+6 |
| 85 | func vi_contains(buf: *u8, n: i64, needle: *u8) -> i64 |
| 98 | func vi_copy_nontorrent(srcpath: *u8, dstfd: i64, cntp: *i64) -> i64 |
| 125 | func vi_wb64(b: *u8, o: i64, v: i64) -> i64 { b[o]=((v>>56)&0xff) as u8; b[o+1]=((v>>48)&0xff) as u8; b[o+2]=((v>>40)&0xff) as u8; b[o+3]=((v>>32)&0xff) as u8; b[o+4]=((v>>24)&0xff) as u8; b[o+5]=((v>>16)&0xff) as u8; b[o+6]=((v>>8)&0xff) as u8; b[o+7]=(v&0xff) as u8; return o+8 } called by 1: vi_vidoff_build |
| 126 | func vi_vidoff_build(pidsuf: *u8) -> i64 |
| 152 | func main(argc: i64, argv: *i64) -> i64 |