Show a patch.

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

{
    "id": 11517,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/11517/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11517/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20210308170728.2212649-2-jacopo@jmondi.org>",
    "date": "2021-03-08T17:07:26",
    "name": "[libcamera-devel,1/3] android: camera_device: Refuse unsupported templates",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c5b069617abb41c163167c5275d94b1c1e30dbd6",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11517/mbox/",
    "series": [
        {
            "id": 1770,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1770/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1770",
            "date": "2021-03-08T17:07:25",
            "name": "android: Fix capture templates for video recording",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1770/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11517/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11517/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 C7FE4BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Mar 2021 17:07:10 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B264668AA7;\n\tMon,  8 Mar 2021 18:07:09 +0100 (CET)",
            "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C58B68A9C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Mar 2021 18:07:08 +0100 (CET)",
            "from uno.homenet.telecomitalia.it\n\t(host-79-22-58-175.retail.telecomitalia.it [79.22.58.175])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id BCE1420000E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Mar 2021 17:07:07 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  8 Mar 2021 18:07:26 +0100",
        "Message-Id": "<20210308170728.2212649-2-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20210308170728.2212649-1-jacopo@jmondi.org>",
        "References": "<20210308170728.2212649-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 1/3] android: camera_device: Refuse\n\tunsupported templates",
        "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=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The current implementation of constructDefaultRequestSettings()\nreturns the same capture template for all the capture intent.\n\nAs the correctness of the generated template is verified by CTS it\nis better to return an error for unsupported capture use cases.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 7 ++-----\n 1 file changed, 2 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 6a10b09938fa..c72e0c73eb5e 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1495,14 +1495,11 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)\n \tcase CAMERA3_TEMPLATE_VIDEO_SNAPSHOT:\n \t\tcaptureIntent = ANDROID_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT;\n \t\tbreak;\n+\t/* \\todo Implement templates generation for the remaining use cases. */\n \tcase CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG:\n-\t\tcaptureIntent = ANDROID_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG;\n-\t\tbreak;\n \tcase CAMERA3_TEMPLATE_MANUAL:\n-\t\tcaptureIntent = ANDROID_CONTROL_CAPTURE_INTENT_MANUAL;\n-\t\tbreak;\n \tdefault:\n-\t\tLOG(HAL, Error) << \"Invalid template request type: \" << type;\n+\t\tLOG(HAL, Error) << \"Unsupported template request type: \" << type;\n \t\treturn nullptr;\n \t}\n \n",
    "prefixes": [
        "libcamera-devel",
        "1/3"
    ]
}