Show a patch.

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

{
    "id": 13807,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13807/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13807/",
    "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": "<20210910070638.467294-10-umang.jain@ideasonboard.com>",
    "date": "2021-09-10T07:06:38",
    "name": "[libcamera-devel,v2,9/9] RFC: Stop PostProcessor when camera is stopped",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "80dedb3f84b8984da0a50451b21320b723fa87f8",
    "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/13807/mbox/",
    "series": [
        {
            "id": 2513,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2513/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2513",
            "date": "2021-09-10T07:06:29",
            "name": "Async Post Processor",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/2513/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13807/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13807/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 B4B89BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Sep 2021 07:07:06 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 811536917E;\n\tFri, 10 Sep 2021 09:07:06 +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 7D1A269173\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Sep 2021 09:07:04 +0200 (CEST)",
            "from perceval.ideasonboard.com (unknown [103.251.226.149])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 67C21BC0;\n\tFri, 10 Sep 2021 09:07:03 +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=\"WoVkS3ZQ\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631257624;\n\tbh=F2quetUbPCNcaM/qIjB8+u9Jj2pS/LI0AsvgPyb0TXM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=WoVkS3ZQXDvSMKnWMgTyMZi8AFT9IU4IJv55HU8ZVhlsJtF9AFGC/LRr/pRjMTSJA\n\tMK3OFZhPf7BuxAO48Xilv8ZVPZGU7RrO9Y3io2tRTSDO6Zyb/NfhVihXhORDFQGN4x\n\tN1CJEeV8oyCKZkyfX25gl9RoshNeyRgI67r32n0M=",
        "From": "Umang Jain <umang.jain@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 10 Sep 2021 12:36:38 +0530",
        "Message-Id": "<20210910070638.467294-10-umang.jain@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.31.1",
        "In-Reply-To": "<20210910070638.467294-1-umang.jain@ideasonboard.com>",
        "References": "<20210910070638.467294-1-umang.jain@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v2 9/9] RFC: Stop PostProcessor when\n\tcamera is stopped",
        "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": "Stopping the post-processor thread from CameraDevice is not ideal.\nBut it temporarily avoids the crash on stopping the camera.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\n---\n src/android/camera_device.cpp | 8 ++++++++\n src/android/camera_stream.h   | 7 +++++++\n 2 files changed, 15 insertions(+)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 73eb5758..fa2db72f 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -425,6 +425,14 @@ int CameraDevice::open(const hw_module_t *hardwareModule)\n \n void CameraDevice::close()\n {\n+\tfor (CameraStream &cameraStream : streams_) {\n+\t\t/* CameraStream doesn't have user defined destructor as\n+\t\t * it is MoveConstructible. Stop the post-processor thread\n+\t\t * from here before clearing streams_.\n+\t\t */\n+\t\tcameraStream.stopPostProcessorThread();\n+\t}\n+\n \tstreams_.clear();\n \n \tstop();\ndiff --git a/src/android/camera_stream.h b/src/android/camera_stream.h\nindex dbb7eee3..bd37473e 100644\n--- a/src/android/camera_stream.h\n+++ b/src/android/camera_stream.h\n@@ -133,6 +133,13 @@ public:\n \t\t    const Camera3RequestDescriptor *context);\n \tlibcamera::FrameBuffer *getBuffer();\n \tvoid putBuffer(libcamera::FrameBuffer *buffer);\n+\tvoid stopPostProcessorThread()\n+\t{\n+\t\tif (thread_) {\n+\t\t\tthread_->exit();\n+\t\t\tthread_->wait();\n+\t\t}\n+\t}\n \n \tenum ProcessStatus {\n \t\tSucceeded,\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "9/9"
    ]
}