Tomi Valkeinen
fa7bda46f8
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 >
2022-05-18 17:52:30 +03:00
Tomi Valkeinen
11a271b292
py: cam_qt: Cosmetic cleanups
...
Drop irrelevant or wrong comments, merge separate_components() into
demosaic(), and add mfb_to_rgb().
No functional changes.
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 >
2022-05-18 17:52:29 +03:00
Tomi Valkeinen
b7c78879cc
py: cam_kms: Fix multistream display
...
Instead of doing an atomic commit for each stream, do a single commit
for the two planes. This fixes the issue that only the first plane was
actually shown.
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 >
2022-05-18 17:52:29 +03:00
Tomi Valkeinen
a4964c5df1
py: cam_kms: Support multiplanar formats
...
Support multiplanar formats in the kms renderer. Tested with RPi and
NV12.
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 >
2022-05-18 17:52:29 +03:00
Tomi Valkeinen
1384cedf50
py: cam.py: Exit on exception
...
Catch exceptions in the event_handler, as they would get ignored
otherwise. Print the exception and return False so that the main loop
exits.
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 >
2022-05-18 17:52:29 +03:00
Tomi Valkeinen
74ba01121a
py: Add cam.py
...
Add cam.py, which mimics the 'cam' tool. Four rendering backends are
added:
* null - Do nothing
* kms - Use KMS with dmabufs
* qt - SW render on a Qt window
* qtgl - OpenGL render on a Qt window
All the renderers handle only a few pixel formats, and especially the GL
renderer is just a prototype.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com >
2022-05-10 13:53:43 +02:00