Show a patch.

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

{
    "id": 14167,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14167/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14167/",
    "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": "<20211018132923.476242-7-umang.jain@ideasonboard.com>",
    "date": "2021-10-18T13:29:18",
    "name": "[libcamera-devel,06/11] android: camera_stream: Pass StreamBuffer to process()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "049892333227daa56a745858d3b8b679357955be",
    "submitter": {
        "id": 86,
        "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api",
        "name": "Umang Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "delegate": {
        "id": 12,
        "url": "https://patchwork.libcamera.org/api/1.1/users/12/?format=api",
        "username": "uajain",
        "first_name": "Umang",
        "last_name": "Jain",
        "email": "umang.jain@ideasonboard.com"
    },
    "mbox": "https://patchwork.libcamera.org/patch/14167/mbox/",
    "series": [
        {
            "id": 2636,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2636/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2636",
            "date": "2021-10-18T13:29:12",
            "name": "android: Overhaul request handling",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/2636/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14167/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14167/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 716EAC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Oct 2021 13:29:44 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 01D0868F5D;\n\tMon, 18 Oct 2021 15:29:43 +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 1601468F58\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Oct 2021 15:29:42 +0200 (CEST)",
            "from perceval.ideasonboard.com (unknown [103.238.109.14])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4251E8C6;\n\tMon, 18 Oct 2021 15:29:41 +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=\"HwQQVNOp\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634563781;\n\tbh=YTN1gKdGQJFrFnUiorDerDOX92fgJl3k9kBXQqPCLiU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=HwQQVNOpPn0iSZfhCJYZve6AgkPiFuhKEEy0YS81J2vf5HH7awqeFoD/mKBlPlR9U\n\tIy8ubGaPUSbWDBfb07DYejY0RvCgOZnrRNCAuFkS9cRAEp/wjUwOgLJy/sYNLhHojw\n\tMxEPp7SyoSBQjKTNoIECPp9atx2g5tRkXMFKP/ow=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 18 Oct 2021 18:59:18 +0530",
        "Message-Id": "<20211018132923.476242-7-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20211018132923.476242-1-umang.jain@ideasonboard.com>",
        "References": "<20211018132923.476242-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 06/11] android: camera_stream: Pass\n\tStreamBuffer to process()",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nNow that we have a proper structure to model a stream buffer, pass it to\nCameraStream::process() instead of the camera3_stream_buffer_t. This\nwill allow accessing other members of StreamBuffer in subsequent\ncommits.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/android/camera_device.cpp |  2 +-\n src/android/camera_stream.cpp | 14 +++++++-------\n src/android/camera_stream.h   |  5 +++--\n 3 files changed, 11 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 59557358..cd9e9fe2 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -1175,7 +1175,7 @@ void CameraDevice::requestComplete(Request *request)\n \t\t\tcontinue;\n \t\t}\n \n-\t\tint ret = cameraStream->process(*src, buffer.buffer, descriptor);\n+\t\tint ret = cameraStream->process(*src, buffer, descriptor);\n \n \t\t/*\n \t\t * Return the FrameBuffer to the CameraStream now that we're\ndiff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex 8f47e4d8..f3cc77e7 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -143,15 +143,15 @@ int CameraStream::waitFence(int fence)\n }\n \n int CameraStream::process(const FrameBuffer &source,\n-\t\t\t  camera3_stream_buffer_t &camera3Dest,\n+\t\t\t  Camera3RequestDescriptor::StreamBuffer &dest,\n \t\t\t  Camera3RequestDescriptor *request)\n {\n \t/* Handle waiting on fences on the destination buffer. */\n-\tint fence = camera3Dest.acquire_fence;\n+\tint fence = dest.buffer.acquire_fence;\n \tif (fence != -1) {\n \t\tint ret = waitFence(fence);\n \t\t::close(fence);\n-\t\tcamera3Dest.acquire_fence = -1;\n+\t\tdest.buffer.acquire_fence = -1;\n \t\tif (ret < 0) {\n \t\t\tLOG(HAL, Error) << \"Failed waiting for fence: \"\n \t\t\t\t\t<< fence << \": \" << strerror(-ret);\n@@ -167,14 +167,14 @@ int CameraStream::process(const FrameBuffer &source,\n \t * separate thread.\n \t */\n \tconst StreamConfiguration &output = configuration();\n-\tCameraBuffer dest(*camera3Dest.buffer, output.pixelFormat, output.size,\n-\t\t\t  PROT_READ | PROT_WRITE);\n-\tif (!dest.isValid()) {\n+\tCameraBuffer destBuffer(*dest.buffer.buffer, output.pixelFormat,\n+\t\t\t\toutput.size, PROT_READ | PROT_WRITE);\n+\tif (!destBuffer.isValid()) {\n \t\tLOG(HAL, Error) << \"Failed to create destination buffer\";\n \t\treturn -EINVAL;\n \t}\n \n-\treturn postProcessor_->process(source, &dest, request);\n+\treturn postProcessor_->process(source, &destBuffer, request);\n }\n \n FrameBuffer *CameraStream::getBuffer()\ndiff --git a/src/android/camera_stream.h b/src/android/camera_stream.h\nindex 405b232d..197bd995 100644\n--- a/src/android/camera_stream.h\n+++ b/src/android/camera_stream.h\n@@ -19,7 +19,8 @@\n #include <libcamera/geometry.h>\n #include <libcamera/pixel_format.h>\n \n-class Camera3RequestDescriptor;\n+#include \"camera_request.h\"\n+\n class CameraDevice;\n class PostProcessor;\n \n@@ -119,7 +120,7 @@ public:\n \n \tint configure();\n \tint process(const libcamera::FrameBuffer &source,\n-\t\t    camera3_stream_buffer_t &camera3Buffer,\n+\t\t    Camera3RequestDescriptor::StreamBuffer &dest,\n \t\t    Camera3RequestDescriptor *request);\n \tlibcamera::FrameBuffer *getBuffer();\n \tvoid putBuffer(libcamera::FrameBuffer *buffer);\n",
    "prefixes": [
        "libcamera-devel",
        "06/11"
    ]
}