Show a patch.

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

{
    "id": 10754,
    "url": "https://patchwork.libcamera.org/api/patches/10754/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10754/",
    "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": "<20201228164003.53051-5-jacopo@jmondi.org>",
    "date": "2020-12-28T16:40:02",
    "name": "[libcamera-devel,v2,4/5] android: camera_device: Report ColorFilterArrangement",
    "commit_ref": "cb35ed23f3c7d3b03c4a6037f50934565ed8f030",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d561d0c58b79c96bf8efe47bda9c69dfee1f2119",
    "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/10754/mbox/",
    "series": [
        {
            "id": 1556,
            "url": "https://patchwork.libcamera.org/api/series/1556/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1556",
            "date": "2020-12-28T16:39:58",
            "name": "android: support ColorFilterArrangement property",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1556/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10754/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10754/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 7B25FC0F1A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Dec 2020 16:39:59 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 54A79619AF;\n\tMon, 28 Dec 2020 17:39:59 +0100 (CET)",
            "from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F2ED8619AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Dec 2020 17:39:55 +0100 (CET)",
            "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 528F624000D;\n\tMon, 28 Dec 2020 16:39:55 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 28 Dec 2020 17:40:02 +0100",
        "Message-Id": "<20201228164003.53051-5-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.29.2",
        "In-Reply-To": "<20201228164003.53051-1-jacopo@jmondi.org>",
        "References": "<20201228164003.53051-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 4/5] android: camera_device: Report\n\tColorFilterArrangement",
        "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>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Conditionally report the ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT\nproperty inspecting the draft property reported by the libcamera Camera.\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 9 ++++++---\n 1 file changed, 6 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex b4618a680f41..bbf016c323a7 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -897,9 +897,12 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_SENSITIVITY_RANGE,\n \t\t\t\t  &sensitivityRange, 2);\n \n-\tuint16_t filterArr = ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG;\n-\tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,\n-\t\t\t\t  &filterArr, 1);\n+\t/* Report the color filter arrangement if the camera reports it. */\n+\tif (properties.contains(properties::draft::ColorFilterArrangement)) {\n+\t\tuint8_t filterArr = properties.get(properties::draft::ColorFilterArrangement);\n+\t\tstaticMetadata_->addEntry(ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,\n+\t\t\t\t\t  &filterArr, 1);\n+\t}\n \n \tint64_t exposureTimeRange[] = {\n \t\t100000, 200000000,\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "4/5"
    ]
}