mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Use count correctly
This commit is contained in:
parent
4a396cf8ac
commit
3aeb6b8440
@ -179,14 +179,15 @@ class CameraMaintainer(threading.Thread):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# pre-create shms
|
# pre-create shms
|
||||||
for i in range(10 if runtime else self.shm_count):
|
count = 10 if runtime else self.shm_count
|
||||||
|
for i in range(count):
|
||||||
frame_size = config.frame_shape_yuv[0] * config.frame_shape_yuv[1]
|
frame_size = config.frame_shape_yuv[0] * config.frame_shape_yuv[1]
|
||||||
self.frame_manager.create(f"{config.name}_frame{i}", frame_size)
|
self.frame_manager.create(f"{config.name}_frame{i}", frame_size)
|
||||||
|
|
||||||
capture_process = FrigateProcess(
|
capture_process = FrigateProcess(
|
||||||
target=capture_camera,
|
target=capture_camera,
|
||||||
name=f"camera_capture:{name}",
|
name=f"camera_capture:{name}",
|
||||||
args=(config, self.shm_count, self.camera_metrics[name]),
|
args=(config, count, self.camera_metrics[name]),
|
||||||
)
|
)
|
||||||
capture_process.daemon = True
|
capture_process.daemon = True
|
||||||
self.camera_metrics[name].capture_process = capture_process
|
self.camera_metrics[name].capture_process = capture_process
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user