Show a patch.

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

{
    "id": 8914,
    "url": "https://patchwork.libcamera.org/api/patches/8914/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/8914/",
    "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": "<20200721220126.202065-6-kieran.bingham@ideasonboard.com>",
    "date": "2020-07-21T22:01:25",
    "name": "[libcamera-devel,RFC,5/6,HACK] : android: camera_device: Define JPEG size and quality",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": false,
    "hash": "a958597fe1e3c681987d0004f369817de69ee207",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/8914/mbox/",
    "series": [
        {
            "id": 1125,
            "url": "https://patchwork.libcamera.org/api/series/1125/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1125",
            "date": "2020-07-21T22:01:20",
            "name": "android: jpeg / software streams",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1125/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/8914/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/8914/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 ACE21C2E68\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Jul 2020 22:01:38 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7A48C609C6;\n\tWed, 22 Jul 2020 00:01:38 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2724160948\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 22 Jul 2020 00:01:33 +0200 (CEST)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 897831299;\n\tWed, 22 Jul 2020 00:01:32 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Svj7XbPq\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1595368892;\n\tbh=LCrMLvsUn9JLcZDYM8uiorYJgASmezU9eYP0VlSs79E=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Svj7XbPqhnOf7TKXA6xMAW9nzHYA97vNTbsbbho/UFqL3W4eardw0uw0ZI5lrWsdt\n\tmIGBlTg/i3URs1FrDqSTs+KAODlBt7fbyyqwroz93OBfMLW1HTFyN9Npg7NWmjyFJH\n\tnbyb7BY51pAilNPMaqCsSucU39eY1kAcRCTpkdKw=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Tue, 21 Jul 2020 23:01:25 +0100",
        "Message-Id": "<20200721220126.202065-6-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200721220126.202065-1-kieran.bingham@ideasonboard.com>",
        "References": "<20200721220126.202065-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [RFC PATCH 5/6] [HACK]: android: camera_device:\n\tDefine JPEG size and quality",
        "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": "Providing these two keys allows the camera application to capture\nwithout crashing. It does not /succeed/ but it doesn't crash.\n\nThe camera application and cros-camera-test still need exif information\nto be able to successfully capture or pass the tests.\n\nThese metadata values are hardcoded, as there is not yet an easy way to\nadd dynamic data to the request metadata.\n\nI would like to see all of the infrastructure around adding request\nmetadata support a more dynamic means of addition, which blocks easily\nadding and updating key value pairs otherwise.\n\nBut as all of that is a lot of work, here's a hack-ity work around for\nthe time being. Otherwise no form of the JPEG series will ever be\nposted.\n\nPlease don't review this. ;-)\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/android/camera_device.cpp | 14 ++++++++++++--\n 1 file changed, 12 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 7323d4e58f68..23dde1cfaf98 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -846,6 +846,8 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()\n \t\tANDROID_SENSOR_EXPOSURE_TIME,\n \t\tANDROID_STATISTICS_LENS_SHADING_MAP_MODE,\n \t\tANDROID_STATISTICS_SCENE_FLICKER,\n+\t\tANDROID_JPEG_SIZE,\n+\t\tANDROID_JPEG_QUALITY,\n \t};\n \tstaticMetadata_->addEntry(ANDROID_REQUEST_AVAILABLE_RESULT_KEYS,\n \t\t\t\t  availableResultKeys.data(),\n@@ -1444,10 +1446,10 @@ std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number\n {\n \t/*\n \t * \\todo Keep this in sync with the actual number of entries.\n-\t * Currently: 12 entries, 36 bytes\n+\t * Currently: 17 entries, 58 bytes\n \t */\n \tstd::unique_ptr<CameraMetadata> resultMetadata =\n-\t\tstd::make_unique<CameraMetadata>(15, 50);\n+\t\tstd::make_unique<CameraMetadata>(17, 58);\n \tif (!resultMetadata->isValid()) {\n \t\tLOG(HAL, Error) << \"Failed to allocate static metadata\";\n \t\treturn nullptr;\n@@ -1497,6 +1499,14 @@ std::unique_ptr<CameraMetadata> CameraDevice::getResultMetadata(int frame_number\n \tresultMetadata->addEntry(ANDROID_STATISTICS_SCENE_FLICKER,\n \t\t\t\t &scene_flicker, 1);\n \n+\tconst uint32_t jpeg_size = 1 << 13;\n+\tresultMetadata->addEntry(ANDROID_JPEG_SIZE,\n+\t\t\t\t &jpeg_size, 1);\n+\n+\tconst uint32_t jpeg_quality = 95;\n+\tresultMetadata->addEntry(ANDROID_JPEG_QUALITY,\n+\t\t\t\t &jpeg_quality, 1);\n+\n \t/*\n \t * Return the result metadata pack even is not valid: get() will return\n \t * nullptr.\n",
    "prefixes": [
        "libcamera-devel",
        "RFC",
        "5/6",
        "HACK"
    ]
}