From patchwork Fri Feb 26 13:29:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11396 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 EB6B1BD1F1 for ; Fri, 26 Feb 2021 13:29:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 106AE68A79; Fri, 26 Feb 2021 14:29:18 +0100 (CET) Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 520ED68A61 for ; Fri, 26 Feb 2021 14:29:14 +0100 (CET) Received: from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) (Authenticated sender: jacopo@jmondi.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 1968F200010 for ; Fri, 26 Feb 2021 13:29:13 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 26 Feb 2021 14:29:23 +0100 Message-Id: <20210226132932.165484-4-jacopo@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210226132932.165484-1-jacopo@jmondi.org> References: <20210226132932.165484-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 03/12] android: Rename MappedCamera3Buffer to CameraBuffer 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" Rename the MappedCamera3Buffer class to the simpler CameraBuffer to match the name of the header file where the interface is defined. Signed-off-by: Jacopo Mondi --- src/android/camera_buffer.h | 6 +++--- src/android/camera_device.cpp | 4 ++-- src/android/mm/android_generic_buffer.cpp | 5 ++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h index a1fb97a3c6db..00b061502d6e 100644 --- a/src/android/camera_buffer.h +++ b/src/android/camera_buffer.h @@ -11,11 +11,11 @@ #include -class MappedCamera3Buffer : public libcamera::MappedBuffer +class CameraBuffer : public libcamera::MappedBuffer { public: - MappedCamera3Buffer(const buffer_handle_t camera3buffer, int flags); - ~MappedCamera3Buffer(); + CameraBuffer(const buffer_handle_t camera3buffer, int flags); + ~CameraBuffer(); }; #endif /* __ANDROID_CAMERA_BUFFER_H__ */ diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index a7a5b7986aa4..f47f28b8c7ee 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -1862,8 +1862,8 @@ void CameraDevice::requestComplete(Request *request) * separate thread. */ - MappedCamera3Buffer mapped(*descriptor->buffers_[i].buffer, - PROT_READ | PROT_WRITE); + CameraBuffer mapped(*descriptor->buffers_[i].buffer, + PROT_READ | PROT_WRITE); if (!mapped.isValid()) { LOG(HAL, Error) << "Failed to mmap android blob buffer"; continue; diff --git a/src/android/mm/android_generic_buffer.cpp b/src/android/mm/android_generic_buffer.cpp index 2504d9276e9e..6f41215bb0f9 100644 --- a/src/android/mm/android_generic_buffer.cpp +++ b/src/android/mm/android_generic_buffer.cpp @@ -13,8 +13,7 @@ using namespace libcamera; LOG_DECLARE_CATEGORY(HAL) -MappedCamera3Buffer::MappedCamera3Buffer(const buffer_handle_t camera3buffer, - int flags) +CameraBuffer::CameraBuffer(const buffer_handle_t camera3buffer, int flags) { maps_.reserve(camera3buffer->numFds); error_ = 0; @@ -43,6 +42,6 @@ MappedCamera3Buffer::MappedCamera3Buffer(const buffer_handle_t camera3buffer, } } -MappedCamera3Buffer::~MappedCamera3Buffer() +CameraBuffer::~CameraBuffer() { }