Patch Detail
Show a patch.
GET /api/patches/21208/?format=api
{ "id": 21208, "url": "https://patchwork.libcamera.org/api/patches/21208/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21208/", "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": "<20240910044834.2477701-3-chenghaoyang@google.com>", "date": "2024-09-10T04:40:15", "name": "[v12,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/21208/mbox/", "series": [ { "id": 4572, "url": "https://patchwork.libcamera.org/api/series/4572/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4572", "date": "2024-09-10T04:40:13", "name": "Add VirtualPipelineHandler", "version": 12, "mbox": "https://patchwork.libcamera.org/series/4572/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21208/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21208/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 5DD93C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 Sep 2024 04:48:51 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 68BF9634F2;\n\tTue, 10 Sep 2024 06:48:47 +0200 (CEST)", "from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com\n\t[IPv6:2607:f8b0:4864:20::42e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1A2A4618F2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 Sep 2024 06:48:44 +0200 (CEST)", "by mail-pf1-x42e.google.com with SMTP id\n\td2e1a72fcca58-718d91eef2eso2443575b3a.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 09 Sep 2024 21:48:44 -0700 (PDT)", "from chenghaoyang-low.c.googlers.com.com\n\t(0.223.81.34.bc.googleusercontent.com. [34.81.223.0])\n\tby smtp.gmail.com with ESMTPSA id\n\td2e1a72fcca58-71909092522sm530734b3a.111.2024.09.09.21.48.40\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 09 Sep 2024 21:48:41 -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=\"gn0bQiQQ\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1725943722; x=1726548522;\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=mpa76W+Hl/OJ966oDSd7rHjggBcd/1cVqR+lv1KR4/8=;\n\tb=gn0bQiQQiFukyPRr1nI8pdBD1iSIvwO0FXoP4hybuVxDu/+zrqfJC72VU1hQqgBOud\n\tPiC33Mqn8F/VuS+S6oQ78/GCnOgnUHTzQe6awBhMlaJTmj1Ojj37MrvutWHRZeLa4rZf\n\t2jCdfLY37FtHeSD/Zu3Ns4Gc3SEUuu3UuW/8U=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1725943722; x=1726548522;\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=mpa76W+Hl/OJ966oDSd7rHjggBcd/1cVqR+lv1KR4/8=;\n\tb=GEu87qKH8bE/p8FVdqtX9qJDY4ZNiC2gSBD4ghzfwUGzF5VycdDswBGrnlCZ7/R6n2\n\tbuaCTCZAky5hgdEz/B3MHPZIZiahXy29Ap/PnZN1JLwb6vFqeza7WhwpKb3sM7HtEMk2\n\trGMxj1V3FC0QYhsDr1gpw0WgAZRkELeN8uLw1AyHBp5imfT0hQobs7NyY+lAOzR8TqRl\n\tYKiA3G5DJ8LQHgyDWHohE+nvMEwrv+0pq2YfYhcpM9oMgqsL8Sg16CAVzQ5ylTCqw4vg\n\t0e2HmbUMfycCRSxFeYzHVfoAjGjPAgaBHS2w2nV+UefTNdgUt2FOvFontKGA4r/9H1Ea\n\tqxlQ==", "X-Gm-Message-State": "AOJu0YxQ36r95s0hWG8yOKQtWBKSBTthf7GP2/8YBIb4+C5VB5XO2Yzv\n\tDyBmYyOu0Gnyyfnn1vyVnDDKVpDWRBPBrKl8UYAkScLRc5folklmieNJkWaLgZprYyanDf+p1pY\n\t=", "X-Google-Smtp-Source": "AGHT+IG2XQZUyhnM6OTriS4JKn5I8qCIggpP46VXE1zsSkcsFr/kw4XYB91gpHuDzurqKIWS+Pnd3A==", "X-Received": "by 2002:a05:6a00:6f0c:b0:70d:26cd:9741 with SMTP id\n\td2e1a72fcca58-71907f29d40mr2478959b3a.12.1725943722244; \n\tMon, 09 Sep 2024 21:48:42 -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>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>", "Subject": "[PATCH v12 2/7] libcamera: Remove PipelineHandler Fatal check of\n\tnon-empty MediaDevices", "Date": "Tue, 10 Sep 2024 04:40:15 +0000", "Message-ID": "<20240910044834.2477701-3-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.46.0.598.g6f2099f65c-goog", "In-Reply-To": "<20240910044834.2477701-1-chenghaoyang@google.com>", "References": "<20240910044834.2477701-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>\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 e5940469..89a513e4 100644\n--- a/src/libcamera/pipeline_handler.cpp\n+++ b/src/libcamera/pipeline_handler.cpp\n@@ -637,9 +637,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": [ "v12", "2/7" ] }