Reusable encoded-output consumers need an explicit streaming boundary without importing the broader decoded/accumulating sink graph. Add standalone checked AVC/HEVC NAL-length to Annex B conversion, exact integer PTS formatting, and a monotonic sink-backed PTS writer. Export and document the helpers; no files, threads, packet accumulation or FFmpeg/Libav dependency is introduced.
Conversion validates the complete input and capacity before writing output. PTS formatting preserves zero and the full u64 microsecond range as milliseconds with three decimals/LF. Rejected timestamps leave the sink untouched; sink errors poison the writer. Caller-owned buffers and synchronous borrowed sink slices make ownership explicit.
Validation: three focused tests pass on Zig 0.15.2 and Home's current development toolchain, covering malformed multi-NAL input, small-buffer state preservation, exact maximum PTS, monotonicity and sink failures. Targeted pickier passes. Add focused Linux x86/ARM workflows for both toolchains. zig-camera integration uses these helpers for reusable native/Python outputs, Annex B parameter sets and sidecar/container timestamp checks; the broader Home sink graph is not claimed as tested.