Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion inference/core/interfaces/camera/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def __init__(
self._ended_sources: Set[int] = set()
self._threads_to_join: Set[int] = set()
self._last_batch_yielded_time = datetime.now()
self._all_sources_len = len(self._video_sources.all_sources)

def retrieve_frames_from_sources(
self,
Expand Down Expand Up @@ -175,7 +176,7 @@ def retrieve_frames_from_sources(
return batch_frames

def all_sources_ended(self) -> bool:
return len(self._ended_sources) >= len(self._video_sources.all_sources)
return len(self._ended_sources) >= self._all_sources_len

def join_all_reconnection_threads(self, include_not_finished: bool = False) -> None:
for source_ord in copy(self._threads_to_join):
Expand Down
Loading