nx_hls_resolve.nx
buildroot/runtime/nx_hls_resolve.nx
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
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
| 13 | func 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 |
| 15 | func hr_is_abs(uri: *u8, ulen: i64) -> i64 called by 1: nx_hls_resolve_uri |
| 25 | func nx_hls_resolve_uri(base: *u8, blen: i64, uri: *u8, ulen: i64, out: *u8, out_cap: i64) -> i64 |
| 66 | func 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 } |
| 71 | func hrr_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 72 | func hrr_eq(out: *u8, n: i64, want: *u8) -> i64 |
| 79 | func main() -> i64 |