feat(video): 可配置 RTSP 打开超时并提高默认时长

- Settings 增加 video_open_timeout_sec(VIDEO_OPEN_TIMEOUT_SEC),默认 45s
- SessionManager 全部就绪等待为该值 + 5s;StreamWorker 传入单路超时
- baked pipeline 回退默认值与配置对齐;.env.example 补充说明
- or_site_config.sample.json 扩展穿透摄像头与术间绑定示例
- 同步 uv.lock
This commit is contained in:
Kevin
2026-04-29 10:51:23 +08:00
parent 17d27be18d
commit 869ea21bbe
7 changed files with 986 additions and 962 deletions

View File

@@ -41,6 +41,7 @@ class _VideoGroup(_SettingsGroup):
"video_default_backend",
"video_camera_backend_overrides_json",
"video_rtsp_url_template",
"video_open_timeout_sec",
"or_site_config_json_file",
)
@@ -142,6 +143,13 @@ class Settings(BaseSettings):
video_default_backend: Literal["rtsp", "hikvision_sdk", "auto"] = "rtsp"
video_camera_backend_overrides_json: str = ""
video_rtsp_url_template: str = ""
#: 单路 RTSP 首次打开超时(秒);术间「全部摄像头就绪」等待为该值 + 5s。穿透/公网链路可调大。
video_open_timeout_sec: float = Field(
default=45.0,
ge=5.0,
le=900.0,
validation_alias=AliasChoices("VIDEO_OPEN_TIMEOUT_SEC", "video_open_timeout_sec"),
)
#: 手术室站点配置UTF-8 JSON须含 video_rtsp_urls 与 voice_or_room_bindings见 or_site_config.sample.json
or_site_config_json_file: str = ""