From patchwork Wed Jan 19 00:17:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 15285 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 7FF58BF415 for ; Wed, 19 Jan 2022 00:17:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B068760868; Wed, 19 Jan 2022 01:17:22 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="bhUsf0U3"; 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 3DCAE6017D for ; Wed, 19 Jan 2022 01:17:21 +0100 (CET) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C298B464; Wed, 19 Jan 2022 01:17:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1642551440; bh=E8kDkG7IokCRjTkOv2FeeuZL66XhuR4WDFZARQ0kjkU=; h=From:To:Cc:Subject:Date:From; b=bhUsf0U3R/B7HSX9NHrXhlw7RcmpYPPJ8ibD4oKWR62nClUkfv0VXQ0JfQt/fB+Gg SgqPDvJxYljn6xcknY/WxbZAb6kKdb8vLo5RgZmcQxgVloFZy9NxkEh8p8VtZhVCHh FUtdIvBJrQx8NhYHm5V62QWkODLhY02l54kip/n8= From: Kieran Bingham To: libcamera devel Date: Wed, 19 Jan 2022 00:17:15 +0000 Message-Id: <20220119001717.2503111-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/2] libcamera: pipeline_handler: Register requests 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" Provide a new call on pipeline handlers allowing the Camera to register a request with the pipeline handler after it is constructed. This allows us to perform one-time operations such as connecting relevant signals on the request to the pipeline handler. Use this new call to move the prepared signal connection away from queueRequest where it was repeatedly connecting the signal, leading to bugs which exhibited excessively long shutdown times when any substantial number of frames had been processed. This is reported to have taken more than 10 minutes to close down the pipeline after a 2 hour capture run. Finally remove support for the same signal being connected to an object multiple times and add an assertion to the object class to ensure that we catch and prevent this from happening again. This underlying bug was identified from : https://github.com/raspberrypi/libcamera-apps/issues/217 And should resolve the issue there. Kieran Bingham (2): libcamera: pipeline_handler: Register requests libcamera: base: object: Prevent the same signal being connected more than once include/libcamera/internal/pipeline_handler.h | 1 + src/libcamera/base/object.cpp | 6 ++++++ src/libcamera/camera.cpp | 14 +++++++++++--- src/libcamera/pipeline_handler.cpp | 19 ++++++++++++++++--- test/signal.cpp | 8 ++------ 5 files changed, 36 insertions(+), 12 deletions(-)