From patchwork Fri Nov 1 17:22:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 21797 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 5D1A4BE175 for ; Fri, 1 Nov 2024 17:22:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 685B6653A8; Fri, 1 Nov 2024 18:22:32 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="du29JW5D"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A5B6C65398 for ; Fri, 1 Nov 2024 18:22:30 +0100 (CET) Received: from localhost.localdomain (unknown [IPv6:2405:201:2015:f873:55f8:639e:8e9f:12ec]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6DA7C3A2; Fri, 1 Nov 2024 18:22:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1730481745; bh=tbbWfP3Ddl+EBk5eO5o4KmfYfx7C2ikakJMftygIYRM=; h=From:To:Cc:Subject:Date:From; b=du29JW5D8msx/yqRzQb2P9bHGvACBUXL3RbFF0h6VAIOJNEsEbQI73fD6rInLVF8t hWud7Zp3KJYUGEgVN5St/UlezANr8fZgrJbEmzHyuZaS5TdCT6NSKgflqeHXNtOjq+ eOZuEprE0AB4MMQkxaJwO+8xw7HXfksqiBARDpu8= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Umang Jain Subject: [PATCH] gstreamer: Merge initControls_ with request controls Date: Fri, 1 Nov 2024 22:52:20 +0530 Message-ID: <20241101172220.5765-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.0 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" It turns out there a few pipeline-handler/IPA that do not honor the controls passed during start() phase. For instance, he gstreamer libcamerasrc element, passes the target framerate during start() to libcamera. As rkisp1 pipeline-handler/IPA doesn't do anything with controls passed during start(), the target fps is unable to take effect on rkisp1 platform. Hence, merge the initControls_ with request controls with ControlList::MergePolicy::KeepExisting. This way, the controls passed by libcamerasrc during start(), can atleast get honoured on the platform through requests' control. Signed-off-by: Umang Jain --- src/gstreamer/gstlibcamerasrc.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp index 912a8d55..0d615f4a 100644 --- a/src/gstreamer/gstlibcamerasrc.cpp +++ b/src/gstreamer/gstlibcamerasrc.cpp @@ -208,6 +208,7 @@ int GstLibcameraSrcState::queueRequest() } GST_TRACE_OBJECT(src_, "Requesting buffers"); + wrap->request_.get()->controls().merge(initControls_, ControlList::MergePolicy::KeepExisting); cam_->queueRequest(wrap->request_.get()); {