-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
change buffer size to 2 #482
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #482 +/- ##
==========================================
+ Coverage 58.33% 58.83% +0.49%
==========================================
Files 62 62
Lines 3737 3741 +4
==========================================
+ Hits 2180 2201 +21
+ Misses 1430 1413 -17
Partials 127 127
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
pkg/driver/camera/camera_linux.go
Outdated
@@ -72,6 +72,7 @@ type camera struct { | |||
mutex sync.Mutex | |||
cancel func() | |||
prevFrameTime time.Time | |||
bufCount int |
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.
Is there a reason it's not
const bufCount = 2
?
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.
No, that's better. Done!
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.
LGTM:+1:
Description
From the Linux kernel documentation here
This code updates the buffer size from 1 to 2 along with the frame skip logic. The side effect is much higher fps on all 3 of the cameras I've tested, presumably because the buffer is no longer a bottleneck, and there shouldn't be a risk of slowing down any streams.