From patchwork Mon Sep 21 03:10:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9675 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 69EF3BF01C for ; Mon, 21 Sep 2020 03:11:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BB58A62FD6; Mon, 21 Sep 2020 05:11:35 +0200 (CEST) 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="BtuvjmBK"; 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 BBCEF60367 for ; Mon, 21 Sep 2020 05:11:33 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3E14427B for ; Mon, 21 Sep 2020 05:11:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1600657893; bh=2hrOcexIUJrhNbB2tblm2scOkzpC+m2UBiZviGzg5d8=; h=From:To:Subject:Date:From; b=BtuvjmBKC6VWgkeqN+803hrZr7mrMPbuaTCT6ZYTDzUJCLMENJun8pDEjXo53cvEs un9GfKTB3abR6kFd2579/n6jpGdDECd79TjpfzkNWfn/VthJXbI8PfcA6W+gD8U1t3 stmr7yWrGV88VdUh09MJ9Prm0v1sJCfk08fhPPrA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 21 Sep 2020 06:10:53 +0300 Message-Id: <20200921031057.3564-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/4] libcamera: Implement d-pointer design pattern 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" Hello, This patch series implements the d-pointer design pattern in a base class, generalizing the custom implementations from the Camera and CameraManager classes. This was mostly developed as a base for the reprocessing API (the reworked camera configuration API will make use of d-pointers), but I believe it makes sense on its own. The series is quite straightforward. Patch 1/4 implements the framework, patch 2/4 fixes an issue in the CameraManager class, and patches 3/4 and 4/4 replace the manual implementations. Please see individual patches for details. Laurent Pinchart (4): libcamera: Add a base class to implement the d-pointer design pattern libcamera: camera_manager: Make CameraManager::Private::mutex_ mutable libcamera: camera_manager: Inherit from Extensible libcamera: camera: Inherit from Extensible include/libcamera/camera.h | 9 +- include/libcamera/camera_manager.h | 7 +- include/libcamera/extensible.h | 80 ++++++++++++++++++ include/libcamera/meson.build | 1 + src/libcamera/camera.cpp | 123 +++++++++++++++++----------- src/libcamera/camera_manager.cpp | 57 ++++++++----- src/libcamera/extensible.cpp | 127 +++++++++++++++++++++++++++++ src/libcamera/meson.build | 1 + 8 files changed, 328 insertions(+), 77 deletions(-) create mode 100644 include/libcamera/extensible.h create mode 100644 src/libcamera/extensible.cpp