[PATCH v1 3/3] libcamera: pipeline: virtual: Set `FrameError` on error

Jacopo Mondi jacopo.mondi at ideasonboard.com
Mon Feb 3 18:42:23 CET 2025


Hi Barnabás

On Mon, Feb 03, 2025 at 10:43:34AM +0000, Barnabás Pőcze wrote:
> Do not cancel, simply set the buffer's status to `FrameError`
> to notify the user about the error condition.

In case of errors, Status::FrameError seems more opportune than
Status::FrameCancelled indeed

>
> Signed-off-by: Barnabás Pőcze <pobrn at protonmail.com>

Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>

Thanks
  j

> ---
>  src/libcamera/pipeline/virtual/virtual.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/virtual/virtual.cpp b/src/libcamera/pipeline/virtual/virtual.cpp
> index 1a75f35aa..cbba08c82 100644
> --- a/src/libcamera/pipeline/virtual/virtual.cpp
> +++ b/src/libcamera/pipeline/virtual/virtual.cpp
> @@ -322,7 +322,7 @@ int PipelineHandlerVirtual::queueRequestDevice([[maybe_unused]] Camera *camera,
>
>  				if (streamConfig.frameGenerator->generateFrame(
>  					    stream->configuration().size, buffer))
> -					buffer->_d()->cancel();
> +					fmd.status = FrameMetadata::Status::FrameError;
>
>  				completeBuffer(request, buffer);
>  				break;
> --
> 2.48.1
>
>


More information about the libcamera-devel mailing list