Patch Detail
Show a patch.
GET /api/patches/21050/?format=api
{ "id": 21050, "url": "https://patchwork.libcamera.org/api/patches/21050/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21050/", "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": "<20240829195703.1456614-3-chenghaoyang@chromium.org>", "date": "2024-08-29T19:47:41", "name": "[v10,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/people/117/?format=api", "name": "Cheng-Hao Yang", "email": "chenghaoyang@chromium.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21050/mbox/", "series": [ { "id": 4547, "url": "https://patchwork.libcamera.org/api/series/4547/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4547", "date": "2024-08-29T19:47:39", "name": "Add VirtualPipelineHandler", "version": 10, "mbox": "https://patchwork.libcamera.org/series/4547/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21050/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21050/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 BC212C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 Aug 2024 19:57:17 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 261D3634A6;\n\tThu, 29 Aug 2024 21:57:17 +0200 (CEST)", "from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com\n\t[IPv6:2a00:1450:4864:20::32c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2DCF463469\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Aug 2024 21:57:09 +0200 (CEST)", "by mail-wm1-x32c.google.com with SMTP id\n\t5b1f17b1804b1-4281faefea9so8964235e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Aug 2024 12:57:09 -0700 (PDT)", "from chenghaoyang-germany.c.googlers.com.com\n\t(161.126.77.34.bc.googleusercontent.com. [34.77.126.161])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-42ba7b4271fsm54602805e9.29.2024.08.29.12.57.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 29 Aug 2024 12:57:07 -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=\"eGn8zxfS\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1724961428; x=1725566228;\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=op9M+Tjc1Fx/nSmxqXpHdIQcWLZASgXBAijpK3rPZHg=;\n\tb=eGn8zxfS2cUHnhepQSLFGZFyRTIQueFv85wc4WLWdAxEPu0AibNzC1u1jA0wx1qVru\n\tfn5GqWa5biibqDu+aoQuz6WPrJnFr4/8Ia5vIleF1SQXOaXfmGxa9kEIzSmDWcRO1iMI\n\teRo/Tydctjh0+okpSJ87YBqHPqXacOJot6Gxw=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1724961428; x=1725566228;\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=op9M+Tjc1Fx/nSmxqXpHdIQcWLZASgXBAijpK3rPZHg=;\n\tb=ohoxIdrRMJHHJxWbX5pRJ8KiQwq26G8Qq5ycGmt8K1EbItCO6e9zH+6LJ4lr7kIHY9\n\trnCJhpVtoQgLIaU/Aj8FR+Gp6zx6QMBMWlCSMrh0EjfmP8/9CfbXZx9BJCLVz5pb5nW4\n\t7TxQb56TVp6/fEMa5NVjy2IhgAC8XsuQ8BvXDyW6dfBSBkwMAqLrb5MvIN6NxqICuvNl\n\tH3VOQrS89LJFibIEjucvdaANlZfnMxOv1kcQaKZmB9rq2u5ylhf+VZEiFKr4nA2pD/iO\n\tDT9jsUSzGCRf7GJnAWtK9Z/uhHy1Al+V7aCHgL0G0/A8vbgjxISGfJOjD7nVgC9IX0oQ\n\t0OyQ==", "X-Gm-Message-State": "AOJu0Yy8YlT+CJ76HHB5Y53ch/ip5usHnW9UWJM67hUT/5GMxkDlVRYO\n\tX4UPOaGJs+LGLcID3p0FMeGkc5O/Ir52Ohr9/7Iznv8yQoWoIkviyYi85+8m7JgD6RMARr6YHvd\n\thpA==", "X-Google-Smtp-Source": "AGHT+IFE/30fVhVcEWYoalr0ME0rS9QEJMrbtT55uRH6sTntisparhpUwUxKrZEm15efbhHSzx6tGw==", "X-Received": "by 2002:a05:600c:46c9:b0:42b:8a35:1acf with SMTP id\n\t5b1f17b1804b1-42bbb436e9amr145025e9.25.1724961427654; \n\tThu, 29 Aug 2024 12:57:07 -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>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>", "Subject": "[PATCH v10 2/7] libcamera: Remove PipelineHandler Fatal check of\n\tnon-empty MediaDevices", "Date": "Thu, 29 Aug 2024 19:47:41 +0000", "Message-ID": "<20240829195703.1456614-3-chenghaoyang@chromium.org>", "X-Mailer": "git-send-email 2.46.0.469.g59c65b2a67-goog", "In-Reply-To": "<20240829195703.1456614-1-chenghaoyang@chromium.org>", "References": "<20240829195703.1456614-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\nThe 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>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\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 5a6de685b..2cb1a4bd7 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": [ "v10", "2/7" ] }