code wiki / (root) / nx_media_ingest_pipeline.nx

nx_media_ingest_pipeline.nx

buildroot/runtime/nx_media_ingest_pipeline.nx

5893 B103 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind tooltopic media
docsdependenciesstructsconstsfunctions

about

nx_media_ingest_pipeline.nx -- KEYSTONE (operator 2026-07-14): analysis/derivation-on-INGEST for the gallery. The root cause of "newly-found media has no thumbnail and doesnt play" is that the derivation organs exist but are DISJOINT -- nothing runs them when media lands. This COMPOSES the existing organs (rule-15, no rebuild) into ONE idempotent, resumable pass so media gets its thumbnail + duration/keyframe index at ingest time (not lazily on first play, and never for harvested video). Run modes: default = BACKFILL the whole corpus; the torrent/ harvest ingest path can call this same organ after each drop (the per-item hook). ALWAYS-INFORM: every tool is resolved NAS-first (/volume1/ai/galx) with a dev fallback, and a MISSING tool or an unwired stage is REPORTED explicitly -- never a silent skip (operator: "dont return nothing without informing"). Usage: nx_media_ingest_pipeline [max_videos] (default = all). license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_media_ingest_pipeline.nx nx_media_ingest_pipeline_gate.nx

imports: nx_syscalls.nx

imported by: nx_media_ingest_pipeline_gate.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main mp_puts sys_write sys_mmap mp_resolve mp_join mp_cat mp_exists sys_openat_rd sys_close mp_run sys_fork sys_mmap ↻ sys_execve sys_exit sys_wait4 mp_putn sys_mmap ↻ sys_write ↻ sys_exit ↻

structs

none

consts

12const GALX_MAGIC_1024: i64 = 1024
13const GALX_MAGIC_4096: i64 = 4096
15const GALX_DIR_NAS: *u8 = "/volume1/ai/galx"
16const GALX_DIR_DEV: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build"

functions

18func mp_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
19func mp_putn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
28func mp_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off + i] = s[i]; i = i + 1 } return off + i }
called by 1: mp_join
29func mp_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 }
32func mp_join(dir: *u8, name: *u8, out: *u8) -> i64
called by 2: mp_resolvemain calls 1: mp_cat
39func mp_resolve(name: *u8, out: *u8) -> i64
called by 2: mainmain calls 2: mp_joinmp_exists
47func mp_run(elf: *u8, a1: *u8, a2: *u8, a3: *u8) -> i64
60func main(argc: i64, argv: *i64) -> i64