Patch Detail
Show a patch.
GET /api/1.1/patches/3883/?format=api
{ "id": 3883, "url": "https://patchwork.libcamera.org/api/1.1/patches/3883/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3883/", "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": "<20200529140433.GA18070@kaaira-HP-Pavilion-Notebook>", "date": "2020-05-29T14:04:33", "name": "[libcamera-devel] libcamera: stream_option: use fourcc values to set cam/qcam formats", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f4d63924c7d3a13b6020d0e5125fd9e86ed8dd6a", "submitter": { "id": 39, "url": "https://patchwork.libcamera.org/api/1.1/people/39/?format=api", "name": "Kaaira Gupta", "email": "kgupta@es.iitr.ac.in" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3883/mbox/", "series": [ { "id": 939, "url": "https://patchwork.libcamera.org/api/1.1/series/939/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=939", "date": "2020-05-29T14:04:33", "name": "[libcamera-devel] libcamera: stream_option: use fourcc values to set cam/qcam formats", "version": 1, "mbox": "https://patchwork.libcamera.org/series/939/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3883/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3883/checks/", "tags": {}, "headers": { "Return-Path": "<kgupta@es.iitr.ac.in>", "Received": [ "from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com\n\t[IPv6:2607:f8b0:4864:20::52e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 58621603CF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 29 May 2020 16:04:42 +0200 (CEST)", "by mail-pg1-x52e.google.com with SMTP id d10so1531673pgn.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 29 May 2020 07:04:41 -0700 (PDT)", "from kaaira-HP-Pavilion-Notebook ([103.113.213.174])\n\tby smtp.gmail.com with ESMTPSA id\n\th3sm8472252pjk.10.2020.05.29.07.04.37\n\t(version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256);\n\tFri, 29 May 2020 07:04:39 -0700 (PDT)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=es-iitr-ac-in.20150623.gappssmtp.com\n\theader.i=@es-iitr-ac-in.20150623.gappssmtp.com header.b=\"n5LBfQyz\"; \n\tdkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=es-iitr-ac-in.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:subject:message-id:mime-version:content-disposition\n\t:user-agent; bh=YRshYS4DmvHOFGEltynVu1eHk1TgfmvVy+PGEeAFZfQ=;\n\tb=n5LBfQyzfW+Jrqq49veJLmeOTshLmrKAy1KH6rnxckYiAMQ0WsAl75Z1bhCfgcRWVt\n\tAn5MxgwtU5s0TxVKaSKjNffKnF9VPV6H9ZCRY7O+BTl81JtLlEQP7G5rjJdW9bvZ5y+I\n\tVLCqK6R097OFPPhJPYtgIyKfWe/57GxvRVpcbHgkRkZ6SKlWYl8y9CA1i4cSMKO093zy\n\tfFnZzTABPGrrcK/AhAZ0zGjcRRA1kpjig+WRQriya92EtI5eETdl9zlVWMB+caER8skL\n\tc9q+T/lCop4070irskOSDV5tokSB6AzycfqY8zVyvHUF4YsLxer0Urk4fQn76SxpDlL5\n\t3/MA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:subject:message-id:mime-version\n\t:content-disposition:user-agent;\n\tbh=YRshYS4DmvHOFGEltynVu1eHk1TgfmvVy+PGEeAFZfQ=;\n\tb=BmmLywEEmyoD40SW7J6u8rVF6xSP49ZTAyeWfHRUjBZkPrzdosF+6wTy7RWlGTuXMX\n\tDJitG0Ic+hst/AILLkewR5VmJnluu5vNZyRe2zDNbMase2tbaDUKubmv5716VDYlrpwx\n\tanRLzZmNH9vCRh46fFS48n4n3gPzpq0IPEYhIbt7XPk7bhT5Yf9ndIeptZkB+Z/g+t4n\n\tq7vkslMuIHqLNAwLSQCk2qqq+vBwrZoyJutRf/I6Rb7eqv6VBurX75f1ZUOupJd/Q1Vs\n\tvpPCYD4Rq9MS6ArqLbcUDLlnkd7Plil7YQYjOD0bswrkaDXPTByEUaMChpinsUL7T8rZ\n\tp7uw==", "X-Gm-Message-State": "AOAM532H4qml31ncx4QD0SqwHF4Pt3s15TUO/b7U9nPMonLi4QABWkJm\n\t/KXNLRjRCEVOIvbRUN/ivMCCFwbWkdr1qA==", "X-Google-Smtp-Source": "ABdhPJzuBTz+dCEH+G/FfL3ZmerVcCEgXOVGt2hfU7cdvmHigFVLy7EcGU1tXSkF2vOeyYiksdfHQQ==", "X-Received": "by 2002:a63:b0f:: with SMTP id 15mr8269494pgl.6.1590761080037;\n\tFri, 29 May 2020 07:04:40 -0700 (PDT)", "Date": "Fri, 29 May 2020 19:34:33 +0530", "From": "Kaaira Gupta <kgupta@es.iitr.ac.in>", "To": "libcamera-devel@lists.libcamera.org,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>", "Message-ID": "<20200529140433.GA18070@kaaira-HP-Pavilion-Notebook>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=us-ascii", "Content-Disposition": "inline", "User-Agent": "Mutt/1.9.4 (2018-02-28)", "Subject": "[libcamera-devel] [PATCH] libcamera: stream_option: use fourcc\n\tvalues to set cam/qcam formats", "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>", "X-List-Received-Date": "Fri, 29 May 2020 14:04:43 -0000" }, "content": "Replace hex input for pixelformats with their fourcc values,\nin cam and qcam.\n\nSigned-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in>\n---\n src/cam/stream_options.cpp | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)", "diff": "diff --git a/src/cam/stream_options.cpp b/src/cam/stream_options.cpp\nindex bd12c8f..9f9536e 100644\n--- a/src/cam/stream_options.cpp\n+++ b/src/cam/stream_options.cpp\n@@ -6,6 +6,7 @@\n */\n #include \"stream_options.h\"\n \n+#include <bits/stdc++.h>\n #include <iostream>\n \n using namespace libcamera;\n@@ -19,7 +20,7 @@ StreamKeyValueParser::StreamKeyValueParser()\n \t\t ArgumentRequired);\n \taddOption(\"height\", OptionInteger, \"Height in pixels\",\n \t\t ArgumentRequired);\n-\taddOption(\"pixelformat\", OptionInteger, \"Pixel format\",\n+\taddOption(\"pixelformat\", OptionString, \"Pixel format fourcc\",\n \t\t ArgumentRequired);\n }\n \n@@ -96,8 +97,14 @@ int StreamKeyValueParser::updateConfiguration(CameraConfiguration *config,\n \t\t}\n \n \t\t/* \\todo Translate 4CC string to pixelformat with modifier. */\n-\t\tif (opts.isSet(\"pixelformat\"))\n-\t\t\tcfg.pixelFormat = PixelFormat(opts[\"pixelformat\"]);\n+\t\tif (opts.isSet(\"pixelformat\")) {\n+\t\t\tstd::string fourcc = opts[\"pixelformat\"];\n+\t\t\ttransform(fourcc.begin(), fourcc.end(), fourcc.begin(), ::toupper);\n+\t\t\tchar char_array[5];\n+\t\t\tstrcpy(char_array, fourcc.c_str());\n+\t\t\tcfg.pixelFormat = PixelFormat((__u32)(char_array[0]) | ((__u32)(char_array[1]) << 8) |\n+\t\t\t\t\t\t ((__u32)(char_array[2]) << 16) | ((__u32)(char_array[3]) << 24));\n+\t\t}\n \t}\n \n \treturn 0;\n", "prefixes": [ "libcamera-devel" ] }