Show a patch.

GET /api/patches/2437/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2437,
    "url": "https://patchwork.libcamera.org/api/patches/2437/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2437/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20191218145001.22283-3-jacopo@jmondi.org>",
    "date": "2019-12-18T14:49:56",
    "name": "[libcamera-devel,RFC,2/7] libcamera: sensor: Add OV5670 camera sensor",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "e92f0b8901c495806e4cb2b277e842e19723ca27",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": {
        "id": 15,
        "url": "https://patchwork.libcamera.org/api/users/15/?format=api",
        "username": "jmondi",
        "first_name": "Jacopo",
        "last_name": "Mondi",
        "email": "jacopo@jmondi.org"
    },
    "mbox": "https://patchwork.libcamera.org/patch/2437/mbox/",
    "series": [
        {
            "id": 591,
            "url": "https://patchwork.libcamera.org/api/series/591/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=591",
            "date": "2019-12-18T14:49:54",
            "name": "Define and register 'sensor' and 'lens' properties",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/591/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2437/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2437/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net\n\t[217.70.183.195])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 48677605D2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Dec 2019 15:47:53 +0100 (CET)",
            "from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay3-d.mail.gandi.net (Postfix) with ESMTPSA id CC2EA60003;\n\tWed, 18 Dec 2019 14:47:52 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.34.114.233",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed, 18 Dec 2019 15:49:56 +0100",
        "Message-Id": "<20191218145001.22283-3-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.24.0",
        "In-Reply-To": "<20191218145001.22283-1-jacopo@jmondi.org>",
        "References": "<20191218145001.22283-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [RFC 2/7] libcamera: sensor: Add OV5670 camera\n\tsensor",
        "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>",
        "X-List-Received-Date": "Wed, 18 Dec 2019 14:47:54 -0000"
    },
    "content": "Add OV5670CameraSensor class to handle Omnivision OV5670 image sensor\nand add support for it in the CameraSensorFactory::create() method.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/camera_sensor.cpp  |  6 ++++++\n src/libcamera/meson.build        |  1 +\n src/libcamera/sensor/meson.build |  3 +++\n src/libcamera/sensor/ov5670.cpp  | 18 ++++++++++++++++++\n src/libcamera/sensor/ov5670.h    | 23 +++++++++++++++++++++++\n 5 files changed, 51 insertions(+)\n create mode 100644 src/libcamera/sensor/meson.build\n create mode 100644 src/libcamera/sensor/ov5670.cpp\n create mode 100644 src/libcamera/sensor/ov5670.h",
    "diff": "diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\nindex ac8878fe336e..d1c9c9bcd58f 100644\n--- a/src/libcamera/camera_sensor.cpp\n+++ b/src/libcamera/camera_sensor.cpp\n@@ -6,12 +6,14 @@\n  */\n \n #include \"camera_sensor.h\"\n+#include \"sensor/ov5670.h\"\n \n #include <algorithm>\n #include <float.h>\n #include <iomanip>\n #include <limits.h>\n #include <math.h>\n+#include <string>\n \n #include <libcamera/property_ids.h>\n \n@@ -47,6 +49,10 @@ LOG_DEFINE_CATEGORY(CameraSensor);\n  */\n CameraSensor *CameraSensorFactory::create(const MediaEntity *entity)\n {\n+\tconst std::string &sensorName = entity->name();\n+\tif (sensorName == \"ov5670\")\n+\t\treturn new OV5670CameraSensor(entity);\n+\n \treturn new CameraSensor(entity);\n }\n \ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 14aff6e5fc13..d8d7ac248ae3 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -55,6 +55,7 @@ includes = [\n \n subdir('pipeline')\n subdir('proxy')\n+subdir('sensor')\n \n libudev = dependency('libudev', required : false)\n \ndiff --git a/src/libcamera/sensor/meson.build b/src/libcamera/sensor/meson.build\nnew file mode 100644\nindex 000000000000..7af70370cf5c\n--- /dev/null\n+++ b/src/libcamera/sensor/meson.build\n@@ -0,0 +1,3 @@\n+libcamera_sources += files([\n+    'ov5670.cpp',\n+])\ndiff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp\nnew file mode 100644\nindex 000000000000..ca9f3c1d544f\n--- /dev/null\n+++ b/src/libcamera/sensor/ov5670.cpp\n@@ -0,0 +1,18 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * ov5670.cpp - OV5670 camera sensor\n+ */\n+\n+#include \"ov5670.h\"\n+#include \"camera_sensor.h\"\n+\n+namespace libcamera {\n+\n+OV5670CameraSensor::OV5670CameraSensor(const MediaEntity *entity)\n+\t: CameraSensor(entity)\n+{\n+}\n+\n+}; /* namespace libcamera */\ndiff --git a/src/libcamera/sensor/ov5670.h b/src/libcamera/sensor/ov5670.h\nnew file mode 100644\nindex 000000000000..f84239c8411d\n--- /dev/null\n+++ b/src/libcamera/sensor/ov5670.h\n@@ -0,0 +1,23 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2019, Google Inc.\n+ *\n+ * ov5670.h - OV5670 camera sensor\n+ */\n+#ifndef __LIBCAMERA_OV5670_H__\n+#define __LIBCAMERA_OV5670_H__\n+\n+#include \"camera_sensor.h\"\n+\n+namespace libcamera {\n+\n+class OV5670CameraSensor final : public CameraSensor\n+{\n+private:\n+\tOV5670CameraSensor(const MediaEntity *entity);\n+\tfriend CameraSensorFactory;\n+};\n+\n+}; /* namespace libcamera */\n+\n+#endif /* __LIBCAMERA_OV5670_H__ */\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "2/7"
    ]
}