Show a patch.

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

{
    "id": 9779,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/9779/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9779/",
    "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": "<20200924090631.18473-1-email@uajain.com>",
    "date": "2020-09-24T09:06:31",
    "name": "[libcamera-devel] android: jpeg: exif: Set timezone information",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1e68dd33410b643a1917b70d0b80badd42881045",
    "submitter": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/people/1/?format=api",
        "name": "Umang Jain",
        "email": "email@uajain.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9779/mbox/",
    "series": [
        {
            "id": 1317,
            "url": "https://patchwork.libcamera.org/api/1.1/series/1317/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1317",
            "date": "2020-09-24T09:06:31",
            "name": "[libcamera-devel] android: jpeg: exif: Set timezone information",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1317/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9779/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9779/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 BCDEDC3B5C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Sep 2020 09:06:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6AA9762FDE;\n\tThu, 24 Sep 2020 11:06:39 +0200 (CEST)",
            "from mail.uajain.com (static.126.159.217.95.clients.your-server.de\n\t[95.217.159.126])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A6F1D60362\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Sep 2020 11:06:37 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"h7C329b3\"; dkim-atps=neutral",
        "From": "Umang Jain <email@uajain.com>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail;\n\tt=1600938397; bh=v3/00sM72yfMrjWxZ7NM1fmCDiJmsO6fMfzTCF/6bkI=;\n\th=From:To:Cc:Subject;\n\tb=h7C329b3WDpIvwUP03kwdNvNvLcKjfTCfHUVVw5wfjlOMvmHknzCjjJoHJqEB7RwB\n\tdG25jlQNlDJqvnDS0jJHyMY//2VE+ZXzM30TJu1jJVKmUHD2Xk7MWjTcP0Efu1vf+3\n\tIsE06Y4/eWMHug39z0KjE6NVOWQRdtHPu3iHsGPoktawZLMZS931JzwDxtutTpBelX\n\tllyKk+bOIu61KPd2QFUo6saWJXFpeAc2SrkJAX+0tNCmQ7tivn328V3QUBXIo75MU8\n\tN46YJq4s8OcNp+i4hBDpImSI8KlIR8sFYNk+tHsXLtPZcEHi2mzD1uBEepNEuOMR9C\n\tzu96nS2iEmq0A==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 24 Sep 2020 14:36:31 +0530",
        "Message-Id": "<20200924090631.18473-1-email@uajain.com>",
        "Mime-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH] android: jpeg: exif: Set timezone\n\tinformation",
        "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 EXIF specification defines three timezone related tags namely,\nOffsetTime, OffsetTimeOriginal and OffsetTimeDigitized. However,\nthese are not supported by libexif (as of v0.6.21) hence, carry\nthe tags' positional values in our implementation until we get\nthis support from libexif itself.\n\nSince these tags were introduced in EXIF specification v2.31, set\nthe exif version number explicitly too.\n\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n src/android/jpeg/exif.cpp | 29 +++++++++++++++++++++++++++++\n 1 file changed, 29 insertions(+)",
    "diff": "diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\nindex c0dbfcc..df38765 100644\n--- a/src/android/jpeg/exif.cpp\n+++ b/src/android/jpeg/exif.cpp\n@@ -13,6 +13,16 @@ using namespace libcamera;\n \n LOG_DEFINE_CATEGORY(EXIF)\n \n+/*\n+ * List of EXIF tags that we set directly because they are not supported\n+ * by libexif version 0.6.21.\n+ */\n+enum _ExifTag {\n+\tOFFSET_TIME              = 0x9010,\n+\tOFFSET_TIME_ORIGINAL     = 0x9011,\n+\tOFFSET_TIME_DIGITIZED    = 0x9012,\n+};\n+\n /*\n  * The Exif class should be instantiated and specific properties set\n  * through the exposed public API.\n@@ -51,6 +61,9 @@ Exif::Exif()\n \t */\n \texif_data_set_byte_order(data_, EXIF_BYTE_ORDER_INTEL);\n \n+\tsetString(EXIF_IFD_EXIF, EXIF_TAG_EXIF_VERSION,\n+\t\t  EXIF_FORMAT_UNDEFINED, \"0231\");\n+\n \t/* Create the mandatory EXIF fields with default data. */\n \texif_data_fix(data_);\n }\n@@ -196,6 +209,22 @@ void Exif::setTimestamp(time_t timestamp)\n \tsetString(EXIF_IFD_0, EXIF_TAG_DATE_TIME, EXIF_FORMAT_ASCII, ts);\n \tsetString(EXIF_IFD_EXIF, EXIF_TAG_DATE_TIME_ORIGINAL, EXIF_FORMAT_ASCII, ts);\n \tsetString(EXIF_IFD_EXIF, EXIF_TAG_DATE_TIME_DIGITIZED, EXIF_FORMAT_ASCII, ts);\n+\n+\t/* Query and set timezone information if available. */\n+\tint r = strftime(str, sizeof(str), \"%z\", &tm);\n+\tif (r > 0) {\n+\t\tstd::string tz(str);\n+\t\ttz.insert(3, 1, ':');\n+\t\tsetString(EXIF_IFD_EXIF,\n+\t\t\t  static_cast<ExifTag>(_ExifTag::OFFSET_TIME),\n+\t\t\t  EXIF_FORMAT_ASCII, tz);\n+\t\tsetString(EXIF_IFD_EXIF,\n+\t\t\t  static_cast<ExifTag>(_ExifTag::OFFSET_TIME_ORIGINAL),\n+\t\t\t  EXIF_FORMAT_ASCII, tz);\n+\t\tsetString(EXIF_IFD_EXIF,\n+\t\t\t  static_cast<ExifTag>(_ExifTag::OFFSET_TIME_DIGITIZED),\n+\t\t\t  EXIF_FORMAT_ASCII, tz);\n+\t}\n }\n \n void Exif::setOrientation(int orientation)\n",
    "prefixes": [
        "libcamera-devel"
    ]
}