2023-05-29 12:31:17 +02:00
|
|
|
from multiprocessing.context import Process
|
2022-04-16 17:40:04 +02:00
|
|
|
from multiprocessing.sharedctypes import Synchronized
|
2023-05-29 12:31:17 +02:00
|
|
|
from typing import Optional, TypedDict
|
2022-04-16 17:40:04 +02:00
|
|
|
|
2023-06-28 12:39:39 +02:00
|
|
|
from faster_fifo import Queue
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2023-07-01 15:18:33 +02:00
|
|
|
class FeatureMetricsTypes(TypedDict):
|
|
|
|
audio_enabled: Synchronized
|
2023-04-26 15:25:26 +02:00
|
|
|
record_enabled: Synchronized
|
|
|
|
|
|
|
|
|
2022-04-16 17:40:04 +02:00
|
|
|
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
|
2023-01-27 13:20:41 +01:00
|
|
|
last_updated: int
|
2023-05-05 00:58:59 +02:00
|
|
|
processes: dict[str, int]
|