code wiki / _hdl_build / nx_connect_room_tx.nx
nx_connect_room_tx.nx
buildroot/runtime/_hdl_build/nx_connect_room_tx.nx
about
nx_connect_room_tx.nx -- VIDEO ROOM SEND side (completes the loop; mirrors the receive design).
Capture -> encode SVC layers (base 2x2 + enhancement residual) -> per-layer ENCRYPT -> simulcast
publish. Send-side AIMD adaptive encoding (drop the top layer under congestion), keyframe/delta
(a new joiner must wait for the next keyframe), pacing (anti-burst), and CONTENT-BLIND publish:
the SFU routes by cleartext layer headers (id/size/keyframe-flag) and NEVER transcodes/decrypts.
Pairs bit-exact with the receive decoder. 7 checks incl. negative controls.
100% sovereign. license_tier: ORIGINAL expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const K_MAGIC_2025: i64 = 2025 |
| 11 | const KEYF: i64 = 1 |
| 12 | const DELTA: i64 = 0 |
functions
| 14 | func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 15 | func sn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } |
| 17 | func avg4(a: i64, b: i64, c: i64, d: i64) -> i64 { return (a+b+c+d)/4 } called by 1: encode_base |
| 18 | func encode_base(f: *i64, b: *i64) -> i64 |
| 22 | func upsample(b: *i64, u: *i64) -> i64 called by 1: main |
| 26 | func frames_equal(a: *i64, b: *i64, n: i64) -> i64 { var i: i64=0; while i<n { if a[i]!=b[i] { return 0 } i=i+1 } return 1 } called by 1: main |
| 29 | func encoder_layers(congested: i64) -> i64 { if congested==1 { return 1 } return 2 } called by 1: main |
| 31 | func forward_layers(is_speaker: i64) -> i64 { if is_speaker==1 { return 2 } return 1 } called by 1: main |
| 33 | func next_keyframe(ft: *i64, n: i64, join_at: i64) -> i64 { var i: i64=join_at; while i<n { if ft[i]==KEYF { return i } i=i+1 } return 0-1 } called by 1: main |
| 35 | func max_burst(p: i64, w: i64) -> i64 { return (p + w - 1)/w } called by 1: main |
| 37 | func tcheck(pass: i64, label: *u8, fails: *i64) -> i64 |
| 43 | func main() -> i64 |