[libcamera-devel,0/2] request: Support non fatal errors
mbox series

Message ID 20220719103144.3686313-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • request: Support non fatal errors
Related show

Message

Kieran Bingham July 19, 2022, 10:31 a.m. UTC
Requests may have internal processing errors that don't prevent an image from
being captured, but may for instance prevent setting controls or other minor
errors that we can report to the application.

These non-fatal errors should not cause the Request to be cancelled, as this is
currently used specifically to prevent reqeusts from being requeued.

Cancelling otherwise re-usable requests can therefore lead rapidly to a resource
starvation where the application believes it is shutting down when the pipeline
is still operating.

Whilst this definition of Request completion status needs further
clarification, introduce the ability to set an error flag on a request and use
it to set a ControlError when the UVC pipeline handler fails to set a control.

This can happen already for instance if an incorrect exposure control is applied
to the camera in the Request.

Kieran Bingham (1):
  libcamera: pipeline: uvcvideo: Report control errors

Paul Elder (1):
  libcamera: request: Add support for error flags

 include/libcamera/internal/request.h         |  3 ++
 include/libcamera/request.h                  |  9 +++++
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp |  7 ++--
 src/libcamera/request.cpp                    | 36 ++++++++++++++++++++
 4 files changed, 53 insertions(+), 2 deletions(-)