feat(sdk): add bounded media admission, diagnostics and H264 recovery

Introduce deadline-bound admission and common diagnostics for constrained links. Add H264 packetization, recovery and the measured two-thread veryfast encoder path.
This commit is contained in:
DCCONSTRUCTIONS
2026-10-29 09:09:59 +03:00
parent 70ef3f9f1c
commit 115476d2e6
15 changed files with 1751 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
from missioncore_plugin_sdk.runtime_metrics import LATENCY_BOUNDS_MS, LatencyStats
def test_histogram_is_fixed_space_and_snapshot_is_independent():
stats = LatencyStats()
for v in LATENCY_BOUNDS_MS:
stats.observe(v / 1000)
stats.observe(2)
stats.observe(float("nan"))
stats.observe(-1)
value = stats.snapshot()
assert value["count"] == 8 and value["bins"] == [1] * 8
assert value["max_ms"] == 2000
value["bins"][0] = 99
assert stats.snapshot()["bins"][0] == 1
assert len(stats.bins) == 8