[libcamera-devel] [PATCH v2 01/14] py: cam.py: Fix multi camera capture without -C
Tomi Valkeinen
tomi.valkeinen at ideasonboard.com
Wed Jun 29 09:04:03 CEST 2022
-C flag is supposed to affect only the camera that was previously
defined in the arguments. That's not the case, and, e.g.:
cam.py -c2 -C -c3
causes camera 3 to start capturing, but it stops after the initial
Requests have been completed.
Fix the issue by filtering out camera contexts that do not have -C
defined.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/py/cam/cam.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/py/cam/cam.py b/src/py/cam/cam.py
index 2ae89fa8..8a82e092 100755
--- a/src/py/cam/cam.py
+++ b/src/py/cam/cam.py
@@ -434,7 +434,10 @@ def main():
if args.info:
ctx.do_cmd_info()
- if args.capture:
+ # Filter out capture contexts which are not marked for capture
+ contexts = [ctx for ctx in contexts if ctx.opt_capture > 0]
+
+ if contexts:
state = CaptureState(cm, contexts)
if args.renderer == 'null':
--
2.34.1
More information about the libcamera-devel
mailing list