feat(media): integrate embedded media services and shared native encoding

Embed STUN and SFU in the shared Go process, reuse native encoding pipelines with independent adaptation, and complete Client lifecycle, settings, diagnostics and packaging fixes. Retain standard Browser senders after measured encoded-reuse limitations.
This commit is contained in:
AAA authored and GitHub committed 2026-09-09 06:09:06 +08:00
1 parent 61a9b74cbd
commit cfc323adce
274 files changed
+37854 -13238

No files matched your search

@@ -0,0 +1 @@
{"completed":true,"scope":"WebCodecs software preference; independent child decode; no RTP, network, hardware or perceptual acceptance","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/152.0.0.0 Safari/537.36","support":{"vp8":true,"avc1.420028":true},"profiles":[[480,270,312500],[960,540,1250000],[1920,1080,5000000]],"fps":30,"phaseFrames":32,"trace":[[2,2],[2,0],[0,0],[1,1],[2,2],[2,0],[2,2]],"results":[{"round":1,"codec":"vp8","policy":"exact","role":"host","encoded":[96,32,160],"decoded":[224,224],"ingressDecodes":0,"creates":5,"generatedBytes":[122548,136335,3328684],"selectedBytes":[3512141,2046547],"switches":[{"index":32,"child":1,"layer":0,"ms":5.399999976158142,"bytes":2510},{"index":64,"child":0,"layer":0,"ms":6.5,"bytes":4426},{"index":96,"child":0,"layer":1,"ms":9,"bytes":8218},{"index":96,"child":1,"layer":1,"ms":9,"bytes":8218},{"index":128,"child":0,"layer":2,"ms":22.200000047683716,"bytes":21119},{"index":128,"child":1,"layer":2,"ms":22.200000047683716,"bytes":21119},{"index":160,"child":1,"layer":0,"ms":5.5,"bytes":2510},{"index":192,"child":1,"layer":2,"ms":15.399999976158142,"bytes":24215}],"elapsedMs":7467.600000023842,"metrics":{"management":{"mean":0.010267858526536397,"p95":0.10000002384185791,"max":0.20000004768371582},"input":{"mean":0.1477678609745843,"p95":0.20000004768371582,"max":0.30000007152557373},"encodeReady":{"mean":2.772767852459635,"p95":5.400000095367432,"max":14.100000023841858},"allReceivers":{"mean":6.7459821456245015,"p95":15.100000023841858,"max":43.10000002384186},"processing":{"mean":6.747767860335963,"p95":15.100000023841858,"max":43.10000002384186}},"overFrameBudget":1,"phases":[{"demand":[2,2],"frames":32,"work":{"mean":9.996875006705523,"p95":21,"max":22.399999976158142}},{"demand":[2,0],"frames":32,"work":{"mean":6.725000001490116,"p95":13,"max":18.100000023841858}},{"demand":[0,0],"frames":32,"work":{"mean":1.5218749940395355,"p95":3.5,"max":6.5}},{"demand":[1,1],"frames":32,"work":{"mean":3.328125,"p95":7.199999928474426,"max":9}},{"demand":[2,2],"frames":32,"work":{"mean":9.681250013411045,"p95":20.600000023841858,"max":22.200000047683716}},{"demand":[2,0],"frames":32,"work":{"mean":6.687500007450581,"p95":13.100000023841858,"max":18.299999952316284}},{"demand":[2,2],"frames":32,"work":{"mean":9.293749999254942,"p95":16.799999952316284,"max":43.10000002384186}}]},{"round":1,"codec":"vp8","policy":"envelope","role":"host","encoded":[224,192,160],"decoded":[224,224],"ingressDecodes":0,"creates":5,"generatedBytes":[283892,891748,3328684],"selectedBytes":[3510224,2055606],"switches":[{"index":32,"child":1,"layer":0,"ms":4.299999952316284,"bytes":4426},{"index":64,"child":0,"layer":0,"ms":7.400000095367432,"bytes":4391},{"index":96,"child":0,"layer":1,"ms":8.299999952316284,"bytes":8218},{"index":96,"child":1,"layer":1,"ms":8.299999952316284,"bytes":8218},{"index":128,"child":0,"layer":2,"ms":20.899999976158142,"bytes":21119},{"index":128,"child":1,"layer":2,"ms":20.899999976158142,"bytes":21119},{"index":160,"child":1,"layer":0,"ms":4.399999976158142,"bytes":6076},{"index":192,"child":1,"layer":2,"ms":15.5,"bytes":24215}],"elapsedMs":7466.700000047684,"metrics":{"management":{"mean":0.015178571854318892,"p95":0.10000002384185791,"max":0.20000004768371582},"input":{"mean":0.1455357117312295,"p95":0.20000004768371582,"max":0.30000007152557373},"encodeReady":{"mean":2.8874999987227574,"p95":5.700000047683716,"max":14.600000023841858},"allReceivers":{"mean":6.89062499627471,"p95":15.300000071525574,"max":42.39999997615814},"processing":{"mean":6.892410710986171,"p95":15.300000071525574,"max":42.39999997615814}},"overFrameBudget":1,"phases":[{"demand":[2,2],"frames":32,"work":{"mean":10.118750002235174,"p95":20.899999976158142,"max":24.40000009536743}},{"demand":[2,0],"frames":32,"work":{"mean":6.846874989569187,"p95":13.199999928474426,"max":18.600000023841858}},{"demand":[0,0],"frames":32,"work":{"mean":1.5406250059604645,"p95":3.899999976158142,"max":7.400000095367432}},{"demand":[1,1],"frames":32,"work":{"mean":3.393749989569187,"p95":8.299999952316284,"max":8.399999976158142}},{"demand":[2,2],"frames":32,"work":{"mean":10.015624985098839,"p95":20.899999976158142,"max":21}},{"demand":[2,0],"frames":32,"work":{"mean":6.887500010430813,"p95":13,"max":18.399999976158142}},{"demand":[2,2],"frames":32,"work":{"mean":9.443749994039536,"p95":17,"max":42.39999997615814}}]},{"round":1,"codec":"vp8","policy":"exact","role":"relay","encoded":[96,32,0],"decoded":[224,224],"ingressDecodes":128,"creates":3,"generatedBytes":[120010,140534,0],"selectedBytes":[2999436,1947552],"switches":[{"index":32,"child":1,"layer":0,"ms":14.599999904632568,"bytes":2510},{"index":64,"child":0,"layer":0,"ms":7.899999976158142,"bytes":4299},{"index":96,"child":0,"layer":1,"ms":12.299999952316284,"bytes":6098},{"index":96,"child":1,"layer":1,"ms":12.299999952316284,"bytes":6098},{"index":128,"child":0,"layer":2,"ms":11.6000000238418Line truncated