From patchwork Mon Mar 29 09:15:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11762 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 58459C32EA for ; Mon, 29 Mar 2021 09:16:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1217A6878B; Mon, 29 Mar 2021 11:16:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="edWZ2U0F"; dkim-atps=neutral Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 46BD86877F for ; Mon, 29 Mar 2021 11:16:01 +0200 (CEST) Received: by mail-pj1-x102b.google.com with SMTP id s21so5711174pjq.1 for ; Mon, 29 Mar 2021 02:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ftjJzwNrmvPJW7qbqGOAURJROo1hW/N8tjWhheZFH0M=; b=edWZ2U0F6DwA+a3IAKsKXVBs7j4jglXYNDAuh5lDLI2KCDCONnAvRlBLDcCjqHz6Ds T9gbUEVNWVl36Cd1hoGTFNnnfnKBm9ao++ejx8Kqhtzc7Z4BkrD2cR3JcljVZGUtNeuw 4/ADsnqxpdbMCoJeLaiV2EBoIli1AYPVmpoxA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ftjJzwNrmvPJW7qbqGOAURJROo1hW/N8tjWhheZFH0M=; b=mZZH5Nnpsz4HfDnX/1SBIvbfPbRrP1RaInzSAuyGxRCXEsaFAziuSPeK+i1C84G6Ro IDTQz5siHUX2/n93vWNMVlNjbq354N7vdbmy0iLV87XrpPG5RitEi+jDguAHafK1L4Yq Nr5Q1fdRICQPbWlu9JhPUkB6s5YIPSf9ScNROtL5EbrBWgYa5atYiv6M/Pzi19V15jCG wg3sI1LTmUIBiHCo8Fd9m/nVNKxnETdUp+SPiHW6R9b15eFtlYr575d7DYjWH6G0z9nA fxQfaZb0+uw5hUOsR42ADGE2P7FnGJKKlqNBTatNmXzx7s4WqYRp7wtRCSY1qYZ+UaJC zCmg== X-Gm-Message-State: AOAM531reyUEOin1zbdxNgQQ9AAa2ALN3i19IltPIzN+l3k5Thg7rpxi 0RuHgb6UxjTRZx/FhRnqpmt7wE9donMhEQ== X-Google-Smtp-Source: ABdhPJyGON3ZsOpr2Dej7+kPYU4Qw1qV1QGgRm6ENJKV628onx+D97OecieooYxgYzqIPVvGaXzKZg== X-Received: by 2002:a17:902:e546:b029:e5:ec5e:6bf4 with SMTP id n6-20020a170902e546b02900e5ec5e6bf4mr27475880plf.41.1617009359807; Mon, 29 Mar 2021 02:15:59 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:1db7:ae60:9288:b906]) by smtp.gmail.com with ESMTPSA id n2sm15818122pga.57.2021.03.29.02.15.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 02:15:59 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 29 Mar 2021 18:15:50 +0900 Message-Id: <20210329091552.157208-2-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210329091552.157208-1-hiroh@chromium.org> References: <20210329091552.157208-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/3] libcamera: PipelineHandler: Make queueRequest() void function X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" PipelineHandler::queueRequest() is asynchronously invoked in Camera::queueRequest(). Therefore the return value of PipelineHandler::queueRequest() is useless. This changes the function to a void function. Signed-off-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- include/libcamera/internal/pipeline_handler.h | 2 +- src/libcamera/camera.cpp | 6 ++++-- src/libcamera/pipeline_handler.cpp | 6 +----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index 6aca0b46..093b94c6 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -79,7 +79,7 @@ public: virtual int start(Camera *camera, const ControlList *controls) = 0; virtual void stop(Camera *camera) = 0; - int queueRequest(Request *request); + void queueRequest(Request *request); bool completeBuffer(Request *request, FrameBuffer *buffer); void completeRequest(Request *request); diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp index 84edbb8f..2611c701 100644 --- a/src/libcamera/camera.cpp +++ b/src/libcamera/camera.cpp @@ -996,8 +996,10 @@ int Camera::queueRequest(Request *request) } } - return d->pipe_->invokeMethod(&PipelineHandler::queueRequest, - ConnectionTypeQueued, request); + d->pipe_->invokeMethod(&PipelineHandler::queueRequest, + ConnectionTypeQueued, request); + + return 0; } /** diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index d22991d3..eba00ed3 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -371,10 +371,8 @@ const ControlList &PipelineHandler::properties(const Camera *camera) const * signalled by the pipeline handler using the completeRequest() method. * * \context This function is called from the CameraManager thread. - * - * \return 0 on success or a negative error code otherwise */ -int PipelineHandler::queueRequest(Request *request) +void PipelineHandler::queueRequest(Request *request) { LIBCAMERA_TRACEPOINT(request_queue, request); @@ -385,8 +383,6 @@ int PipelineHandler::queueRequest(Request *request) int ret = queueRequestDevice(camera, request); if (ret) data->queuedRequests_.remove(request); - - return ret; } /** From patchwork Mon Mar 29 09:15:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11763 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4F2F5C32EA for ; Mon, 29 Mar 2021 09:16:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 96B1A68789; Mon, 29 Mar 2021 11:16:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="NRKEP16P"; dkim-atps=neutral Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C42416877F for ; Mon, 29 Mar 2021 11:16:02 +0200 (CEST) Received: by mail-pj1-x1033.google.com with SMTP id k23-20020a17090a5917b02901043e35ad4aso7403946pji.3 for ; Mon, 29 Mar 2021 02:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vdx1G6q8gRT+ZTYY4TA1JLBhswZthEfpjAnfwKAzYK0=; b=NRKEP16PjS/1UaErjpelRTYg3Ha/Wi6KgxRrpR7UvmaX7GHaWlwakgvWm8tNXVgWQj ZBd1elduWIaWM//smvJGMHfmr34KmKuYf0avGmlub2YElm2/Ua8udnNFf6flSgd4SY9V DTKfFqVYJIAGYKUDBsSFb0qjY3+8csZiSIFYo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vdx1G6q8gRT+ZTYY4TA1JLBhswZthEfpjAnfwKAzYK0=; b=hcMRE0OatiJgBJ/Qg5I6wuzCDGfDnkDu2Q0xTx0Oxku+/CpwzXHogSC/u28y6cS8DD 2IIYp6VSJt8HaElMe7fZv6CTTRFjUYZA09pPIlwLFQuiUPmMiTv9TUg0fLghZ8P2LYU2 HG9W9Dd47GT4yRsdiR+6pOTqBFZdrafqq8umMWKXvNvQXMHInM3WZIsJRmDIDs2OeUX7 cNq/HADDJaRKDPxwBqXZ3NWZwwSoiVdA0Damqhp3P+2jWjCUzslL76s7bkxeppKjIeTj ajvew2VAWVwa8qjl9anWVpG5S5+9DdV1rtLQZfeT9RiFA5h7gXLdsLYnfmVP+yGc0kzv 5m4A== X-Gm-Message-State: AOAM533RtUd7Ofl+Id3T+9r7Kr5OOJHI9wQbF9saIBW9xGdH5xpm2juD iWPH12I5xCardcycW53KpBVKWLRIz3eWDw== X-Google-Smtp-Source: ABdhPJzp6DHTmIhiaK0IKKZaO7wdKXX81qlVtiZ49uxxxYZHhIYLN8oTYo87XTeN5zjP4u0V5J/OzA== X-Received: by 2002:a17:902:e051:b029:e7:37d9:f32e with SMTP id x17-20020a170902e051b02900e737d9f32emr10282403plx.78.1617009361207; Mon, 29 Mar 2021 02:16:01 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:1db7:ae60:9288:b906]) by smtp.gmail.com with ESMTPSA id n2sm15818122pga.57.2021.03.29.02.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 02:16:00 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 29 Mar 2021 18:15:51 +0900 Message-Id: <20210329091552.157208-3-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210329091552.157208-1-hiroh@chromium.org> References: <20210329091552.157208-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/3] libcamera: Request: Add RequestError to Status X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This adds a new libcamera::Request::Status, RequestError, which represents a request isn't successfully processed due to some error. Signed-off-by: Hirokazu Honda --- include/libcamera/request.h | 2 ++ src/libcamera/pipeline_handler.cpp | 5 ++++- src/libcamera/request.cpp | 17 +++++++++++------ 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/include/libcamera/request.h b/include/libcamera/request.h index 6e5aad5f..598fcf86 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -30,6 +30,7 @@ public: RequestPending, RequestComplete, RequestCancelled, + RequestError, }; enum ReuseFlag { @@ -73,6 +74,7 @@ private: const uint64_t cookie_; Status status_; + bool error_; bool cancelled_; }; diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp index eba00ed3..66326ce0 100644 --- a/src/libcamera/pipeline_handler.cpp +++ b/src/libcamera/pipeline_handler.cpp @@ -381,8 +381,11 @@ void PipelineHandler::queueRequest(Request *request) data->queuedRequests_.push_back(request); int ret = queueRequestDevice(camera, request); - if (ret) + if (ret) { + request->error_ = true; data->queuedRequests_.remove(request); + completeRequest(request); + } } /** diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 0071667e..176f59dd 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -36,6 +36,8 @@ LOG_DEFINE_CATEGORY(Request) * The request has completed * \var Request::RequestCancelled * The request has been cancelled due to capture stop + * \var Request::RequestError + * The request is not completed successfully due to an error. */ /** @@ -73,7 +75,7 @@ LOG_DEFINE_CATEGORY(Request) */ Request::Request(Camera *camera, uint64_t cookie) : camera_(camera), cookie_(cookie), status_(RequestPending), - cancelled_(false) + error_(false), cancelled_(false) { /** * \todo Should the Camera expose a validator instance, to avoid @@ -126,6 +128,7 @@ void Request::reuse(ReuseFlag flags) } status_ = RequestPending; + error_ = false; cancelled_ = false; controls_->clear(); @@ -256,20 +259,22 @@ FrameBuffer *Request::findBuffer(const Stream *stream) const /** * \brief Complete a queued request * - * Mark the request as complete by updating its status to RequestComplete, - * unless buffers have been cancelled in which case the status is set to - * RequestCancelled. + * Mark the request as complete by updating its status to RequestError on error, + * RequestCancelled if buffers have been cancelled, or otherwise RequestComplete. */ void Request::complete() { ASSERT(status_ == RequestPending); ASSERT(!hasPendingBuffers()); - status_ = cancelled_ ? RequestCancelled : RequestComplete; + if (error_) + status_ = RequestError; + else + status_ = cancelled_ ? RequestCancelled : RequestComplete; LOG(Request, Debug) << "Request has completed - cookie: " << cookie_ - << (cancelled_ ? " [Cancelled]" : ""); + << (error_ ? " [Error]" : (cancelled_ ? " [Cancelled]" : "")); LIBCAMERA_TRACEPOINT(request_complete, this); } From patchwork Mon Mar 29 09:15:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11764 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id D172DC32EA for ; Mon, 29 Mar 2021 09:16:08 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6E9986878A; Mon, 29 Mar 2021 11:16:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="c3O/PQFz"; dkim-atps=neutral Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 30EE46877F for ; Mon, 29 Mar 2021 11:16:04 +0200 (CEST) Received: by mail-pj1-x1033.google.com with SMTP id cl21-20020a17090af695b02900c61ac0f0e9so7890640pjb.1 for ; Mon, 29 Mar 2021 02:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F/R/Bikvglu/rqZgcIYTTJBemVCr6U4EhBeOlf3PuO4=; b=c3O/PQFzYMLQpfD7HAXz2Squ4O+F1OeDHLEb/9NqLF/fMi9Fo7ysLi+beeO7q/zv5e rTswXxZGonRR6um6wvLoxuDt/wcb9sYvhLDBWtgLCN6SPHUjDj9LEn4xQP9Sw+4NPg64 AGKFNshvJOhk3g75Ga26a6Q/rCoZPVYzP/Gvk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F/R/Bikvglu/rqZgcIYTTJBemVCr6U4EhBeOlf3PuO4=; b=nRJnCqIl8Zj5dL+Aq8SoDVzdSNYwfAmigc5bG7ibY6vUd8RlesK07zTcJOeXh1exRk xN8DU3jvCuCimJTknmnOdSkM0VypbbAEJ6XI1kHbEw8s+kXeFw+LpZNl44jNAtmwpmnI wmcg9rYHfZIZkaomML+bckhCsGEMuAWx7vjit8cRazoFAZxyTwWvOQwn/jRzbRUP3wDz hHztcmYJuMNeiZYBrw3dl+eJb+fXK6l36zU6y4UM0gmnM+uIvY8cVJG76Yj27iEYCHQK R0kxVG+bNd4xL8GaV4rWWYNtYyOJPUAXtlyFoJianTmUxmEhml2jTwcWrDO50bfb94Mp JCuQ== X-Gm-Message-State: AOAM531w2CEFka+8lWjbHwCaK6kcCoTvUKSMv8i3OlwRX1abWTzB4BOm LEtr7ELF0FCRcn4KhW+OPB5o2Cp9GV4U/A== X-Google-Smtp-Source: ABdhPJwZv9kf4f9SJ/MJ2frPPpefoFTNI9ZjxyX8qTitmiqERf2m28HyzoddFE9kDsXxbM7FC10dzA== X-Received: by 2002:a17:90a:5d09:: with SMTP id s9mr25174803pji.228.1617009362647; Mon, 29 Mar 2021 02:16:02 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:1db7:ae60:9288:b906]) by smtp.gmail.com with ESMTPSA id n2sm15818122pga.57.2021.03.29.02.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Mar 2021 02:16:02 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 29 Mar 2021 18:15:52 +0900 Message-Id: <20210329091552.157208-4-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.291.g576ba9dcdaf-goog In-Reply-To: <20210329091552.157208-1-hiroh@chromium.org> References: <20210329091552.157208-1-hiroh@chromium.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/3] Regard a request error in the request completion X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" libcamera::Request contains an error value. Every libcamera::Camera client should regards the error in a request completion. Signed-off-by: Hirokazu Honda --- Documentation/guides/application-developer.rst | 2 ++ src/cam/capture.cpp | 5 +++++ src/gstreamer/gstlibcamerasrc.cpp | 6 +++++- src/qcam/main_window.cpp | 4 ++++ src/v4l2/v4l2_camera.cpp | 5 +++++ 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst index e3430f03..e8a1a7b4 100644 --- a/Documentation/guides/application-developer.rst +++ b/Documentation/guides/application-developer.rst @@ -392,6 +392,8 @@ the `Request::Status`_ class enum documentation. if (request->status() == Request::RequestCancelled) return; + if (request->status() == Request::RequestError) + // handle error. If the ``Request`` has completed successfully, applications can access the completed buffers using the ``Request::buffers()`` function, which returns a map diff --git a/src/cam/capture.cpp b/src/cam/capture.cpp index 7b55fc67..3e9edf80 100644 --- a/src/cam/capture.cpp +++ b/src/cam/capture.cpp @@ -167,6 +167,11 @@ void Capture::requestComplete(Request *request) { if (request->status() == Request::RequestCancelled) return; + /* TODO: Handle an error correctly */ + if (request->status() == Request::RequestError) { + std::cout << "Failed to capture request: " << request->cookie(); + return; + } /* * Defer processing of the completed request to the event loop, to avoid diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp index 87246b40..1ecb9883 100644 --- a/src/gstreamer/gstlibcamerasrc.cpp +++ b/src/gstreamer/gstlibcamerasrc.cpp @@ -163,10 +163,14 @@ GstLibcameraSrcState::requestCompleted(Request *request) g_return_if_fail(wrap->request_.get() == request); - if ((request->status() == Request::RequestCancelled)) { + if (request->status() == Request::RequestCancelled) { GST_DEBUG_OBJECT(src_, "Request was cancelled"); return; } + if (request->status() == Request::RequestError) { + GST_ERROR_OBJECT(src_, "Request doesn't complete successfully"); + return; + } GstBuffer *buffer; for (GstPad *srcpad : srcpads_) { diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 39d034de..1288bcd5 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -694,6 +694,10 @@ void MainWindow::requestComplete(Request *request) { if (request->status() == Request::RequestCancelled) return; + if (request->status() == Request::RequestError) { + qCritical() << "Request doesn't complete successfully"; + return; + } /* * We're running in the libcamera thread context, expensive operations diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp index 97825c71..d6b1d755 100644 --- a/src/v4l2/v4l2_camera.cpp +++ b/src/v4l2/v4l2_camera.cpp @@ -84,6 +84,11 @@ void V4L2Camera::requestComplete(Request *request) { if (request->status() == Request::RequestCancelled) return; + if (request->status() == Request::RequestError) { + LOG(V4L2Compat, Error) + << "Request doesn't complete successfully"; + return; + } /* We only have one stream at the moment. */ bufferLock_.lock();