nx_mediafacts.nx
buildroot/runtime/nx_mediafacts.nx
about
nx_mediafacts.nx -- CLI for media fact extraction into the refcorpus measured-facts plane.
nx_mediafacts probe <file>
print the closed-vocabulary facts for ONE file (measurement only, nothing journaled)
nx_mediafacts sweep <listfile> <source> <provenance> <license> [put]
measure every path in <listfile> (one path per line), aggregate per format into
DISTRIBUTION facts (count / min / median / max), print them; with the `put` verb each
row goes through rc_put_row IN-PROCESS -- the same admission walls the refcorpus gate
proves, incl. the k-anonymity floor: a bucket with fewer than 8 files is REFUSED, so a
"distribution" that could describe one creator's asset physically cannot be journaled.
Composes: nx_mediafacts_lib (extraction core) + nx_refcorpus (admission + journal, the
import-with-main precedent proven by nx_refcorpus_gate). Bounded window read: only the first
MF_WINDOW bytes of a file are ever mapped -- facts live in headers, and a 500MB video costs
the same read as a thumbnail.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_mediafacts_lib.nxnx_refcorpus.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
| 21 | const MF_WINDOW: i64 = 1048576 |
| 22 | const MF_MAX_FILES: i64 = 4096 |
| 23 | const MF_PATH_MAX: i64 = 384 |
functions
| 25 | func mfc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 26 | func mfc_w(s: *u8) -> i64 { sys_write(1, s, mfc_slen(s)); return 0 } |
| 27 | func mfc_e(s: *u8) -> i64 { sys_write(2, s, mfc_slen(s)); return 0 } |
| 28 | func mfc_num(v: i64) -> i64 |
| 42 | func mfc_itoa(v: i64, out: *u8) -> i64 |
| 56 | func mfc_fmtname(f: i64) -> *u8 |
| 66 | func mfc_read_window(path: *u8, buf: *u8) -> i64 |
| 81 | func mfc_print_probe(facts: *i64) -> i64 |
| 96 | func mfc_dist_row(fmt: i64, metric: *u8, val: i64, unit: *u8, cnt: i64, src: *u8, prov: *u8, lic: *u8, do_put: i64) -> i64 |
| 115 | func mfc_bucket(fmt: i64, cnt: i64, ws: *i64, hs: *i64, rates: *i64, chans: *i64, src: *u8, prov: *u8, lic: *u8, do_put: i64, wrote: *i64) -> i64 |
| 149 | func main(argc: i64, argv: *i64) -> i64 |