Patch Detail
Show a patch.
GET /api/1.1/patches/9797/?format=api
{ "id": 9797, "url": "https://patchwork.libcamera.org/api/1.1/patches/9797/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9797/", "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": "<20200924183642.7674-3-email@uajain.com>", "date": "2020-09-24T18:36:42", "name": "[libcamera-devel,v2,2/2] android: jpeg: exif: Set timezone information", "commit_ref": "de20d00455fbd87815a0946eaf957a9368e72a6a", "pull_url": null, "state": "accepted", "archived": false, "hash": "cfe2c045df0e5e2587171b81121e4c7bfeb5c6c2", "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/9797/mbox/", "series": [ { "id": 1324, "url": "https://patchwork.libcamera.org/api/1.1/series/1324/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1324", "date": "2020-09-24T18:36:40", "name": "android: jpeg: exif: Set timezone information", "version": 2, "mbox": "https://patchwork.libcamera.org/series/1324/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9797/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9797/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 6EA9EC3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Sep 2020 18:37:02 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3AF2F63017;\n\tThu, 24 Sep 2020 20:37:02 +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 237E263017\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Sep 2020 20:37:01 +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=\"BgRgXaPj\"; 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=1600972620; bh=p6IGTgqQJYCq195rt+k/VmYPhmpuFyEdXEo1tSaemnY=;\n\th=From:To:Cc:Subject:In-Reply-To:References;\n\tb=BgRgXaPjqua+5naGIiAZG91UVD2vgQ1xsQYRRYpuNHw8iVeFYnkqU6aGYK7F8eh3i\n\tqPXq4IgExSIV06Opy2qvne1hK1KWxSQQBBnVnm+03AjH5jXsWKh8CU6Jz2vo8FQ9ho\n\tZM/80riztecAQF3cXnwdSW4b2YiNgkhGkBDJ4a6pZbBCs2/GdLrK45uUsTVqJvHXo0\n\t+SQdoFTrUXEQNgQ6HeX1VIvRjD+8z8Lnm5ugEYH8nxeDipErcJ/X8frRY9QYGMbSIG\n\tpncVgrrHG7PKI2lzn74O8AbGu3kN19FTqdnre0QUBI8M4ScuP5InHDsYpfUt60ZeUf\n\tFwkSq44NXU4Jw==", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 25 Sep 2020 00:06:42 +0530", "Message-Id": "<20200924183642.7674-3-email@uajain.com>", "In-Reply-To": "<20200924183642.7674-1-email@uajain.com>", "References": "<20200924183642.7674-1-email@uajain.com>", "Mime-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v2 2/2] 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 a5674b3..32cf897 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 class _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@@ -197,6 +210,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", "v2", "2/2" ] }