nx_mp4_faststart_gate.nx
buildroot/runtime/nx_mp4_faststart_gate.nx
about
nx_mp4_faststart_gate.nx -- proves the qt-faststart remux is byte-correct: constructs a synthetic
NON-faststart mp4 ([ftyp][mdat][moov>trak>mdia>minf>stbl>stco]) with a known chunk offset, forks the
real nx_mp4_faststart.sov.elf on it, and asserts the output is [ftyp][moov][mdat] with the stco offset
rewritten by +moov_size. A remuxer that silently corrupts offsets = broken video, so this gate is the
liar-killer: T-neg replays a WRONG shift (0) and REQUIRES the check to fail.
MIGRATED 2026-09-02 onto nx_gate_verdict (D001): every tooth is a named gv_check, the missing-elf case is a
gv_need precondition (SKIP, never RED -- "could not look" is not "broken"), and /api/gate_run reads the verdict
from the exit code. The teeth and their fixtures are unchanged; the hand-rolled pass/total line is gone.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.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
| 13 | const G_TEST: *u8 = "/tmp/_fs_gate_in.mp4" |
| 14 | const G_OUT: *u8 = "/tmp/_fs_gate_out.mp4" |
| 15 | const G_LOG: *u8 = "knowledge/status/mp4_faststart_gate.log" |
functions
| 17 | func g_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } calls 1: sys_write |
| 18 | func g_be32(b: *u8, o: i64) -> i64 { return ((b[o] as i64)<<24)|((b[o+1] as i64)<<16)|((b[o+2] as i64)<<8)|(b[o+3] as i64) } called by 1: main |
| 19 | func g_p32(b: *u8, o: i64, v: i64) -> i64 { b[o]=((v>>24)&0xff) as u8; b[o+1]=((v>>16)&0xff) as u8; b[o+2]=((v>>8)&0xff) as u8; b[o+3]=(v&0xff) as u8; return 0 } |
| 20 | func g_t(b: *u8, o: i64, t: *u8) -> i64 { var i: i64=0; while i<4 { b[o+i]=t[i]; i=i+1 } return 0 } |
| 21 | func g_teq(b: *u8, o: i64, t: *u8) -> i64 { var i: i64=0; while i<4 { if b[o+i]!=t[i] { return 0 } i=i+1 } return 1 } called by 1: main |
| 22 | func g_ck(name: *u8, c: i64, ctr: *i64) -> i64 { gv_check(name, c == 1, ctr); return c } |
| 25 | func g_build(b: *u8, chunk_off: i64) -> i64 |
| 40 | func g_p64(b: *u8, o: i64, v: i64) -> i64 { var i: i64=0; while i<8 { b[o+7-i]=((v>>(i*8))&0xff) as u8; i=i+1 } return 0 } called by 1: g_build_co64 |
| 41 | func g_be64(b: *u8, o: i64) -> i64 { var v: i64=0; var i: i64=0; while i<8 { v=(v<<8)|(b[o+i] as i64); i=i+1 } return v } called by 1: main |
| 44 | func g_build_co64(b: *u8, chunk_off: i64) -> i64 |
| 57 | func g_run_elf(inp: *u8, outp: *u8) -> i64 |
| 87 | func main() -> i64 |