nx_media_serve_research_fetch.nx source
↩ module page · 49 lines · 4140 B
1// nx_media_serve_research_fetch.nx -- SOVEREIGN Nishi researcher for MEDIA SERVING / MANAGEMENT / DELIVERY SOTA
2// (operator 2026-07-14: get /gallery + /library to state-of-the-art; "use nishi researcher and census and adversary
3// and critic"). Grounds the /compare/media census: banks the incumbent media servers (Jellyfin/Plex/Emby/Immich/
4// Kavita/Komga), the delivery standards (HLS/DASH/CMAF/HEVC), the analysis-on-ingest concepts (thumbnails/keyframes),
5// and primary literature into knowledge/library/*.txt = THE CENTRAL LIBRARY via the CANONICAL nx_research_engine
6// (rf_fetch_bank -> now CASCADES fetchers + CLASSIFIES the result + ALWAYS-INFORMS, per the 2026-07-14 fetch-debt
7// fix). Idempotent (banked-skip), circuit-broken, slot-throttled, crawl-polite. expect_exit:0 license_tier: ORIGINAL
8import "nx_research_engine.nx"
9const K_MAGIC_8388608: i64 = 8388608
10
11func F(u: *u8, o: *u8, store: *TrustStore, out: *u8, cap: i64) -> i64 { return rf_fetch_bank(u, o, store, out, cap) }
12
13func main() -> i64 {
14 let store: *TrustStore = rf_init()
15 if (store as i64) == 0 { rf_puts("mediaserve: trust store load failed\n" as *u8); return 1 }
16 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- MEDIA-SERVING SOTA field -> Central Library\n" as *u8)
17 let cap: i64 = K_MAGIC_8388608
18 let out: *u8 = sys_mmap(cap)
19 var ok: i64 = 0
20
21 rf_section("INCUMBENT MEDIA SERVERS (the field to measure /gallery + /library against)" as *u8)
22 ok = ok + F("https://en.wikipedia.org/wiki/Jellyfin_(software)" as *u8, "mediaserve_jellyfin" as *u8, store, out, cap)
23 ok = ok + F("https://en.wikipedia.org/wiki/Plex_(software)" as *u8, "mediaserve_plex" as *u8, store, out, cap)
24 ok = ok + F("https://en.wikipedia.org/wiki/Emby" as *u8, "mediaserve_emby" as *u8, store, out, cap)
25 ok = ok + F("https://en.wikipedia.org/wiki/Media_server" as *u8, "mediaserve_mediaserver" as *u8, store, out, cap)
26 ok = ok + F("https://raw.githubusercontent.com/immich-app/immich/main/readme.md" as *u8, "mediaserve_immich" as *u8, store, out, cap)
27
28 rf_section("BOOK / MANGA / COMIC SERVERS (the /library incumbents)" as *u8)
29 ok = ok + F("https://raw.githubusercontent.com/Kareadita/Kavita/develop/README.md" as *u8, "mediaserve_kavita" as *u8, store, out, cap)
30 ok = ok + F("https://raw.githubusercontent.com/gotson/komga/master/README.md" as *u8, "mediaserve_komga" as *u8, store, out, cap)
31 ok = ok + F("https://en.wikipedia.org/wiki/Comic_book_archive" as *u8, "mediaserve_cbz" as *u8, store, out, cap)
32
33 rf_section("DELIVERY STANDARDS (HLS / DASH / CMAF / HEVC = the streaming + codec axes)" as *u8)
34 ok = ok + F("https://en.wikipedia.org/wiki/HTTP_Live_Streaming" as *u8, "mediaserve_hls" as *u8, store, out, cap)
35 ok = ok + F("https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP" as *u8, "mediaserve_dash" as *u8, store, out, cap)
36 ok = ok + F("https://en.wikipedia.org/wiki/Common_Media_Application_Format" as *u8, "mediaserve_cmaf" as *u8, store, out, cap)
37 ok = ok + F("https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding" as *u8, "mediaserve_hevc" as *u8, store, out, cap)
38
39 rf_section("ANALYSIS-ON-INGEST CONCEPTS (thumbnails / trickplay / keyframes)" as *u8)
40 ok = ok + F("https://en.wikipedia.org/wiki/Thumbnail" as *u8, "mediaserve_thumbnail" as *u8, store, out, cap)
41 ok = ok + F("https://en.wikipedia.org/wiki/Key_frame" as *u8, "mediaserve_keyframe" as *u8, store, out, cap)
42
43 rf_section("PRIMARY LITERATURE (OpenAlex indexes the ACM/IEEE originals)" as *u8)
44 ok = ok + F("https://api.openalex.org/works?search=adaptive%20bitrate%20streaming%20video%20delivery&per-page=20" as *u8, "mediaserve_lit_streaming" as *u8, store, out, cap)
45 ok = ok + F("https://api.openalex.org/works?search=content%20based%20image%20retrieval%20face%20recognition%20photo%20management&per-page=20" as *u8, "mediaserve_lit_photo" as *u8, store, out, cap)
46
47 rf_puts("MEDIA-SERVE FIELD BANKED to Central Library: "); rf_putn(ok); rf_puts(" / 16 (incumbents + standards + concepts + primary lit; librarian foundations each)\n" as *u8)
48 return 0
49}