[RFC,v1,0/2] libcamera: pipeline: virtual: Move image generation to separate thread
mbox series

Message ID 20250811094926.1308259-1-barnabas.pocze@ideasonboard.com
Headers show
Series
  • libcamera: pipeline: virtual: Move image generation to separate thread
Related show

Message

Barnabás Pőcze Aug. 11, 2025, 9:49 a.m. UTC
This seems to be the simplest way. Still there are questions:

* Should there be a `flushMessages(Message::Type)` instead? The lambda approach
  seems more generally useful. Initially I did not have VirtualCameraData::queueRequest()
  and simply moved things into a lambda.
* Should each camera get its own thread or should they share?
  * If one thread per camera, should that be started when the camera is created or only when
    the camera is started?

Barnabás Pőcze (2):
  libcamera: base: object: Add `invokeMethod` for lamdas
  libcamera: pipeline: virtual: Move image generation to separate thread

 include/libcamera/base/object.h            | 10 +++
 src/libcamera/base/object.cpp              | 24 ++++++-
 src/libcamera/pipeline/virtual/virtual.cpp | 80 ++++++++++++++--------
 src/libcamera/pipeline/virtual/virtual.h   |  8 ++-
 4 files changed, 91 insertions(+), 31 deletions(-)

--
2.50.1