Show a patch.

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

{
    "id": 20703,
    "url": "https://patchwork.libcamera.org/api/patches/20703/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20703/",
    "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": "<20240726095626.3632402-3-chenghaoyang@chromium.org>",
    "date": "2024-07-26T09:54:23",
    "name": "[v6,2/7] The Fatal check of having at least one MediaDevice was to prevent pipeline handler implementations searching and owning media devices with custom conventions, instead of using the base function |acquireMediaDevice|. It also has the assumption tha",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "41a946d8020fdd8433230175f39bba0b6d992b1c",
    "submitter": {
        "id": 117,
        "url": "https://patchwork.libcamera.org/api/people/117/?format=api",
        "name": "Cheng-Hao Yang",
        "email": "chenghaoyang@chromium.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20703/mbox/",
    "series": [
        {
            "id": 4461,
            "url": "https://patchwork.libcamera.org/api/series/4461/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4461",
            "date": "2024-07-26T09:54:21",
            "name": "Add VirtualPipelineHandler",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/4461/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20703/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20703/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 EED4CBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 26 Jul 2024 09:56:42 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EAEDB63378;\n\tFri, 26 Jul 2024 11:56:38 +0200 (CEST)",
            "from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com\n\t[IPv6:2607:f8b0:4864:20::62f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 416A363371\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jul 2024 11:56:35 +0200 (CEST)",
            "by mail-pl1-x62f.google.com with SMTP id\n\td9443c01a7336-1fc49c0aaffso4053035ad.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 26 Jul 2024 02:56:35 -0700 (PDT)",
            "from chenghaoyang-low.c.googlers.com.com\n\t(148.175.199.104.bc.googleusercontent.com. [104.199.175.148])\n\tby smtp.gmail.com with ESMTPSA id\n\td9443c01a7336-1fed7c7f63asm28396665ad.46.2024.07.26.02.56.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 26 Jul 2024 02:56:33 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"c5UrKc1t\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1721987793; x=1722592593;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=3h1FiPDzN3Wef2W7iR2p7iICFPCXweUh/ZRBntn8Ej0=;\n\tb=c5UrKc1tBDuoMyH5rC1keymd8NdmchGmOEnCLa1VpE15F27NCN/BhL9s8SOfgoCcAh\n\tG3pohYjKusyNxxHxu4bnzxNnTr+941wkC20lw6gzdGKfuNE1zF2RZna6lcpsVwu31C0x\n\tlSBCgFwjB2u6oIbvCaSrCVkZcQKno6Ykq2yxA=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1721987793; x=1722592593;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=3h1FiPDzN3Wef2W7iR2p7iICFPCXweUh/ZRBntn8Ej0=;\n\tb=VdagbzPYxRn45FeGAuEMu+/a6fyhvOcKovF7yU79UP7tV6BfbCySQ2ALxVAp269kFR\n\tqVZTs+o1K6Z3p8Sa4BZFoyW8QqNzHNnq5TWtijvq+c7N6ahDwXcOoO1OQrsPMJu0DUJX\n\t4PJXFY4L+oI9L+flgXEP5moMQAsagXKk+WicJPScJGin0+0V5xMxHxeIcv0WP6nknF7S\n\tXAv0j1LcItAxESHedHTfwMLyG3usPZ2e+AHvAyJK9DNZAQbgOBvslXIFN8GTHiEcWxtC\n\txofgM8aulS6mVMZvrYuXb65nF2pqaG1ipgYwREBZhewhJ72hMzFyQprng7a9aEGHoMuk\n\t49RA==",
        "X-Gm-Message-State": "AOJu0Yxmsxre3Aw0GhAB5rA559WlqHw7XtfN6L3rUZDkv09o1L5BkeM3\n\tn+b2hMQ9WArvHqB8JonAuPwnigHIdkpOnK4ceSHi2qHHd+wL6SdTimy8wzxSWU2ZJr6KY4SB9E1\n\t1+A==",
        "X-Google-Smtp-Source": "AGHT+IHLMdiZMFyDLTyoQkFfAW0FpjHRPs4Mb/1O+U02VLyi0docnbUDw5R8gtSQg3a1s1qLek1dRA==",
        "X-Received": "by 2002:a17:902:dac9:b0:1fc:692a:ba46 with SMTP id\n\td9443c01a7336-1fed9337017mr46895325ad.65.1721987793416; \n\tFri, 26 Jul 2024 02:56:33 -0700 (PDT)",
        "From": "Harvey Yang <chenghaoyang@chromium.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Harvey Yang <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>",
        "Subject": "[PATCH v6 2/7] The Fatal check of having at least one MediaDevice\n\twas to prevent pipeline handler implementations searching and owning\n\tmedia devices with custom conventions,\n\tinstead of using the base function |acquireMediaDevice|. It also has\n\tthe\n\tassumption that there's at least one media device to make a camera\n\twork.",
        "Date": "Fri, 26 Jul 2024 09:54:23 +0000",
        "Message-ID": "<20240726095626.3632402-3-chenghaoyang@chromium.org>",
        "X-Mailer": "git-send-email 2.46.0.rc1.232.g9752f9e123-goog",
        "In-Reply-To": "<20240726095626.3632402-1-chenghaoyang@chromium.org>",
        "References": "<20240726095626.3632402-1-chenghaoyang@chromium.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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: Harvey Yang <chenghaoyang@google.com>\n\nNow that the assumption will be broken by the virtual pipeline handler\nadded in the following patches, and developers should be aware of the\navailable functions in the base class to handle media devices, the Fatal\ncheck is no longer needed.\n\nChange-Id: I76b4b74ebb2fa982136a9f9ab1c8a0a98b518c3a\nSigned-off-by: Harvey Yang <chenghaoyang@chromium.org>\n---\n src/libcamera/pipeline_handler.cpp | 11 ++++++++---\n 1 file changed, 8 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\nindex 5ea2ca780..125cf9d5e 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -605,9 +605,14 @@ void PipelineHandler::registerCamera(std::shared_ptr<Camera> camera)\n {\n \tcameras_.push_back(camera);\n \n-\tif (mediaDevices_.empty())\n-\t\tLOG(Pipeline, Fatal)\n-\t\t\t<< \"Registering camera with no media devices!\";\n+\tif (mediaDevices_.empty()) {\n+\t\t/*\n+\t\t * For virtual devices with no MediaDevice, there are no system\n+\t\t * devices to register.\n+\t\t */\n+\t\tmanager_->_d()->addCamera(std::move(camera));\n+\t\treturn;\n+\t}\n \n \t/*\n \t * Walk the entity list and map the devnums of all capture video nodes\n",
    "prefixes": [
        "v6",
        "2/7"
    ]
}