Show a patch.

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

{
    "id": 1917,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/1917/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/1917/",
    "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": "<20190904125427.13943-3-jacopo@jmondi.org>",
    "date": "2019-09-04T12:54:22",
    "name": "[libcamera-devel,v4,2/7] android: camera_device: Use correct sizes for static metadata",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "21e53bc8ea55b81657992557bf71a043408e3c12",
    "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/1917/mbox/",
    "series": [
        {
            "id": 479,
            "url": "https://patchwork.libcamera.org/api/1.1/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/1917/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/1917/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 BA48261926\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  4 Sep 2019 14:53:04 +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 4964724000B;\n\tWed,  4 Sep 2019 12:53:03 +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,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Date": "Wed,  4 Sep 2019 14:54:22 +0200",
        "Message-Id": "<20190904125427.13943-3-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 2/7] android: camera_device: Use\n\tcorrect sizes for static metadata",
        "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:04 -0000"
    },
    "content": "Use more opportune sizes for the static metadata pack, and for the\ndynamic metadata sizes which where wrongly set to use the ones defined\nfor the static pack.\n\nAcked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 15f57a7fe731..dee60e3d2931 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -128,11 +128,11 @@ camera_metadata_t *CameraDevice::getStaticMetadata()\n \t * more.\n \t */\n \n-\t/* \\todo Use correct sizes */\n-\t#define STATIC_ENTRY_CAP 256\n-\t#define STATIC_DATA_CAP 6688\n-\tstaticMetadata_ = allocate_camera_metadata(STATIC_ENTRY_CAP,\n-\t\t\t\t\t\t   STATIC_DATA_CAP);\n+\t/*\n+\t * \\todo Keep this in sync with the actual number of entries.\n+\t * Currently: 46 entries, 390 bytes\n+\t */\n+\tstaticMetadata_ = allocate_camera_metadata(50, 500);\n \n \t/* Color correction static metadata. */\n \tstd::vector<uint8_t> aberrationModes = {\n@@ -966,11 +966,11 @@ camera_metadata_t *CameraDevice::getResultMetadata(int frame_number,\n {\n \tint ret;\n \n-\t/* \\todo Use correct sizes */\n-\t#define RESULT_ENTRY_CAP 256\n-\t#define RESULT_DATA_CAP 6688\n-\tcamera_metadata_t *resultMetadata =\n-\t\tallocate_camera_metadata(STATIC_ENTRY_CAP, STATIC_DATA_CAP);\n+\t/*\n+\t * \\todo Keep this in sync with the actual number of entries.\n+\t * Currently: 13 entries, 36 bytes\n+\t */\n+\tcamera_metadata_t *resultMetadata = allocate_camera_metadata(15, 50);\n \n \tconst uint8_t ae_state = ANDROID_CONTROL_AE_STATE_CONVERGED;\n \tret = add_camera_metadata_entry(resultMetadata, ANDROID_CONTROL_AE_STATE,\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "2/7"
    ]
}