From patchwork Mon Jun 29 16:30:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 27127 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 EB92FC3303 for ; Mon, 29 Jun 2026 16:31:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 811CE65FB9; Mon, 29 Jun 2026 18:31:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Iz+4dHQM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D7CF65F6E for ; Mon, 29 Jun 2026 18:30:32 +0200 (CEST) Received: from pb-laptop.local (185.221.140.128.nat.pool.zt.hu [185.221.140.128]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DFD891044 for ; Mon, 29 Jun 2026 18:29:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1782750589; bh=bUYC0r8e9bSYJn6QBkh+LrbSDZUz/lx8pFWTcpQa/lA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Iz+4dHQMIvbyAfOKfYsZ7wCGGfBhCwnqxX6dZXBafpfvE+O5JRCRbVSQYhhzqfFex 9mJKiPxefDSPjmjLVo87EFMTMUt/FJt0w7l+Mlxkm3zZV+36Y8j811xYEko6LxP4Bn cbxPeyeeiLuINnSoYzaO3lXkU/Zsxk0xA+wS+R74= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1 48/54] libcamera: request: Remove `ReuseFlag` Date: Mon, 29 Jun 2026 18:30:11 +0200 Message-ID: <20260629163017.863145-49-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260629163017.863145-1-barnabas.pocze@ideasonboard.com> References: <20260629163017.863145-1-barnabas.pocze@ideasonboard.com> MIME-Version: 1.0 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" They are no longer used, so they can be removed. Signed-off-by: Barnabás Pőcze --- .../guides/application-developer.rst | 9 -------- include/libcamera/request.h | 7 +------ src/libcamera/request.cpp | 21 ++----------------- src/py/libcamera/py_main.cpp | 1 - 4 files changed, 3 insertions(+), 35 deletions(-) diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst index a9620ca862..9c6191406d 100644 --- a/Documentation/guides/application-developer.rst +++ b/Documentation/guides/application-developer.rst @@ -477,15 +477,6 @@ libcamera repository. .. _FileSink class: https://git.libcamera.org/libcamera/libcamera.git/tree/src/apps/cam/file_sink.cpp -With the handling of this request completed, it is possible to re-use the -request and the associated buffers and re-queue it to the camera -device: - -.. code:: cpp - - request->reuse(Request::ReuseBuffers); - camera->queueRequest(request); - Request queueing ---------------- diff --git a/include/libcamera/request.h b/include/libcamera/request.h index c86259c59b..462611da59 100644 --- a/include/libcamera/request.h +++ b/include/libcamera/request.h @@ -37,17 +37,12 @@ public: RequestCancelled, }; - enum ReuseFlag { - Default = 0, - ReuseBuffers = (1 << 0), - }; - using BufferMap = std::map; Request(Camera *camera, uint64_t cookie = 0); ~Request(); - void reuse(ReuseFlag flags = Default); + void reuse(); ControlList &controls() { return controls_; } const ControlList &metadata() const; diff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp index 4fb8c0a659..5d28ac80df 100644 --- a/src/libcamera/request.cpp +++ b/src/libcamera/request.cpp @@ -193,18 +193,6 @@ void Request::Private::reset() * The request has been cancelled due to capture stop */ -/** - * \enum Request::ReuseFlag - * Flags to control the behavior of Request::reuse() - * \var Request::Default - * Don't reuse buffers - * \var Request::ReuseBuffers - * Reuse the buffers that were previously added by addBuffer() - * - * \note Fences associated with the buffers are not reused. - * This flag should not be used if fences are used. - */ - /** * \typedef Request::BufferMap * \brief A map of Stream to FrameBuffer pointers @@ -245,21 +233,16 @@ Request::~Request() /** * \brief Reset the request for reuse - * \param[in] flags Indicate whether or not to reuse the buffers * * Reset the status and controls associated with the request, to allow it to * be reused and requeued without destruction. This function shall be called * prior to queueing the request to the camera, in lieu of constructing a new - * request. The application can reuse the buffers that were previously added - * to the request via addBuffer() by setting \a flags to ReuseBuffers. + * request. */ -void Request::reuse(ReuseFlag flags) +void Request::reuse() { LIBCAMERA_TRACEPOINT(request_reuse, this); - if (flags) - LOG(Request, Fatal) << "NOT IMPLEMENTED"; - _d()->reset(); bufferMap_.clear(); diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp index 26b348ef0e..7196bb0f6d 100644 --- a/src/py/libcamera/py_main.cpp +++ b/src/py/libcamera/py_main.cpp @@ -135,7 +135,6 @@ PYBIND11_MODULE(_libcamera, m) auto pyControlInfo = py::class_(m, "ControlInfo"); auto pyRequest = py::class_>(m, "Request"); auto pyRequestStatus = py::enum_(pyRequest, "Status"); - auto pyRequestReuse = py::enum_(pyRequest, "Reuse"); auto pyFrameMetadata = py::class_(m, "FrameMetadata"); auto pyFrameMetadataStatus = py::enum_(pyFrameMetadata, "Status"); auto pyFrameMetadataPlane = py::class_(pyFrameMetadata, "Plane");