-
Notifications
You must be signed in to change notification settings - Fork 195
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
picamera2: Allow setting of stride #892
Conversation
if stream_config.get("stride") is not None: | ||
libcamera_stream_config.stride = stream_config["stride"] | ||
else: | ||
libcamera_stream_config.stride = 0 |
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.
Would libcamera_stream_config.stride = stream_config.get("stride", 0)
be the same?
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.
Oh yes, that'll be cleaner, I'll change that and push a new commit
Thanks for this Will - are we happy that is doesn't rely on any other libcamera/libpisp changes? (The tests all pass, so presumably not...) |
098f0ca
to
dc4be4e
Compare
It does rely on a libpisp and libcamera change, but that's only to get it to actually set the stride, so worth merging it now in anticipation of those changes being merged, as once the libcamera change is merged it'll break picamera2 (because it's accidentally setting an incorrect stride, which is currently ignored but if it's not ignored then it'll break). Without those changes it'll just do nothing when you set the stride, it won't break or anything. |
The tests seem to have got very unhappy, do we know what that's about? I can't believe that teeny tweak would have caused it...! |
Allow setting of the stride in stream configuration, and default to 0 if not set to allow libcamera to set the correct stride. Signed-off-by: William Vinnicombe <[email protected]>
dc4be4e
to
325f794
Compare
It seems the stream_config sometimes has the stride set to None, so that was causing things to break - I've gone back to the original code which guarded against that case, but added a comment to say why |
Allow setting of the stride in stream configuration, and default to 0 if not set to allow libcamera to set the correct stride.