Show a patch.

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

{
    "id": 1920,
    "url": "https://patchwork.libcamera.org/api/patches/1920/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1920/",
    "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": "<20190904125427.13943-6-jacopo@jmondi.org>",
    "date": "2019-09-04T12:54:25",
    "name": "[libcamera-devel,v4,5/7] android: camera: Fix handling of capture intent",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "bf9a78549c6f8e51a7921b2d1d2811d447e1e19d",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/1920/mbox/",
    "series": [
        {
            "id": 479,
            "url": "https://patchwork.libcamera.org/api/series/479/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=479",
            "date": "2019-09-04T12:54:20",
            "name": "android: Rework metadata tags",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/479/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/1920/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1920/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "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 765FA60BB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  4 Sep 2019 14:53:09 +0200 (CEST)",
            "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 2A51624000A;\n\tWed,  4 Sep 2019 12:53:08 +0000 (UTC)"
        ],
        "X-Originating-IP": "2.224.242.101",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Jacopo Mondi <jacopo@jmondi.org>, kamesan@google.com, jcliang@google.com,\n\tshik@google.com, wtlee@google.com",
        "Date": "Wed,  4 Sep 2019 14:54:25 +0200",
        "Message-Id": "<20190904125427.13943-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.23.0",
        "In-Reply-To": "<20190904125427.13943-1-jacopo@jmondi.org>",
        "References": "<20190904125427.13943-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 5/7] android: camera: Fix handling of\n\tcapture intent",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.23",
        "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, 04 Sep 2019 12:53:09 -0000"
    },
    "content": "The android control.CaptureIntent metadata tag which is returned as part\nof the constructed template shall depend on the template type provided\nto the construct_default_request_settings() HAL callback.\n\nCurrently the libcamera HAL implementation fixes its value the first\ntime the template is constructed and never updates it.\n\nFix this by updating the metadata tag value using the provided template\ntype.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 969c8192c316..e96821ad523b 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -544,8 +544,18 @@ const camera_metadata_t *CameraDevice::constructDefaultRequestSettings(int type)\n \t\treturn nullptr;\n \t}\n \n-\tif (requestTemplate_)\n+\tif (requestTemplate_) {\n+\t\tcamera_metadata_entry_t captureIntentEntry;\n+\n+\t\tfind_camera_metadata_entry(requestTemplate_,\n+\t\t\tANDROID_CONTROL_CAPTURE_INTENT, &captureIntentEntry);\n+\t\tret = update_camera_metadata_entry(requestTemplate_,\n+\t\t\t\tcaptureIntentEntry.index,\n+\t\t\t\t&captureIntent, 1, &captureIntentEntry);\n+\t\tMETADATA_ASSERT(ret);\n+\n \t\treturn requestTemplate_;\n+\t}\n \n \t/* \\todo Use correct sizes */\n \t#define REQUEST_TEMPLATE_ENTRIES\t  30\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "5/7"
    ]
}