2023-07-16 14:42:56 +02:00
|
|
|
from multiprocessing import Queue
|
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-07-08 14:04:47 +02:00
|
|
|
from multiprocessing.synchronize import Event
|
2023-05-29 12:31:17 +02:00
|
|
|
from typing import Optional, TypedDict
|
2022-04-16 17:40:04 +02:00
|
|
|
|
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-11 13:23:20 +02:00
|
|
|
class PTZMetricsTypes(TypedDict):
|
|
|
|
ptz_autotracker_enabled: Synchronized
|
|
|
|
ptz_stopped: Event
|
2023-07-13 12:32:51 +02:00
|
|
|
ptz_reset: Event
|
2023-07-11 13:23:20 +02:00
|
|
|
ptz_start_time: Synchronized
|
|
|
|
ptz_stop_time: Synchronized
|
2023-09-27 13:19:10 +02:00
|
|
|
ptz_frame_time: Synchronized
|
|
|
|
ptz_zoom_level: Synchronized
|
2023-07-11 13:23:20 +02:00
|
|
|
|
|
|
|
|
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]
|