将参数传进biz,并存为dict
This commit is contained in:
@@ -693,11 +693,13 @@ class KadianDetector:
|
||||
|
||||
# ========================= 帧处理线程 =========================
|
||||
class FrameProcessorWorker(threading.Thread):
|
||||
def __init__(self, raw_queue: queue.Queue, ws_queue: queue.Queue, stop_event: threading.Event):
|
||||
def __init__(self, raw_queue: queue.Queue, ws_queue: queue.Queue, stop_event: threading.Event, cameras=None):
|
||||
super().__init__(daemon=True)
|
||||
self.raw_queue = raw_queue
|
||||
self.ws_queue = ws_queue
|
||||
self.stop_event = stop_event
|
||||
# 将摄像头列表转换为字典,key为id,方便通过camera_id快速查找
|
||||
self.cameras = {cam.id: cam for cam in cameras} if cameras is not None else {}
|
||||
|
||||
self.last_ts: Dict[int, float] = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user