Show a patch.

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

{
    "id": 10941,
    "url": "https://patchwork.libcamera.org/api/patches/10941/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10941/",
    "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": "<20210121174633.382334-6-jacopo@jmondi.org>",
    "date": "2021-01-21T17:46:33",
    "name": "[libcamera-devel,5/5] android: camera_device: Return AE FPS range",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "3435325329cada11bcf6794fff0b770bdb2b745c",
    "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/10941/mbox/",
    "series": [
        {
            "id": 1594,
            "url": "https://patchwork.libcamera.org/api/series/1594/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1594",
            "date": "2021-01-21T17:46:28",
            "name": "android: Report frame durations",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1594/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10941/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10941/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 5CCA0C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 21 Jan 2021 17:46:47 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C4BF68217;\n\tThu, 21 Jan 2021 18:46:47 +0100 (CET)",
            "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B360668219\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 18:46:43 +0100 (CET)",
            "from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 7F3EEFF803\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 21 Jan 2021 17:46:43 +0000 (UTC)"
        ],
        "X-Originating-IP": "93.34.118.233",
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 21 Jan 2021 18:46:33 +0100",
        "Message-Id": "<20210121174633.382334-6-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.29.2",
        "In-Reply-To": "<20210121174633.382334-1-jacopo@jmondi.org>",
        "References": "<20210121174633.382334-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 5/5] android: camera_device: Return AE FPS\n\trange",
        "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 result metadata reported an arbitrary {30, 30} FPS range for the\nAE algorithm.\n\nThe actual FPS range should be returned in the Request::metadata, but\nas libcamera currently does not support that feature temporary work\naround the issue and return the FPS range requested by the camera\nframework.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 19 ++++++++++++++++---\n 1 file changed, 16 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 3560f16698c4..7fe2ae5bbe82 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1932,6 +1932,7 @@ std::unique_ptr<CameraMetadata>\n CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,\n \t\t\t\tint64_t timestamp)\n {\n+\tconst CameraMetadata &settings = descriptor->settings_;\n \tconst ControlList &metadata = descriptor->request_->metadata();\n \n \t/*\n@@ -1958,9 +1959,21 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,\n \tvalue = ANDROID_CONTROL_AE_MODE_ON;\n \tresultMetadata->addEntry(ANDROID_CONTROL_AE_MODE, &value, 1);\n \n-\tstd::vector<int32_t> aeFpsTarget = { 30, 30 };\n-\tresultMetadata->addEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE,\n-\t\t\t\t aeFpsTarget.data(), aeFpsTarget.size());\n+\tcamera_metadata_ro_entry_t entry;\n+\tbool found = settings.getEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE, &entry);\n+\tif (found) {\n+\t\t/*\n+\t\t * \\todo Retrieve the AE FPS range from the libcamera metadata.\n+\t\t * As libcamera does not support that control, as a temporary\n+\t\t * workaround return what the framework asked.\n+\t\t */\n+\t\tconst int32_t *data = entry.data.i32;\n+\t\tstd::vector<int32_t> aeFpsTarget = {\n+\t\t\tdata[0], data[1],\n+\t\t};\n+\t\tresultMetadata->addEntry(ANDROID_CONTROL_AE_TARGET_FPS_RANGE,\n+\t\t\t\t\t aeFpsTarget.data(), aeFpsTarget.size());\n+\t}\n \n \tvalue = ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE;\n \tresultMetadata->addEntry(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,\n",
    "prefixes": [
        "libcamera-devel",
        "5/5"
    ]
}