nx_vid_dur_lib.nx
buildroot/runtime/nx_vid_dur_lib.nx
about
nx_vid_dur_lib.nx -- SOVEREIGN container-duration parsers (no main -> build the _gate). Reads the raw
container bytes (no external tool): mp4/mov/m4v via the moov->mvhd movie header (timescale + duration,
integer), and mkv/webm via EBML Info->Duration (an IEEE float in TimecodeScale ticks). Returns dur in ms,
or -1 if not found in the given window. Composes into nx_ts_dur so EVERY video format gets a runtime.
license_tier: ORIGINAL
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_galx_durindex.nxnx_ts_dur.nxnx_vid_dur_gate.nx
structs
| none |
consts
| 7 | const K_MAGIC_86400000: i64 = 86400000 |
| 8 | const K_MAGIC_1000000: i64 = 1000000 |
functions
| 11 | func vd_find(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64 |
| 21 | func vd_u32(buf: *u8, off: i64) -> i64 { return ((buf[off] as i64) << 24) | ((buf[off+1] as i64) << 16) | ((buf[off+2] as i64) << 8) | (buf[off+3] as i64) } called by 1: vd_mp4_dur |
| 22 | func vd_u64(buf: *u8, off: i64) -> i64 { var v: i64 = 0; var k: i64 = 0; while k < 8 { v = (v << 8) | (buf[off+k] as i64); k = k + 1 } return v } called by 1: vd_mp4_dur |
| 27 | func vd_mp4_dur(buf: *u8, n: i64) -> i64 |
| 47 | func vd_ieee64(buf: *u8, off: i64) -> i64 |
| 60 | func vd_ieee32(buf: *u8, off: i64) -> i64 called by 1: vd_mkv_dur |
| 77 | func vd_mkv_dur(buf: *u8, n: i64) -> i64 |
| 99 | func vd_sniff(buf: *u8, n: i64) -> i64 |