Show a patch.

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

{
    "id": 11821,
    "url": "https://patchwork.libcamera.org/api/patches/11821/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11821/",
    "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": "<20210402021238.1297591-2-hiroh@chromium.org>",
    "date": "2021-04-02T02:12:37",
    "name": "[libcamera-devel,v5,1/2] android: CameraDevice: Add stop()",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "44c3e5fd32534554c06b8c2a6a830a17deea68e4",
    "submitter": {
        "id": 63,
        "url": "https://patchwork.libcamera.org/api/people/63/?format=api",
        "name": "Hirokazu Honda",
        "email": "hiroh@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11821/mbox/",
    "series": [
        {
            "id": 1882,
            "url": "https://patchwork.libcamera.org/api/series/1882/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1882",
            "date": "2021-04-02T02:12:36",
            "name": "Fix Camera3RequestDescriptor leakage",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/1882/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11821/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11821/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 0D8FBBD695\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  2 Apr 2021 02:12:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C2EB568784;\n\tFri,  2 Apr 2021 04:12:50 +0200 (CEST)",
            "from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com\n\t[IPv6:2607:f8b0:4864:20::102a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8F39568787\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  2 Apr 2021 04:12:48 +0200 (CEST)",
            "by mail-pj1-x102a.google.com with SMTP id\n\tx7-20020a17090a2b07b02900c0ea793940so3991209pjc.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 01 Apr 2021 19:12:48 -0700 (PDT)",
            "from hiroh2.tok.corp.google.com\n\t([2401:fa00:8f:2:908:1da:b07c:32bc])\n\tby smtp.gmail.com with ESMTPSA id p4sm86902pjk.57.2021.04.01.19.12.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 01 Apr 2021 19:12:46 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"NQ5XB7rQ\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=jC4N0/Et8TUJoGMkmrWzN7SBuUhrsqMvZodN8cLruMw=;\n\tb=NQ5XB7rQj0vp/JnJY/t90jGkPZFt/dJLgq9NnAxrkyd0zEFK/clfznpNn26REkwDaA\n\t6z6RN8nAYExACeZQ/3lcm4/fpOVKibUBhs+PZu9sWdlqRM1HX4Gtj9hTWVjQCKl8ixWO\n\tGyvgQLsotrGa7TqGSAB4x/+aiX7ocUo3GQ/54=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=jC4N0/Et8TUJoGMkmrWzN7SBuUhrsqMvZodN8cLruMw=;\n\tb=CvKVGPHfwDssajXUNILI5AuYQZz9IdwvxSsz3dPrWxs0foUT1b8V5qqRbTiuZ9/tDC\n\tzKg8pqSP8rdUoZ/uyERzuLthTw3vPHci/nuEu4pbUgUfFbjc3LOcrEHZ0rmDmTmYaprC\n\tAVNKd6sMvKxg8j/iX0/O3Qq1SISFhahaLB3fF34bYhTFjVdr2FAe64HVG4zVwloASXwh\n\tHlLajuh1lpi2ed+I0tJwm6kS7OYInvMUZqZezi7WgfkTjuzeykpzEakiUZHiWOVWZlBW\n\tAFaxMk/0dC+NvdN1aMimxuP+SKuQcjghB2cRF7YkN2YKQKX3H7wpwM7gDsvF9tE/FoKw\n\tGMdg==",
        "X-Gm-Message-State": "AOAM53250U0tXPBLP9G3qhF3myaZaJ5m0lsTHXC7/EeQNKCrq5sndt9s\n\tzxrqDOui0FzB9AiKXMbqT61ZXy/ciLHvLQ==",
        "X-Google-Smtp-Source": "ABdhPJztvCvzA6QM+FaIvT4Etl47zkYEwj+mxY4O5V5mi1+infiIq4S0vrgxKZydEEhIdMFb6KisQQ==",
        "X-Received": "by 2002:a17:902:b494:b029:e7:36be:9ce7 with SMTP id\n\ty20-20020a170902b494b02900e736be9ce7mr10583120plr.43.1617329566872; \n\tThu, 01 Apr 2021 19:12:46 -0700 (PDT)",
        "From": "Hirokazu Honda <hiroh@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  2 Apr 2021 11:12:37 +0900",
        "Message-Id": "<20210402021238.1297591-2-hiroh@chromium.org>",
        "X-Mailer": "git-send-email 2.31.0.208.g409f899ff0-goog",
        "In-Reply-To": "<20210402021238.1297591-1-hiroh@chromium.org>",
        "References": "<20210402021238.1297591-1-hiroh@chromium.org>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v5 1/2] android: CameraDevice: Add stop()",
        "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": "This adds CameraDevice::stop(), which cleans up the member\nvariables of CameraDevice. It is called in CameraDevice::close()\nand CameraDevice::configureStreams().\n\nSigned-off-by: Hirokazu Honda <hiroh@chromium.org>\n---\n src/android/camera_device.cpp | 19 ++++++++++++-------\n src/android/camera_device.h   |  2 ++\n 2 files changed, 14 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex eb327978..b45d3a54 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -659,9 +659,18 @@ void CameraDevice::close()\n {\n \tstreams_.clear();\n \n+\tstop();\n+\n+\tcamera_->release();\n+}\n+\n+void CameraDevice::stop()\n+{\n+\tif (!running_)\n+\t\treturn;\n+\n \tworker_.stop();\n \tcamera_->stop();\n-\tcamera_->release();\n \n \trunning_ = false;\n }\n@@ -1547,12 +1556,8 @@ PixelFormat CameraDevice::toPixelFormat(int format) const\n  */\n int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)\n {\n-\t/* Before any configuration attempt, stop the camera if it's running. */\n-\tif (running_) {\n-\t\tworker_.stop();\n-\t\tcamera_->stop();\n-\t\trunning_ = false;\n-\t}\n+\t/* Before any configuration attempt, stop the camera. */\n+\tstop();\n \n \t/*\n \t * Generate an empty configuration, and construct a StreamConfiguration\ndiff --git a/src/android/camera_device.h b/src/android/camera_device.h\nindex 11bdfec8..39cf95ad 100644\n--- a/src/android/camera_device.h\n+++ b/src/android/camera_device.h\n@@ -85,6 +85,8 @@ private:\n \t\tint androidFormat;\n \t};\n \n+\tvoid stop();\n+\n \tint initializeStreamConfigurations();\n \tstd::vector<libcamera::Size>\n \tgetYUVResolutions(libcamera::CameraConfiguration *cameraConfig,\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "1/2"
    ]
}