mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 08:35:07 +03:00
py: Use geometry classes
Now that we have proper geometry classes in the Python bindings, change the existing bindings and the .py files accordingly. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
e0a8517b27
commit
2bb6c9fbd2
5 changed files with 22 additions and 39 deletions
|
@ -160,8 +160,11 @@ def configure(ctx):
|
|||
for idx, stream_opts in enumerate(streams):
|
||||
stream_config = camconfig.at(idx)
|
||||
|
||||
if 'width' in stream_opts and 'height' in stream_opts:
|
||||
stream_config.size = (stream_opts['width'], stream_opts['height'])
|
||||
if 'width' in stream_opts:
|
||||
stream_config.size.width = stream_opts['width']
|
||||
|
||||
if 'height' in stream_opts:
|
||||
stream_config.size.height = stream_opts['height']
|
||||
|
||||
if 'pixelformat' in stream_opts:
|
||||
stream_config.pixel_format = libcam.PixelFormat(stream_opts['pixelformat'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue