From patchwork Sun Jul 11 17:03:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12893 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 5DA1AC3224 for ; Sun, 11 Jul 2021 17:04:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 92E5068525; Sun, 11 Jul 2021 19:04:50 +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="lygq7FNQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CDE6068519 for ; Sun, 11 Jul 2021 19:04:48 +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 4AD93CC for ; Sun, 11 Jul 2021 19:04:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626023088; bh=83kLKJaoA6r5JWDzPD524avR/FCJ2i3tlSCaBtnlSgk=; h=From:To:Subject:Date:From; b=lygq7FNQWVbC4d0dyM/U/78NAJd36/DY/kh9iTQYRBoodKdEdrEoOsWuiJNZue7/f /zMmbzE9MSoBnUOYzgKo1+WdROgFzrGHLqwqnVDFvMsgIT6cRvQR7KZXubzG9PY3bg v4XCxQ5lJRxECSti7vbyTX437hgJ19hL0lF6IHJ0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 11 Jul 2021 20:03:56 +0300 Message-Id: <20210711170359.300-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/3] libcamera: Make Framebuffer class Extensible 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 small patch series makes the FrameBuffer class inherit from Extensible, for two reasons: - FrameBuffer being such a cornerstone of the libcamera API, it will most likely need to be extended after stabilizing the public API. Making the class Extensible prepares for this. - There's a todo item to hide the FrameBuffer::setRequest() function from the public API, as it's meant to be called internally only. Patch 3/3 showcases how internal functions can be hidden from the public API by moving them to the Private data class. This v2 incorporates parts of the comments from reviews of v1. There are still some ongoing discussions, which may benefit from patch 2/3 (new in v2) that shows how the _d() function can be used directly instead of using the LIBCAMERA_D_PTR macro. Laurent Pinchart (3): libcamera: base: class: Expose Extensible private data to other classes libcamera: Drop the LIBCAMERA_D_PTR macro in favour of the _d() function libcamera: framebuffer: Make FrameBuffer class Extensible include/libcamera/base/class.h | 16 ++++++--- include/libcamera/framebuffer.h | 8 ++--- include/libcamera/internal/framebuffer.h | 13 +++++++ src/android/camera_buffer.h | 15 +++----- src/android/camera_hal_config.cpp | 3 +- src/libcamera/base/class.cpp | 17 +++------ src/libcamera/camera.cpp | 44 +++++++++--------------- src/libcamera/camera_manager.cpp | 16 ++++----- src/libcamera/framebuffer.cpp | 34 ++++++++++-------- src/libcamera/pipeline/ipu3/cio2.cpp | 3 +- src/libcamera/pipeline/ipu3/frames.cpp | 5 +-- src/libcamera/request.cpp | 7 ++-- 12 files changed, 91 insertions(+), 90 deletions(-)