From 2bb6c9fbd2e2dac0b266b6762401db142fe47475 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 18 May 2022 16:13:25 +0300 Subject: 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 Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Laurent Pinchart --- src/py/cam/cam.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/py/cam/cam.py') diff --git a/src/py/cam/cam.py b/src/py/cam/cam.py index 001fb9de..2f0690b5 100755 --- a/src/py/cam/cam.py +++ b/src/py/cam/cam.py @@ -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']) -- cgit v1.2.1