Show a patch.

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

{
    "id": 2222,
    "url": "https://patchwork.libcamera.org/api/patches/2222/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2222/",
    "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": "<20191025202616.57177-1-jacopo@jmondi.org>",
    "date": "2019-10-25T20:26:16",
    "name": "[libcamera-devel] ipa: Allow forcing usage of C API though environment",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "efe0bc610fa45f94815b369c0b96f192319b87ee",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/2222/mbox/",
    "series": [
        {
            "id": 550,
            "url": "https://patchwork.libcamera.org/api/series/550/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=550",
            "date": "2019-10-25T20:26:16",
            "name": "[libcamera-devel] ipa: Allow forcing usage of C API though environment",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/550/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2222/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2222/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<jacopo@jmondi.org>",
        "Received": [
            "from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2AEE061375\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Oct 2019 22:24:30 +0200 (CEST)",
            "from uno.localdomain (143.121.2.93.rev.sfr.net [93.2.121.143])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 9CBF6200007;\n\tFri, 25 Oct 2019 20:24:29 +0000 (UTC)"
        ],
        "From": "Jacopo Mondi <jacopo@jmondi.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 25 Oct 2019 22:26:16 +0200",
        "Message-Id": "<20191025202616.57177-1-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.23.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH] ipa: Allow forcing usage of C API though\n\tenvironment",
        "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, 25 Oct 2019 20:24:30 -0000"
    },
    "content": "Parse the 'LIBCAMERA_IPA_FORCE_C_API' environment variable that allows\nforcing the usage of the IPA C API even if it's possible to short-circuit\nit through the ipa_context_ops get_interface() operation.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/ipa_context_wrapper.cpp | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/libcamera/ipa_context_wrapper.cpp b/src/libcamera/ipa_context_wrapper.cpp\nindex 736082e9b068..b178418eb9b8 100644\n--- a/src/libcamera/ipa_context_wrapper.cpp\n+++ b/src/libcamera/ipa_context_wrapper.cpp\n@@ -9,6 +9,8 @@\n \n #include <libcamera/controls.h>\n \n+#include \"utils.h\"\n+\n /**\n  * \\file ipa_context_wrapper.h\n  * \\brief Image Processing Algorithm context wrapper\n@@ -41,7 +43,13 @@ namespace libcamera {\n IPAContextWrapper::IPAContextWrapper(struct ipa_context *context)\n \t: ctx_(context)\n {\n-\tif (ctx_ && ctx_->ops->get_interface) {\n+\tint skipIntf = 0;\n+\tconst char *skipIntfEnv =\n+\t\t\tutils::secure_getenv(\"LIBCAMERA_IPA_FORCE_C_API\");\n+\tif (skipIntfEnv)\n+\t\tskipIntf = !!atoi(skipIntfEnv);\n+\n+\tif (!skipIntf && ctx_ && ctx_->ops->get_interface) {\n \t\tintf_ = reinterpret_cast<IPAInterface *>(ctx_->ops->get_interface(ctx_));\n \t\tintf_->queueFrameAction.connect(this, &IPAContextWrapper::queueFrameAction);\n \t} else {\n",
    "prefixes": [
        "libcamera-devel"
    ]
}