ver0.1
This commit is contained in:
@@ -22,6 +22,7 @@ from app.services.consumable_vision_algorithm import (
|
||||
from app.services.video.archive_persister import ArchivePersister
|
||||
from app.services.video.backend_resolver import BackendResolver
|
||||
from app.services.video.classification_handler import VisionClassificationHandler
|
||||
from app.services.voice_terminal_hub import VoiceTerminalHub
|
||||
from app.services.video.hikvision_runtime import HikvisionInitRefCount, HikvisionRuntime
|
||||
from app.services.video.inference_aggregator import WindowInferenceAggregator
|
||||
from app.services.video.session_registry import (
|
||||
@@ -101,6 +102,16 @@ class CameraSessionManager:
|
||||
registry=self._registry,
|
||||
)
|
||||
|
||||
def set_voice_terminal_hub(self, hub: VoiceTerminalHub | None) -> None:
|
||||
self._classifier_handler.attach_voice_terminal_hub(hub)
|
||||
|
||||
def get_voice_terminal_id_if_active(self, surgery_id: str) -> str | None:
|
||||
run = self._registry.get_running(surgery_id)
|
||||
if run is None:
|
||||
return None
|
||||
tid = (run.state.voice_terminal_id or "").strip()
|
||||
return tid or None
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# 生命周期
|
||||
# ------------------------------------------------------------------
|
||||
@@ -310,6 +321,16 @@ class CameraSessionManager:
|
||||
) -> PendingConsumableConfirmation | None:
|
||||
return self._registry.next_pending_confirmation(surgery_id)
|
||||
|
||||
def pending_queue_pending_count(self, surgery_id: str) -> int:
|
||||
return self._registry.pending_queue_pending_count(surgery_id)
|
||||
|
||||
def pending_queue_position_1based(
|
||||
self, surgery_id: str, confirmation_id: str
|
||||
) -> int | None:
|
||||
return self._registry.pending_queue_position_1based(
|
||||
surgery_id, confirmation_id
|
||||
)
|
||||
|
||||
async def resolve_pending_confirmation(
|
||||
self,
|
||||
surgery_id: str,
|
||||
|
||||
Reference in New Issue
Block a user