Patch Detail
Show a patch.
GET /api/1.1/patches/20740/?format=api
{ "id": 20740, "url": "https://patchwork.libcamera.org/api/1.1/patches/20740/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20740/", "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": "<20240801073339.4061027-3-chenghaoyang@google.com>", "date": "2024-08-01T07:30:58", "name": "[v7,2/7] libcamera: Remove PipelineHandler Fatal check of non-empty MediaDevices", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "41a946d8020fdd8433230175f39bba0b6d992b1c", "submitter": { "id": 117, "url": "https://patchwork.libcamera.org/api/1.1/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/20740/mbox/", "series": [ { "id": 4472, "url": "https://patchwork.libcamera.org/api/1.1/series/4472/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4472", "date": "2024-08-01T07:30:56", "name": "Add VirtualPipelineHandler", "version": 7, "mbox": "https://patchwork.libcamera.org/series/4472/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20740/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20740/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 9A4EEBDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 1 Aug 2024 07:33:58 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 427F76338A;\n\tThu, 1 Aug 2024 09:33:58 +0200 (CEST)", "from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com\n\t[IPv6:2607:f8b0:4864:20::62a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 815DD6336E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 1 Aug 2024 09:33:50 +0200 (CEST)", "by mail-pl1-x62a.google.com with SMTP id\n\td9443c01a7336-1fc6a017abdso43904325ad.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 01 Aug 2024 00:33:50 -0700 (PDT)", "from chenghaoyang-low.c.googlers.com.com\n\t(237.198.80.34.bc.googleusercontent.com. [34.80.198.237])\n\tby smtp.gmail.com with ESMTPSA id\n\td9443c01a7336-1fed7cd3dcbsm131839165ad.73.2024.08.01.00.33.47\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 01 Aug 2024 00:33:48 -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=\"YyT+K8T+\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1722497628; x=1723102428;\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=9iM+BAol9iKYbqKcwdRomHNbcUOqjGWEzgMPTtWNXEk=;\n\tb=YyT+K8T+/Zd/UY2DDMjakWaSdzrJMy5sefBmR9l/AxL8BTvtRgwUbdOWVHPEbWtO7w\n\tmbtQl1X7s/HwievHrFVYj45DX1Jl63b0kNIksOHvMcjK7rWUlNVhnNq3eK/3j0V3sGTQ\n\tmcuO5JHaUZ0f5yNIabA3RcG+cVYALEhp85vzs=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1722497628; x=1723102428;\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=9iM+BAol9iKYbqKcwdRomHNbcUOqjGWEzgMPTtWNXEk=;\n\tb=btCODkiWaMUyTRgvchnbS1/Qj4LoED/WXp8M3kH7ldz8xgsp0kwEBfpt/Rfu9h25hO\n\tZGr/HB0qxYwUxia73zA3CjUgPlgaiDlgDSgmzGcCHMeGmw+XTyOq8vYNOUr7kv4Ks3zt\n\t3IrATzZ72nfjzzwGEtrr6py8h3iFVoHCSS57DLC2oetbBgOl04KlFk/w+Tfu8D9NAEpO\n\t70jx62uR8alqagOKXGZhJrlrFIG3WseweNtC8etUfQU5/QOw1iKg3Qn12WFX19rWmoJh\n\tm76wVbcFx7z05K/ePu3rZm0giH+Qs7hjug4R3r4/dnmRIgo4KMZqPSYOMRpLDvQRyL1i\n\teBlQ==", "X-Gm-Message-State": "AOJu0YxaE9kGNECq/TQ+7OwmWjmnHrCW26mm73m5dWB9ct/bz2K8f7/k\n\tsPth06GcPRUssnH5eLWvlFq/sDhs73ZMNHdrHevT8/GxNJ9oNiF4Hi2D3HsPGR+1bMk/jcelXtw\n\tr7Q==", "X-Google-Smtp-Source": "AGHT+IED4OJxQhXKGJNXreRyJlG07TrUDZfiydyy9i+wUa2vFQEDPxjtdhFcAtLFlEPElerID5yxiQ==", "X-Received": "by 2002:a17:903:18e:b0:1f9:f3c6:ed37 with SMTP id\n\td9443c01a7336-1ff4ce8999fmr22853195ad.14.1722497628372; \n\tThu, 01 Aug 2024 00:33:48 -0700 (PDT)", "From": "Harvey Yang <chenghaoyang@chromium.org>", "X-Google-Original-From": "Harvey Yang <chenghaoyang@google.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Harvey Yang <chenghaoyang@google.com>,\n\tHarvey Yang <chenghaoyang@chromium.org>", "Subject": "[PATCH v7 2/7] libcamera: Remove PipelineHandler Fatal check of\n\tnon-empty MediaDevices", "Date": "Thu, 1 Aug 2024 07:30:58 +0000", "Message-ID": "<20240801073339.4061027-3-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.46.0.rc1.232.g9752f9e123-goog", "In-Reply-To": "<20240801073339.4061027-1-chenghaoyang@google.com>", "References": "<20240801073339.4061027-1-chenghaoyang@google.com>", "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": "The Fatal check of having at least one MediaDevice was to prevent\npipeline handler implementations searching and owning media devices with\ncustom conventions, instead of using the base function\n|acquireMediaDevice|. It also has the assumption that there's at least\none media device to make a camera work.\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\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 5ea2ca78..125cf9d5 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": [ "v7", "2/7" ] }