From 93e7b252f6f8ecccaa3166af56c8c7216a31f8d5 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 30 Jun 2026 06:18:00 +0000 Subject: [PATCH] Add camera-manager service and Video-page camera selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a camera-manager FastAPI microservice (port 3005, proxied at /api/camera) that enumerates connected V4L2 capture devices — classifying CSI vs USB the same way the rtsp-server does — and selects which one the RTSP server streams by writing [camera].device into rtsp-server.toml and restarting the unit. The Video page gains a camera picker (shown only when more than one camera is connected) that lists detected cameras and switches the active source via the new API, then reconnects the WebRTC stream once the server restarts. Wires the service through assemble_tree.sh, the postinst enable list, the ark-ui-backend proxy, and the mypy contract set; seeds device = "" in the packaged rtsp-server.toml. Bumps the rtsp-server submodule to the commit that adds the matching USB-camera pipeline support. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01EQxVPD2yiCqSQd8KeZsZfv --- frontend/src/pages/VideoPage.vue | 124 +++++++- frontend/src/services/CameraService.js | 17 ++ mypy.ini | 3 +- packaging/DEBIAN/postinst | 2 +- packaging/assemble_tree.sh | 2 +- packaging/config/rtsp-server.toml | 4 + .../jetson/camera-manager.service | 17 ++ .../service-files/pi/camera-manager.service | 17 ++ services/ark-ui-backend/index.js | 17 +- .../camera-manager.manifest.json | 6 + services/camera-manager/camera_manager.py | 269 ++++++++++++++++++ services/rtsp-server/rtsp-server | 2 +- 12 files changed, 474 insertions(+), 6 deletions(-) create mode 100644 frontend/src/services/CameraService.js create mode 100644 packaging/service-files/jetson/camera-manager.service create mode 100644 packaging/service-files/pi/camera-manager.service create mode 100644 services/camera-manager/camera-manager.manifest.json create mode 100644 services/camera-manager/camera_manager.py diff --git a/frontend/src/pages/VideoPage.vue b/frontend/src/pages/VideoPage.vue index 1c1fd61..8153774 100644 --- a/frontend/src/pages/VideoPage.vue +++ b/frontend/src/pages/VideoPage.vue @@ -24,6 +24,25 @@ + +
+ + + +
+