code wiki / (root) / nx_ts_es.nx

nx_ts_es.nx

buildroot/runtime/nx_ts_es.nx

5452 B100 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic ts
docsdependenciesstructsconstsfunctions

about

nx_ts_es.nx -- MPEG-TS -> H.264 elementary-stream helpers, LIFTED VERBATIM from nx_cam_poster.nx (lines 68-152) 2026-07-31 so a second consumer does not copy-paste them (rule 15). Behaviour must stay byte-identical: nx_cam_poster_gate is the oracle. demux_video_es -- PAT/PMT walk -> video PID -> ES bytes; codec via nx_ts_nal find_first_nal -- first NAL of a given type out of an ES nal_to_rbsp -- emulation-prevention-byte removal license_tier: ORIGINAL

dependencies 2 imports · 2 importers

nx_syscalls.nx nx_ts_nal.nx nx_ts_es.nx nx_cam_poster.nx nx_ts_lumadiff.nx

imports: nx_syscalls.nxnx_ts_nal.nx

imported by: nx_cam_poster.nxnx_ts_lumadiff.nx

structs

none

consts

14const MAXSCAN: i64 = 8388608

functions

16func demux_video_es(filebuf: *u8, total: i64, es: *u8, pidout: *i64) -> i64
called by 2: mainmain calls 1: tsn_codec_of_stream_type
73func find_first_nal(es: *u8, eslen: i64, want: i64, dst: *u8, cap: i64) -> i64
called by 2: mainmain
96func nal_to_rbsp(nal: *u8, nallen: i64, rbsp: *u8) -> i64
called by 2: mainmain calls 1: nx_h264_unescape_rbsp