py: Implement PixelFormat class

Implement PixelFormat bindings properly with a PixelFormat class. Change
the bindings to use the new class instead of a string.

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:
Tomi Valkeinen 2022-05-18 16:13:23 +03:00 committed by Laurent Pinchart
parent 11a271b292
commit fa7bda46f8
6 changed files with 27 additions and 56 deletions

View file

@ -164,7 +164,7 @@ def configure(ctx):
stream_config.size = (stream_opts['width'], stream_opts['height'])
if 'pixelformat' in stream_opts:
stream_config.pixel_format = stream_opts['pixelformat']
stream_config.pixel_format = libcam.PixelFormat(stream_opts['pixelformat'])
stat = camconfig.validate()