feat(video): recover camera previews and reduce encoding and playout cost

Improve camera recovery, shared preview lifecycle and receiver playout diagnostics. Preserve qualified X4 runtime changes and restore async admission in loopback media tests.
This commit is contained in:
DCCONSTRUCTIONS
2026-10-29 09:10:01 +03:00
parent e06ff9a214
commit fa8bde584f
94 changed files with 8892 additions and 375 deletions
+7 -4
View File
@@ -20,7 +20,7 @@ from missioncore_plugin_sdk.v0alpha2.session import DeviceSessionSnapshot
MODEL = {
"plugin_id": "missioncore.realsense",
"plugin_version": "0.6.6",
"plugin_version": "0.6.7",
"model_id": "realsense.d455",
}
@@ -238,6 +238,7 @@ class Device:
"last_frame": self.last_frame,
"recording": self.record,
"playback_id": self.playback_id,
"preview_priority_v1": True,
"layers": list(self.images)
+ (["points"] if self.depth is not None else [])
+ (["motion"] if self.motion else []),
@@ -577,13 +578,13 @@ class Device:
self.revision += 1
return {"ok": True, "value": item["value"]}
def points(self):
def points(self, limit=2000):
depth, intrinsics = self.depth, self.intrinsics
if depth is None or intrinsics is None:
if depth is None or intrinsics is None or limit <= 0:
return []
# SDK deprojection respects the camera's actual distortion model.
h, w = depth.shape
stride = max(8, math.ceil(math.sqrt(h * w / 2000)))
stride = max(8, math.ceil(math.sqrt(h * w / min(2000, limit))))
result = []
for y in range(0, h, stride):
for x in range(0, w, stride):
@@ -592,6 +593,8 @@ class Device:
result.extend(
round(v, 4) for v in rs.rs2_deproject_pixel_to_point(intrinsics, [x, y], z)
)
if len(result) >= min(2000, limit) * 3:
return result
return result
def recordings(self):