code wiki / (root) / nx_hls_resolve.nx

nx_hls_resolve.nx

buildroot/runtime/nx_hls_resolve.nx

6617 B134 linesdepth 4pulls 4 transitivereach 19 importersview sourcekind librarytopic hls
docsdependenciesstructsconstsfunctions

about

nx_hls_resolve.nx -- X-DLP rung 1: resolve an HLS segment/variant URI against the playlist's own URL -> an ABSOLUTE URL the sovereign fetch client can GET. HLS URIs come in three shapes (RFC 8216 + RFC 3986 ยง5): absolute "https://cdn/s.ts" -> use as-is path-absolute "/v/s.ts" -> scheme://host + uri relative "s0.ts" -> base-directory (up to last '/') + uri Composes nx_hls_parse (rung 0). Pure string logic -> offline-gateable. Together rungs 0+1 turn (playlist URL + bytes) into the concrete list of segment URLs to fetch via the already-sovereign h2/https client. No JS, no curl. license_tier: ORIGINAL

dependencies 2 imports · 3 importers

nx_hls_parse.nx nx_itoa_lib.nx nx_hls_resolve.nx nx_hls_get.nx nx_hls_live_probe.nx nx_video_sniff_fetch.nx

imports: nx_hls_parse.nxnx_itoa_lib.nx

imported by: nx_hls_get.nxnx_hls_live_probe.nxnx_video_sniff_fetch.nx

structs

none

consts

none

functions

13func hr_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: nx_hls_resolve_uri
15func hr_is_abs(uri: *u8, ulen: i64) -> i64
called by 1: nx_hls_resolve_uri
25func nx_hls_resolve_uri(base: *u8, blen: i64, uri: *u8, ulen: i64, out: *u8, out_cap: i64) -> i64
66func hrr_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
71func hrr_putn(v: i64) -> i64 { nxi_out(v); return 0 }
72func hrr_eq(out: *u8, n: i64, want: *u8) -> i64
79func main() -> i64