-
Notifications
You must be signed in to change notification settings - Fork 132
Improve Hikvision Stream #1182
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
base: main
Are you sure you want to change the base?
Improve Hikvision Stream #1182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves the Hikvision stream integration by enhancing frame capture reliability and reconnection logic.
- Introduces a frame queue and a dedicated capture thread for more robust video streaming.
- Replaces print statements with consistent logging and adds reconnection attempts for stream failures.
Files not reviewed (1)
- .gitattributes: Language not supported
| try: | ||
| if self.frame_queue.full(): | ||
| self.frame_queue.get_nowait() | ||
| except queue.Empty: | ||
| pass | ||
|
|
Copilot
AI
Apr 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The try/except block used to catch queue.Empty is misaligned. Wrap the call to self.frame_queue.get_nowait() in its own try block so that the exception is caught correctly.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1182 +/- ##
===========================================
- Coverage 55.00% 33.05% -21.95%
===========================================
Files 23 55 +32
Lines 2287 4864 +2577
===========================================
+ Hits 1258 1608 +350
- Misses 915 3116 +2201
- Partials 114 140 +26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| continue | ||
| continue | ||
|
|
||
| if frame.shape[1] != CAMERA_WIDTH or frame.shape[0] != CAMERA_HEIGHT: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider using a resize ratio for reducing the frame size instead of fixed width and height
What this PR does / why we need it:
Improve Hikvision Stream because the old one with high workflow
Will this PR make the community happier?
yes
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #How is this PR tested
Special notes for your reviewer:
Release note: