code wiki / (root) / nx_mp4_demux.nx

nx_mp4_demux.nx

buildroot/runtime/nx_mp4_demux.nx

3769 B88 linesdepth 2pulls 2 transitivereach 12 importersview sourcekind librarytopic mp4
docsdependenciesstructsconstsfunctions

about

nx_mp4_demux.nx -- MP4/ISO-BMFF container demuxer (first rung of the real-video bridge). Walks the box ('atom') tree -- ftyp / moov / trak / mdia / hdlr -- and enumerates the tracks and their kinds (video 'vide' / audio 'soun'). This is the DEMUX level: it reads the container structure, not the codec. It answers "does this recording contain an audio track at all?" -- the exact signal that separates an AUDIO-DROPPED-AT-CAPTURE recording (no 'soun' track) from a mux/codec playback problem (track present, won't decode). The codec decode (H.264/AAC -> frames/PCM) is a later rung. ISO/IEC 14496-12 box = [size:u32 BE][type:4 ascii][payload]. size includes the 8-byte header. (64-bit large-size + size==0 to EOF are TODO; flagged.) genealogy_id: iso_bmff_14496_12 + quicktime_atom_tree lineage_id: box_tree_walk + hdlr_track_enumeration license_tier: ORIGINAL

dependencies 1 imports · 11 importers

nx_syscalls.nx nx_mp4_demux.nx nx_h264_decode_frame.nx nx_h264_mv_recon_gate.nx nx_h264_pframe_probe.nx nx_h264_pframe_recon.nx nx_h264_pframe_walk.nx nx_h264_slice_extract.nx nx_mp4_demux_gate.nx nx_mp4_es.nx nx_mp4_real_probe.nx nx_mp4_stbl.nx

diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_h264_decode_frame.nxnx_h264_mv_recon_gate.nxnx_h264_pframe_probe.nxnx_h264_pframe_recon.nxnx_h264_pframe_walk.nxnx_h264_slice_extract.nxnx_mp4_demux_gate.nxnx_mp4_es.nxnx_mp4_real_probe.nxnx_mp4_stbl.nxnx_mp4_stbl_gate.nx

structs

none

consts

18const K_MAGIC_16777216: i64 = 16777216
19const K_MAGIC_65536: i64 = 65536

functions

22func mp4_be32(b: *u8, o: i64) -> i64
called by 11: mainmainmainmainmainmain+5
26func mp4_t4(b: *u8, o: i64, s: *u8) -> i64
37func mp4_be64(b: *u8, o: i64) -> i64
43func mp4_find_box(b: *u8, start: i64, end: i64, s: *u8, res: *i64) -> i64
59func nx_mp4_demux(b: *u8, len: i64, out: *i64) -> i64