From patchwork Tue Nov 30 03:38:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 14857 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 65719BF415 for ; Tue, 30 Nov 2021 03:38:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2C4A7605C9; Tue, 30 Nov 2021 04:38:54 +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="rkhsVH9q"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1FAE16059E for ; Tue, 30 Nov 2021 04:38:49 +0100 (CET) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B8B3D8F0 for ; Tue, 30 Nov 2021 04:38:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1638243528; bh=L3qh8xYNoHKpcZfbvlBIve0uOhnY/bQGfPZMcjqLzrU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rkhsVH9qkPSO9I3OxJJxWOShwb1IcuS9gWM5hyKgh6GpSvf33wxIh/yJOCF6wT1O+ nGe8VN8nMjzBcvqPwURssMlma5yV2uS6eJNvy012PcTKnXsO2gEgqZnrnjkgapjIoS ojtV1J6LwxsBKfXRYGGsDgZTpCtvwAQLjK59lD5s= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Nov 2021 05:38:00 +0200 Message-Id: <20211130033820.18235-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211130033820.18235-1-laurent.pinchart@ideasonboard.com> References: <20211130033820.18235-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 02/22] libcamera: Move file_descriptor.h to base/ 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" The FileDescriptor class is a generic helper that matches the criteria for the base library. Move it there. Signed-off-by: Laurent Pinchart Reviewed-by: Hirokazu Honda Reviewed-by: Jacopo Mondi --- include/libcamera/{ => base}/file_descriptor.h | 0 include/libcamera/base/meson.build | 1 + include/libcamera/framebuffer.h | 3 +-- include/libcamera/internal/ipc_pipe.h | 3 +-- include/libcamera/meson.build | 1 - src/ipa/raspberrypi/raspberrypi.cpp | 2 +- src/libcamera/{ => base}/file_descriptor.cpp | 4 ++-- src/libcamera/base/meson.build | 1 + src/libcamera/meson.build | 1 - src/libcamera/pipeline/raspberrypi/dma_heaps.h | 2 +- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++- src/libcamera/v4l2_videodevice.cpp | 3 +-- src/v4l2/v4l2_camera.h | 2 +- test/file-descriptor.cpp | 3 +-- 14 files changed, 13 insertions(+), 16 deletions(-) rename include/libcamera/{ => base}/file_descriptor.h (100%) rename src/libcamera/{ => base}/file_descriptor.cpp (99%) diff --git a/include/libcamera/file_descriptor.h b/include/libcamera/base/file_descriptor.h similarity index 100% rename from include/libcamera/file_descriptor.h rename to include/libcamera/base/file_descriptor.h diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build index 23dd4e2023a8..f73b00917409 100644 --- a/include/libcamera/base/meson.build +++ b/include/libcamera/base/meson.build @@ -11,6 +11,7 @@ libcamera_base_headers = files([ 'event_dispatcher_poll.h', 'event_notifier.h', 'file.h', + 'file_descriptor.h', 'flags.h', 'log.h', 'message.h', diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h index 4e710e332370..2fbea9c5be16 100644 --- a/include/libcamera/framebuffer.h +++ b/include/libcamera/framebuffer.h @@ -13,10 +13,9 @@ #include #include +#include #include -#include - namespace libcamera { class Request; diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h index bd8824f255c2..986f8d886fa6 100644 --- a/include/libcamera/internal/ipc_pipe.h +++ b/include/libcamera/internal/ipc_pipe.h @@ -9,10 +9,9 @@ #include +#include #include -#include - #include "libcamera/internal/ipc_unixsocket.h" namespace libcamera { diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index a8cca2a88cad..5f42977c034b 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -6,7 +6,6 @@ libcamera_public_headers = files([ 'camera.h', 'camera_manager.h', 'controls.h', - 'file_descriptor.h', 'framebuffer.h', 'framebuffer_allocator.h', 'geometry.h', diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index fed82e223d38..c6aec09046f7 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -15,12 +15,12 @@ #include +#include #include #include #include #include -#include #include #include #include diff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/base/file_descriptor.cpp similarity index 99% rename from src/libcamera/file_descriptor.cpp rename to src/libcamera/base/file_descriptor.cpp index 0409c3e1758c..f5f87c56eee8 100644 --- a/src/libcamera/file_descriptor.cpp +++ b/src/libcamera/base/file_descriptor.cpp @@ -5,7 +5,7 @@ * file_descriptor.cpp - File descriptor wrapper */ -#include +#include #include #include @@ -16,7 +16,7 @@ #include /** - * \file file_descriptor.h + * \file base/file_descriptor.h * \brief File descriptor wrapper */ diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build index 05fed7acf561..d5254fda9cbf 100644 --- a/src/libcamera/base/meson.build +++ b/src/libcamera/base/meson.build @@ -8,6 +8,7 @@ libcamera_base_sources = files([ 'event_dispatcher_poll.cpp', 'event_notifier.cpp', 'file.cpp', + 'file_descriptor.cpp', 'flags.cpp', 'log.cpp', 'message.cpp', diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index ddedc78c0c10..b763110e74a6 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -14,7 +14,6 @@ libcamera_sources = files([ 'delayed_controls.cpp', 'device_enumerator.cpp', 'device_enumerator_sysfs.cpp', - 'file_descriptor.cpp', 'formats.cpp', 'framebuffer.cpp', 'framebuffer_allocator.cpp', diff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h index 38dfc242c0b9..57beaeb2e48a 100644 --- a/src/libcamera/pipeline/raspberrypi/dma_heaps.h +++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.h @@ -7,7 +7,7 @@ #pragma once -#include +#include namespace libcamera { diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index e31fa3b23859..d82cb30f0e77 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -12,9 +12,10 @@ #include #include +#include + #include #include -#include #include #include #include diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 4f04212df672..0a85bcf6b3ff 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -22,11 +22,10 @@ #include #include +#include #include #include -#include - #include "libcamera/internal/formats.h" #include "libcamera/internal/framebuffer.h" #include "libcamera/internal/media_device.h" diff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h index 94263b2f5db6..0cea111561dd 100644 --- a/src/v4l2/v4l2_camera.h +++ b/src/v4l2/v4l2_camera.h @@ -11,10 +11,10 @@ #include #include +#include #include #include -#include #include #include diff --git a/test/file-descriptor.cpp b/test/file-descriptor.cpp index 85b077a25c32..76badc4c5fad 100644 --- a/test/file-descriptor.cpp +++ b/test/file-descriptor.cpp @@ -11,8 +11,7 @@ #include #include -#include - +#include #include #include "test.h"