-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Refactor engine #194
Closed
Closed
Refactor engine #194
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #194 +/- ##
===========================================
+ Coverage 87.92% 89.41% +1.48%
===========================================
Files 6 6
Lines 381 548 +167
===========================================
+ Hits 335 490 +155
- Misses 46 58 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Merged
I will create a new PR |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactoring for PTZ Camera Integration
I propose a refactor of the code to prepare for the use of PTZ cameras, which is divided into two features:
Feature 1: New ReolinkCamera
This new
ReolinkCamera
class allows control of both PTZ cameras and the current static cameras.Feature 2: Parallel Processing
In the previous version of the engine, a 30-second loop would allocate 30 seconds / (number of cameras) per camera to perform three tasks:
The problem was that in some cases, the image sending failed due to a lack of time. Additionally, this method does not scale well with a larger number of cameras, which will be the case with PTZ cameras that have a smaller field of view.
I propose to launch three parallel processes to manage these steps independently, optimizing the calculations as much as possible.
The code has been tested and works without any issues.