{"id":14817,"url":"https://patchwork.libcamera.org/api/1.1/patches/14817/?format=json","web_url":"https://patchwork.libcamera.org/patch/14817/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211128235752.10836-3-laurent.pinchart@ideasonboard.com>","date":"2021-11-28T23:57:37","name":"[libcamera-devel,v3,02/17] libcamera: Move file_descriptor.h to base/","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"336279b52c0bd831d61390dc26a15e96e8f0fff1","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14817/mbox/","series":[{"id":2768,"url":"https://patchwork.libcamera.org/api/1.1/series/2768/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2768","date":"2021-11-28T23:57:35","name":"libcamera: Introduce UniqueFD","version":3,"mbox":"https://patchwork.libcamera.org/series/2768/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14817/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14817/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 43552BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 28 Nov 2021 23:58:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F2E78605B9;\n\tMon, 29 Nov 2021 00:58:27 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 34A6D6011D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Nov 2021 00:58:22 +0100 (CET)","from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BB29DE78;\n\tMon, 29 Nov 2021 00:58:21 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"svYXkQ85\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1638143902;\n\tbh=ICFnIrs6nii9YubgKFNFUw3rd4VYIG9kXwIGhth5FwE=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=svYXkQ85fvQs9u8rJ4IY2yD4YZIpgWquFvjlIa8I6OZzZwDzoirl49WZ46iaBbaam\n\tOybHb2xQv/kZYvgS26aoaqHs/Ok4qnrjMOhedLRgz7TAzLnPUE57MKPD1R9eh2q++K\n\tlphPEvtjUN+56++cu6o4+1h3/deE/sDjkAO03NBg=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 29 Nov 2021 01:57:37 +0200","Message-Id":"<20211128235752.10836-3-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","In-Reply-To":"<20211128235752.10836-1-laurent.pinchart@ideasonboard.com>","References":"<20211128235752.10836-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v3 02/17] libcamera: Move\n\tfile_descriptor.h to base/","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The FileDescriptor class is a generic helper that matches the criteria\nfor the base library. Move it there.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/{ => base}/file_descriptor.h     | 0\n include/libcamera/base/meson.build                 | 1 +\n include/libcamera/framebuffer.h                    | 3 +--\n include/libcamera/internal/ipc_pipe.h              | 3 +--\n include/libcamera/meson.build                      | 1 -\n src/ipa/raspberrypi/raspberrypi.cpp                | 2 +-\n src/libcamera/{ => base}/file_descriptor.cpp       | 4 ++--\n src/libcamera/base/meson.build                     | 1 +\n src/libcamera/meson.build                          | 1 -\n src/libcamera/pipeline/raspberrypi/dma_heaps.h     | 2 +-\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n src/libcamera/v4l2_videodevice.cpp                 | 3 +--\n src/v4l2/v4l2_camera.h                             | 2 +-\n test/file-descriptor.cpp                           | 3 +--\n 14 files changed, 13 insertions(+), 16 deletions(-)\n rename include/libcamera/{ => base}/file_descriptor.h (100%)\n rename src/libcamera/{ => base}/file_descriptor.cpp (99%)","diff":"diff --git a/include/libcamera/file_descriptor.h b/include/libcamera/base/file_descriptor.h\nsimilarity index 100%\nrename from include/libcamera/file_descriptor.h\nrename to include/libcamera/base/file_descriptor.h\ndiff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\nindex 23dd4e2023a8..f73b00917409 100644\n--- a/include/libcamera/base/meson.build\n+++ b/include/libcamera/base/meson.build\n@@ -11,6 +11,7 @@ libcamera_base_headers = files([\n     'event_dispatcher_poll.h',\n     'event_notifier.h',\n     'file.h',\n+    'file_descriptor.h',\n     'flags.h',\n     'log.h',\n     'message.h',\ndiff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h\nindex 4e710e332370..2fbea9c5be16 100644\n--- a/include/libcamera/framebuffer.h\n+++ b/include/libcamera/framebuffer.h\n@@ -13,10 +13,9 @@\n #include <vector>\n \n #include <libcamera/base/class.h>\n+#include <libcamera/base/file_descriptor.h>\n #include <libcamera/base/span.h>\n \n-#include <libcamera/file_descriptor.h>\n-\n namespace libcamera {\n \n class Request;\ndiff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h\nindex bd8824f255c2..986f8d886fa6 100644\n--- a/include/libcamera/internal/ipc_pipe.h\n+++ b/include/libcamera/internal/ipc_pipe.h\n@@ -9,10 +9,9 @@\n \n #include <vector>\n \n+#include <libcamera/base/file_descriptor.h>\n #include <libcamera/base/signal.h>\n \n-#include <libcamera/file_descriptor.h>\n-\n #include \"libcamera/internal/ipc_unixsocket.h\"\n \n namespace libcamera {\ndiff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex a8cca2a88cad..5f42977c034b 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -6,7 +6,6 @@ libcamera_public_headers = files([\n     'camera.h',\n     'camera_manager.h',\n     'controls.h',\n-    'file_descriptor.h',\n     'framebuffer.h',\n     'framebuffer_allocator.h',\n     'geometry.h',\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex fed82e223d38..c6aec09046f7 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -15,12 +15,12 @@\n \n #include <linux/bcm2835-isp.h>\n \n+#include <libcamera/base/file_descriptor.h>\n #include <libcamera/base/log.h>\n #include <libcamera/base/span.h>\n \n #include <libcamera/control_ids.h>\n #include <libcamera/controls.h>\n-#include <libcamera/file_descriptor.h>\n #include <libcamera/framebuffer.h>\n #include <libcamera/ipa/ipa_interface.h>\n #include <libcamera/ipa/ipa_module_info.h>\ndiff --git a/src/libcamera/file_descriptor.cpp b/src/libcamera/base/file_descriptor.cpp\nsimilarity index 99%\nrename from src/libcamera/file_descriptor.cpp\nrename to src/libcamera/base/file_descriptor.cpp\nindex 0409c3e1758c..f5f87c56eee8 100644\n--- a/src/libcamera/file_descriptor.cpp\n+++ b/src/libcamera/base/file_descriptor.cpp\n@@ -5,7 +5,7 @@\n  * file_descriptor.cpp - File descriptor wrapper\n  */\n \n-#include <libcamera/file_descriptor.h>\n+#include <libcamera/base/file_descriptor.h>\n \n #include <string.h>\n #include <sys/stat.h>\n@@ -16,7 +16,7 @@\n #include <libcamera/base/log.h>\n \n /**\n- * \\file file_descriptor.h\n+ * \\file base/file_descriptor.h\n  * \\brief File descriptor wrapper\n  */\n \ndiff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\nindex 05fed7acf561..d5254fda9cbf 100644\n--- a/src/libcamera/base/meson.build\n+++ b/src/libcamera/base/meson.build\n@@ -8,6 +8,7 @@ libcamera_base_sources = files([\n     'event_dispatcher_poll.cpp',\n     'event_notifier.cpp',\n     'file.cpp',\n+    'file_descriptor.cpp',\n     'flags.cpp',\n     'log.cpp',\n     'message.cpp',\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 6727a777d804..626dfca176a4 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -14,7 +14,6 @@ libcamera_sources = files([\n     'delayed_controls.cpp',\n     'device_enumerator.cpp',\n     'device_enumerator_sysfs.cpp',\n-    'file_descriptor.cpp',\n     'formats.cpp',\n     'framebuffer.cpp',\n     'framebuffer_allocator.cpp',\ndiff --git a/src/libcamera/pipeline/raspberrypi/dma_heaps.h b/src/libcamera/pipeline/raspberrypi/dma_heaps.h\nindex 38dfc242c0b9..57beaeb2e48a 100644\n--- a/src/libcamera/pipeline/raspberrypi/dma_heaps.h\n+++ b/src/libcamera/pipeline/raspberrypi/dma_heaps.h\n@@ -7,7 +7,7 @@\n \n #pragma once\n \n-#include <libcamera/file_descriptor.h>\n+#include <libcamera/base/file_descriptor.h>\n \n namespace libcamera {\n \ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex ad526a8be6a2..7526edf774a2 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -12,9 +12,10 @@\n #include <queue>\n #include <unordered_set>\n \n+#include <libcamera/base/file_descriptor.h>\n+\n #include <libcamera/camera.h>\n #include <libcamera/control_ids.h>\n-#include <libcamera/file_descriptor.h>\n #include <libcamera/formats.h>\n #include <libcamera/ipa/raspberrypi.h>\n #include <libcamera/ipa/raspberrypi_ipa_interface.h>\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 4f04212df672..0a85bcf6b3ff 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -22,11 +22,10 @@\n #include <linux/version.h>\n \n #include <libcamera/base/event_notifier.h>\n+#include <libcamera/base/file_descriptor.h>\n #include <libcamera/base/log.h>\n #include <libcamera/base/utils.h>\n \n-#include <libcamera/file_descriptor.h>\n-\n #include \"libcamera/internal/formats.h\"\n #include \"libcamera/internal/framebuffer.h\"\n #include \"libcamera/internal/media_device.h\"\ndiff --git a/src/v4l2/v4l2_camera.h b/src/v4l2/v4l2_camera.h\nindex 94263b2f5db6..0cea111561dd 100644\n--- a/src/v4l2/v4l2_camera.h\n+++ b/src/v4l2/v4l2_camera.h\n@@ -11,10 +11,10 @@\n #include <mutex>\n #include <utility>\n \n+#include <libcamera/base/file_descriptor.h>\n #include <libcamera/base/semaphore.h>\n \n #include <libcamera/camera.h>\n-#include <libcamera/file_descriptor.h>\n #include <libcamera/framebuffer.h>\n #include <libcamera/framebuffer_allocator.h>\n \ndiff --git a/test/file-descriptor.cpp b/test/file-descriptor.cpp\nindex 85b077a25c32..76badc4c5fad 100644\n--- a/test/file-descriptor.cpp\n+++ b/test/file-descriptor.cpp\n@@ -11,8 +11,7 @@\n #include <sys/types.h>\n #include <unistd.h>\n \n-#include <libcamera/file_descriptor.h>\n-\n+#include <libcamera/base/file_descriptor.h>\n #include <libcamera/base/utils.h>\n \n #include \"test.h\"\n","prefixes":["libcamera-devel","v3","02/17"]}