{"id":12705,"url":"https://patchwork.libcamera.org/api/1.1/patches/12705/?format=json","web_url":"https://patchwork.libcamera.org/patch/12705/","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":"<20210625013539.625803-14-kieran.bingham@ideasonboard.com>","date":"2021-06-25T01:35:36","name":"[libcamera-devel,13/16] libcamera/base: Move span to base library","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"61096531a7b060bb8140f01e7ea75e6fe674afbf","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/12705/mbox/","series":[{"id":2173,"url":"https://patchwork.libcamera.org/api/1.1/series/2173/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2173","date":"2021-06-25T01:35:23","name":"libcamera-base: A new split on libcamera","version":1,"mbox":"https://patchwork.libcamera.org/series/2173/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12705/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12705/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 9C1F4C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 01:35:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 33229684D9;\n\tFri, 25 Jun 2021 03:35:58 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E12AD684E1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 03:35:48 +0200 (CEST)","from Monstersaurus.local\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6908B501;\n\tFri, 25 Jun 2021 03:35:48 +0200 (CEST)"],"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=\"jX1Q/kBJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624584948;\n\tbh=CdHc6GNycnTYQ4HZ4mSmvt80jfXl+YeEw74z0RMD9Ro=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=jX1Q/kBJa47xQrfUryaUFnH8T04+ikw43l+o/9MmguSJxiMju2KdeBaAWba3HyJqB\n\tcW33M0gJgQRTGA1lIi3qUp0bbrf95MS9zzqD+MDrFn6Ug0umM7ZPUYbzHrWx86Le14\n\tkUnFnC95xi2cBMFYqyVTpoqNvwX7k5ZL8gGwfUN0=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Fri, 25 Jun 2021 02:35:36 +0100","Message-Id":"<20210625013539.625803-14-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.30.2","In-Reply-To":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 13/16] libcamera/base: Move span to base\n\tlibrary","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":"Move span, and adjust the Doxygen exlusion as well.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n Documentation/Doxyfile.in                       | 2 +-\n include/libcamera/base/file.h                   | 3 +--\n include/libcamera/base/meson.build              | 1 +\n include/libcamera/{ => base}/span.h             | 0\n include/libcamera/controls.h                    | 2 +-\n include/libcamera/internal/buffer.h             | 2 +-\n include/libcamera/internal/byte_stream_buffer.h | 3 +--\n include/libcamera/internal/pub_key.h            | 2 +-\n include/libcamera/internal/v4l2_device.h        | 2 +-\n include/libcamera/meson.build                   | 1 -\n src/android/camera_buffer.h                     | 3 +--\n src/android/jpeg/encoder.h                      | 3 ++-\n src/android/jpeg/exif.h                         | 3 ++-\n src/ipa/libipa/histogram.h                      | 2 +-\n src/ipa/raspberrypi/cam_helper.hpp              | 3 +--\n src/ipa/raspberrypi/md_parser.hpp               | 2 +-\n src/ipa/raspberrypi/raspberrypi.cpp             | 2 +-\n src/libcamera/control_serializer.cpp            | 2 +-\n src/libcamera/ipa_module.cpp                    | 3 +--\n src/libcamera/pipeline/rkisp1/rkisp1_path.h     | 2 +-\n test/span.cpp                                   | 2 +-\n test/utils.cpp                                  | 6 +++---\n 22 files changed, 24 insertions(+), 27 deletions(-)\n rename include/libcamera/{ => base}/span.h (100%)","diff":"diff --git a/Documentation/Doxyfile.in b/Documentation/Doxyfile.in\nindex 8305f56af7a8..a79d37706faf 100644\n--- a/Documentation/Doxyfile.in\n+++ b/Documentation/Doxyfile.in\n@@ -834,7 +834,7 @@ RECURSIVE              = YES\n # Note that relative paths are relative to the directory from which doxygen is\n # run.\n \n-EXCLUDE                = @TOP_SRCDIR@/include/libcamera/span.h \\\n+EXCLUDE                = @TOP_SRCDIR@/include/libcamera/base/span.h \\\n \t\t\t @TOP_SRCDIR@/include/libcamera/internal/device_enumerator_sysfs.h \\\n \t\t\t @TOP_SRCDIR@/include/libcamera/internal/device_enumerator_udev.h \\\n \t\t\t @TOP_SRCDIR@/include/libcamera/internal/ipc_pipe_unixsocket.h \\\ndiff --git a/include/libcamera/base/file.h b/include/libcamera/base/file.h\nindex cecbb254591f..c3c7ca6013a8 100644\n--- a/include/libcamera/base/file.h\n+++ b/include/libcamera/base/file.h\n@@ -13,8 +13,7 @@\n \n #include <libcamera/base/class.h>\n #include <libcamera/base/private.h>\n-\n-#include <libcamera/span.h>\n+#include <libcamera/base/span.h>\n \n namespace libcamera {\n \ndiff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\nindex aaac324d7149..7c499b558fb0 100644\n--- a/include/libcamera/base/meson.build\n+++ b/include/libcamera/base/meson.build\n@@ -15,6 +15,7 @@ libcamera_base_headers = files([\n     'private.h',\n     'semaphore.h',\n     'signal.h',\n+    'span.h',\n     'thread.h',\n     'timer.h',\n     'utils.h',\ndiff --git a/include/libcamera/span.h b/include/libcamera/base/span.h\nsimilarity index 100%\nrename from include/libcamera/span.h\nrename to include/libcamera/base/span.h\ndiff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\nindex f62b6cf055d6..1bc958a43b22 100644\n--- a/include/libcamera/controls.h\n+++ b/include/libcamera/controls.h\n@@ -15,9 +15,9 @@\n #include <vector>\n \n #include <libcamera/base/class.h>\n+#include <libcamera/base/span.h>\n \n #include <libcamera/geometry.h>\n-#include <libcamera/span.h>\n \n namespace libcamera {\n \ndiff --git a/include/libcamera/internal/buffer.h b/include/libcamera/internal/buffer.h\nindex 91dd24969385..beae0cb98544 100644\n--- a/include/libcamera/internal/buffer.h\n+++ b/include/libcamera/internal/buffer.h\n@@ -11,9 +11,9 @@\n #include <vector>\n \n #include <libcamera/base/class.h>\n+#include <libcamera/base/span.h>\n \n #include <libcamera/buffer.h>\n-#include <libcamera/span.h>\n \n namespace libcamera {\n \ndiff --git a/include/libcamera/internal/byte_stream_buffer.h b/include/libcamera/internal/byte_stream_buffer.h\nindex 7eefb1a71f07..d0f0df5ee87b 100644\n--- a/include/libcamera/internal/byte_stream_buffer.h\n+++ b/include/libcamera/internal/byte_stream_buffer.h\n@@ -12,8 +12,7 @@\n #include <type_traits>\n \n #include <libcamera/base/class.h>\n-\n-#include <libcamera/span.h>\n+#include <libcamera/base/span.h>\n \n namespace libcamera {\n \ndiff --git a/include/libcamera/internal/pub_key.h b/include/libcamera/internal/pub_key.h\nindex f5f988b58f74..9261c9c2a0ee 100644\n--- a/include/libcamera/internal/pub_key.h\n+++ b/include/libcamera/internal/pub_key.h\n@@ -9,7 +9,7 @@\n \n #include <stdint.h>\n \n-#include <libcamera/span.h>\n+#include <libcamera/base/span.h>\n \n #if HAVE_GNUTLS\n struct gnutls_pubkey_st;\ndiff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\nindex 1edd664a9aef..77b835b3cb80 100644\n--- a/include/libcamera/internal/v4l2_device.h\n+++ b/include/libcamera/internal/v4l2_device.h\n@@ -15,9 +15,9 @@\n \n #include <libcamera/base/log.h>\n #include <libcamera/base/signal.h>\n+#include <libcamera/base/span.h>\n \n #include <libcamera/controls.h>\n-#include <libcamera/span.h>\n \n namespace libcamera {\n \ndiff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\nindex d08bb3096aff..9a120d13346e 100644\n--- a/include/libcamera/meson.build\n+++ b/include/libcamera/meson.build\n@@ -12,7 +12,6 @@ libcamera_public_headers = files([\n     'logging.h',\n     'pixel_format.h',\n     'request.h',\n-    'span.h',\n     'stream.h',\n     'transform.h',\n ])\ndiff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h\nindex e850c4e36668..2617ff6b11a1 100644\n--- a/src/android/camera_buffer.h\n+++ b/src/android/camera_buffer.h\n@@ -10,8 +10,7 @@\n #include <hardware/camera3.h>\n \n #include <libcamera/base/class.h>\n-\n-#include <libcamera/span.h>\n+#include <libcamera/base/span.h>\n \n class CameraBuffer final : public libcamera::Extensible\n {\ndiff --git a/src/android/jpeg/encoder.h b/src/android/jpeg/encoder.h\nindex 8d449369869f..28e7f92a3ecb 100644\n--- a/src/android/jpeg/encoder.h\n+++ b/src/android/jpeg/encoder.h\n@@ -7,8 +7,9 @@\n #ifndef __ANDROID_JPEG_ENCODER_H__\n #define __ANDROID_JPEG_ENCODER_H__\n \n+#include <libcamera/base/span.h>\n+\n #include <libcamera/buffer.h>\n-#include <libcamera/span.h>\n #include <libcamera/stream.h>\n \n class Encoder\ndiff --git a/src/android/jpeg/exif.h b/src/android/jpeg/exif.h\nindex 8aa1b123a737..23b0e0974459 100644\n--- a/src/android/jpeg/exif.h\n+++ b/src/android/jpeg/exif.h\n@@ -13,8 +13,9 @@\n \n #include <libexif/exif-data.h>\n \n+#include <libcamera/base/span.h>\n+\n #include <libcamera/geometry.h>\n-#include <libcamera/span.h>\n \n class Exif\n {\ndiff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h\nindex e06f1884395e..c2761cb29e7a 100644\n--- a/src/ipa/libipa/histogram.h\n+++ b/src/ipa/libipa/histogram.h\n@@ -13,7 +13,7 @@\n \n #include <vector>\n \n-#include <libcamera/span.h>\n+#include <libcamera/base/span.h>\n \n namespace libcamera {\n \ndiff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp\nindex a66648197140..b19c95f67453 100644\n--- a/src/ipa/raspberrypi/cam_helper.hpp\n+++ b/src/ipa/raspberrypi/cam_helper.hpp\n@@ -8,8 +8,7 @@\n \n #include <string>\n \n-#include <libcamera/span.h>\n-\n+#include <libcamera/base/span.h>\n #include <libcamera/base/utils.h>\n \n #include \"camera_mode.h\"\ndiff --git a/src/ipa/raspberrypi/md_parser.hpp b/src/ipa/raspberrypi/md_parser.hpp\nindex 65aab02d51b6..8497216f8db7 100644\n--- a/src/ipa/raspberrypi/md_parser.hpp\n+++ b/src/ipa/raspberrypi/md_parser.hpp\n@@ -8,7 +8,7 @@\n \n #include <stdint.h>\n \n-#include <libcamera/span.h>\n+#include <libcamera/base/span.h>\n \n /*\n  * Camera metadata parser class. Usage as shown below.\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex a3f014495e80..4d09a84f6532 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -16,6 +16,7 @@\n #include <linux/bcm2835-isp.h>\n \n #include <libcamera/base/log.h>\n+#include <libcamera/base/span.h>\n \n #include <libcamera/buffer.h>\n #include <libcamera/control_ids.h>\n@@ -26,7 +27,6 @@\n #include <libcamera/ipa/raspberrypi.h>\n #include <libcamera/ipa/raspberrypi_ipa_interface.h>\n #include <libcamera/request.h>\n-#include <libcamera/span.h>\n \n #include \"libcamera/internal/buffer.h\"\n \ndiff --git a/src/libcamera/control_serializer.cpp b/src/libcamera/control_serializer.cpp\nindex dd5a26083747..300466285a57 100644\n--- a/src/libcamera/control_serializer.cpp\n+++ b/src/libcamera/control_serializer.cpp\n@@ -12,11 +12,11 @@\n #include <vector>\n \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/ipa/ipa_controls.h>\n-#include <libcamera/span.h>\n \n #include \"libcamera/internal/byte_stream_buffer.h\"\n \ndiff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\nindex 984c1fed9bdb..adfb8d407697 100644\n--- a/src/libcamera/ipa_module.cpp\n+++ b/src/libcamera/ipa_module.cpp\n@@ -21,10 +21,9 @@\n #include <sys/types.h>\n #include <unistd.h>\n \n-#include <libcamera/span.h>\n-\n #include <libcamera/base/file.h>\n #include <libcamera/base/log.h>\n+#include <libcamera/base/span.h>\n #include <libcamera/base/utils.h>\n \n #include \"libcamera/internal/pipeline_handler.h\"\ndiff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.h b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\nindex c185ac3992dd..91757600ccdc 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.h\n@@ -11,11 +11,11 @@\n #include <vector>\n \n #include <libcamera/base/signal.h>\n+#include <libcamera/base/span.h>\n \n #include <libcamera/camera.h>\n #include <libcamera/geometry.h>\n #include <libcamera/pixel_format.h>\n-#include <libcamera/span.h>\n \n #include \"libcamera/internal/media_object.h\"\n #include \"libcamera/internal/v4l2_videodevice.h\"\ndiff --git a/test/span.cpp b/test/span.cpp\nindex ca037c8f02fa..abf3a5d681bf 100644\n--- a/test/span.cpp\n+++ b/test/span.cpp\n@@ -9,7 +9,7 @@\n  * Include first to ensure the header is self-contained, as there's no span.cpp\n  * in libcamera.\n  */\n-#include <libcamera/span.h>\n+#include <libcamera/base/span.h>\n \n #include <array>\n #include <iostream>\ndiff --git a/test/utils.cpp b/test/utils.cpp\nindex 9cd2cd070cb9..d7f810e95e7a 100644\n--- a/test/utils.cpp\n+++ b/test/utils.cpp\n@@ -11,11 +11,11 @@\n #include <string>\n #include <vector>\n \n-#include <libcamera/geometry.h>\n-#include <libcamera/span.h>\n-\n+#include <libcamera/base/span.h>\n #include <libcamera/base/utils.h>\n \n+#include <libcamera/geometry.h>\n+\n #include \"test.h\"\n \n using namespace std;\n","prefixes":["libcamera-devel","13/16"]}