2022-04-16 17:40:04 +02:00
|
|
|
from typing import Optional, TypedDict
|
|
|
|
from multiprocessing.queues import Queue
|
|
|
|
from multiprocessing.sharedctypes import Synchronized
|
|
|
|
from multiprocessing.context import Process
|
|
|
|
|
2022-11-04 03:23:09 +01:00
|
|
|
from frigate.object_detection import ObjectDetectProcess
|
2022-04-16 17:40:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
class CameraMetricsTypes(TypedDict):
|
|
|
|
camera_fps: Synchronized
|
|
|
|
capture_process: Optional[Process]
|
|
|
|
detection_enabled: Synchronized
|
|
|
|
detection_fps: Synchronized
|
|
|
|
detection_frame: Synchronized
|
|
|
|
ffmpeg_pid: Synchronized
|
|
|
|
frame_queue: Queue
|
2022-04-26 14:29:28 +02:00
|
|
|
motion_enabled: Synchronized
|
2022-04-16 17:40:04 +02:00
|
|
|
improve_contrast_enabled: Synchronized
|
2022-04-27 16:52:45 +02:00
|
|
|
motion_threshold: Synchronized
|
|
|
|
motion_contour_area: Synchronized
|
2022-04-16 17:40:04 +02:00
|
|
|
process: Optional[Process]
|
|
|
|
process_fps: Synchronized
|
|
|
|
read_start: Synchronized
|
|
|
|
skipped_fps: Synchronized
|
|
|
|
|
|
|
|
|
|
|
|
class StatsTrackingTypes(TypedDict):
|
|
|
|
camera_metrics: dict[str, CameraMetricsTypes]
|
2022-11-04 03:23:09 +01:00
|
|
|
detectors: dict[str, ObjectDetectProcess]
|
2022-04-16 17:40:04 +02:00
|
|
|
started: int
|
|
|
|
latest_frigate_version: str
|