[libcamera-devel,v2,0/2] libcamera: pipeline_handler: Register requests
mbox series

Message ID 20220119001717.2503111-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • libcamera: pipeline_handler: Register requests
Related show

Message

Kieran Bingham Jan. 19, 2022, 12:17 a.m. UTC
Provide a new call on pipeline handlers allowing the Camera to register
a request with the pipeline handler after it is constructed.

This allows us to perform one-time operations such as connecting
relevant signals on the request to the pipeline handler.

Use this new call to move the prepared signal connection away from
queueRequest where it was repeatedly connecting the signal, leading to
bugs which exhibited excessively long shutdown times when any
substantial number of frames had been processed. This is reported to
have taken more than 10 minutes to close down the pipeline after a 2
hour capture run.

Finally remove support for the same signal being connected to an object
multiple times and add an assertion to the object class to ensure that
we catch and prevent this from happening again.

This underlying bug was identified from :
 https://github.com/raspberrypi/libcamera-apps/issues/217

And should resolve the issue there.

Kieran Bingham (2):
  libcamera: pipeline_handler: Register requests
  libcamera: base: object: Prevent the same signal being connected more
    than once

 include/libcamera/internal/pipeline_handler.h |  1 +
 src/libcamera/base/object.cpp                 |  6 ++++++
 src/libcamera/camera.cpp                      | 14 +++++++++++---
 src/libcamera/pipeline_handler.cpp            | 19 ++++++++++++++++---
 test/signal.cpp                               |  8 ++------
 5 files changed, 36 insertions(+), 12 deletions(-)