Patch Detail
Show a patch.
GET /api/1.1/patches/20969/?format=api
{ "id": 20969, "url": "https://patchwork.libcamera.org/api/1.1/patches/20969/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20969/", "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": "<20240820172202.526547-3-chenghaoyang@google.com>", "date": "2024-08-20T16:23:33", "name": "[v9,2/8] 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/20969/mbox/", "series": [ { "id": 4529, "url": "https://patchwork.libcamera.org/api/1.1/series/4529/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4529", "date": "2024-08-20T16:23:31", "name": "Add VirtualPipelineHandler", "version": 9, "mbox": "https://patchwork.libcamera.org/series/4529/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20969/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20969/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 2CD77C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 20 Aug 2024 17:22:25 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C3705633CE;\n\tTue, 20 Aug 2024 19:22:24 +0200 (CEST)", "from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com\n\t[IPv6:2a00:1450:4864:20::32f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 41502633CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Aug 2024 19:22:16 +0200 (CEST)", "by mail-wm1-x32f.google.com with SMTP id\n\t5b1f17b1804b1-428101fa30aso46610075e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 20 Aug 2024 10:22:16 -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-42ab6e90db5sm30328575e9.0.2024.08.20.10.22.14\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 20 Aug 2024 10:22:14 -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=\"l9CXATQi\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=chromium.org; s=google; t=1724174535; x=1724779335;\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=J4lnb82gImewC8slrhsxvkvivBhZnq9isCozxZOsaF4=;\n\tb=l9CXATQiDidu8OaYTq8ek4ChoQ2VAd6H9Dyy1fzVdA7nMz9+MXNCp+rjDbBKHEornp\n\tAP8cSNXQjlWGrzjiF4L9riV4m1VnRyE3p242amlwPptnqX8HGCBuvvemVglXOV/wDh3D\n\tItKynZFgCPZC9PMEpV9nQuC6q8fBdCU9hIqko=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1724174535; x=1724779335;\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=J4lnb82gImewC8slrhsxvkvivBhZnq9isCozxZOsaF4=;\n\tb=xUxQ8gC/zwaaHQVp/gwIzg05QRJMgR3lKIAK2/y2HOFLEBwR87+QCWEHRIjQ2+9+1o\n\tvrBrw9aJ8HrnvpsFN2zytu4Or51rFbSIy8D7qiWhxA366vQ4cWQmMSigJ3FJYp2z61/w\n\t087pcuS4H30A2leGm4X4R7KcWcCzT084koOYR6KC/atcwaJ0dO1Nvo6c/HuIZmkdtSRk\n\tgg/S7gBCIeELcDCPcQmYs9SsJC84eG2VBACtflVwmrVk1kKf/c+h4YdfHfDIeO3d6/Cb\n\tg8NIXMuWoOjr4fiIqL/VIFSvPzQ+m9+fd113Qk4gVypQ50cAfKqTC04Z4OfEtBPz+jVL\n\tmQlA==", "X-Gm-Message-State": "AOJu0Yw63rb/0A1akOc8nSP5xjCeAwl9imA46/nAfMsUofKYRJU/2N0x\n\t8vGnkLn2+UAUhQOqwMbmzUpLzhmWsNb6WcJoRpbA1OIytlXJzToV+e925u+ZnNnK+qz3pqho/sT\n\tqy3u/oq8=", "X-Google-Smtp-Source": "AGHT+IH23RfHsspLkyfA/hpQOAxys7tKWopOfyc0+g2iUqn+ZgYHH3VETRQmvbwrdqvAqX1TlnFblw==", "X-Received": "by 2002:a05:600c:1c02:b0:429:d0cb:950f with SMTP id\n\t5b1f17b1804b1-42abd112184mr566945e9.2.1724174535368; \n\tTue, 20 Aug 2024 10:22:15 -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 v9 2/8] libcamera: Remove PipelineHandler Fatal check of\n\tnon-empty MediaDevices", "Date": "Tue, 20 Aug 2024 16:23:33 +0000", "Message-ID": "<20240820172202.526547-3-chenghaoyang@google.com>", "X-Mailer": "git-send-email 2.46.0.184.g6999bdac58-goog", "In-Reply-To": "<20240820172202.526547-1-chenghaoyang@google.com>", "References": "<20240820172202.526547-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 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": [ "v9", "2/8" ] }