mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-06 11:15:21 +03:00
Refactor app.py and util.py to use a custom Queue implementation called LQueue instead of the existing Queue
This commit is contained in:
parent
c62a427c5c
commit
4e2a529b0e
@ -192,12 +192,12 @@ class FrigateApp:
|
|||||||
# Queues for clip processing
|
# Queues for clip processing
|
||||||
self.event_queue: Queue = ff.Queue()
|
self.event_queue: Queue = ff.Queue()
|
||||||
self.event_processed_queue: Queue = ff.Queue()
|
self.event_processed_queue: Queue = ff.Queue()
|
||||||
self.video_output_queue: Queue = ff.Queue(
|
self.video_output_queue: Queue = LQueue(
|
||||||
maxsize=len(self.config.cameras.keys()) * 2
|
maxsize=len(self.config.cameras.keys()) * 2
|
||||||
)
|
)
|
||||||
|
|
||||||
# Queue for cameras to push tracked objects to
|
# Queue for cameras to push tracked objects to
|
||||||
self.detected_frames_queue: Queue = ff.Queue(
|
self.detected_frames_queue: Queue = LQueue(
|
||||||
maxsize=len(self.config.cameras.keys()) * 2
|
maxsize=len(self.config.cameras.keys()) * 2
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@ from collections import Counter
|
|||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
from multiprocessing import shared_memory
|
from multiprocessing import shared_memory
|
||||||
from typing import Any, AnyStr, Optional, Tuple
|
from typing import Any, AnyStr, Optional, Tuple
|
||||||
from faster_fifo import Queue as FFQueue, DEFAULT_CIRCULAR_BUFFER_SIZE, DEFAULT_TIMEOUT
|
from faster_fifo import Queue as FFQueue, DEFAULT_CIRCULAR_BUFFER_SIZE, DEFAULT_TIMEOUT
|
||||||
from queue import Full, Empty
|
from queue import Full, Empty
|
||||||
import time
|
import time
|
||||||
import cv2
|
import cv2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user