Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache camera stream info to speed up future config generations #11614

Merged
merged 3 commits into from
May 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Formatting
  • Loading branch information
NickM-27 committed May 29, 2024
commit dd502cdfdc70281773b4ef86512cdb07cc1a33be
4 changes: 1 addition & 3 deletions frigate/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ def get_relative_coordinates(

return mask

class StreamInfoRetriever():

class StreamInfoRetriever:
def __init__(self) -> None:
self.stream_cache: dict[str, tuple[int, int]] = {}

Expand All @@ -209,5 +209,3 @@ def get_resolution(self, path: str) -> str:
info = asyncio.run(get_video_properties(input.path))
self.stream_cache[path] = info
return info